Patchwork [4/4] mtd: m25p80: remove unnecessary ifdef

login
register
mail settings
Submitter Sascha Hauer
Date Aug. 12, 2013, 10:22 a.m.
Message ID <1376302946-11534-5-git-send-email-s.hauer@pengutronix.de>
Download mbox | patch
Permalink /patch/266479/
State Accepted
Commit 8f229fb8566dd58004a84e2644c1f88ebe71bb88
Headers show

Comments

Sascha Hauer - Aug. 12, 2013, 10:22 a.m.
of_property_read_bool properly compiles away, no need to ifdef this
for non DT builds.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mtd/devices/m25p80.c | 2 --
 1 file changed, 2 deletions(-)
Brian Norris - Aug. 20, 2013, 4:27 a.m.
On Mon, Aug 12, 2013 at 12:22:26PM +0200, Sascha Hauer wrote:
> of_property_read_bool properly compiles away, no need to ifdef this
> for non DT builds.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Pushed only this one to l2-mtd.git, since it's independent.

Thanks,
Brian

Patch

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index d179188..f21af0e 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -1030,10 +1030,8 @@  static int m25p_probe(struct spi_device *spi)
 	flash->mtd.writebufsize = flash->page_size;
 
 	flash->fast_read = false;
-#ifdef CONFIG_OF
 	if (np && of_property_read_bool(np, "m25p,fast-read"))
 		flash->fast_read = true;
-#endif
 
 #ifdef CONFIG_M25PXX_USE_FAST_READ
 	flash->fast_read = true;