aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLad, Prabhakar <prabhakar.csengg@gmail.com>2013-04-01 03:13:44 -0400
committerSekhar Nori <nsekhar@ti.com>2013-04-02 06:01:15 -0400
commita0a56db9771f57667daff41cfa2546dad1abe6d9 (patch)
treec763932dde9e46918b72ea82fd19a287ce94283d
parentab70db5b81ac25691a5e040168fe4ea7fae7f39d (diff)
ARM: davinci: use is IS_ENABLED macro
This patches replaces #if defined() by IS_ENABLED macro, which provides better readability. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Sekhar Nori <nsekhar@ti.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c6
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c7
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c25
-rw-r--r--arch/arm/mach-davinci/board-dm646x-evm.c7
-rw-r--r--arch/arm/mach-davinci/board-neuros-osd2.c15
-rw-r--r--arch/arm/mach-davinci/devices.c2
-rw-r--r--arch/arm/mach-davinci/usb.c2
7 files changed, 12 insertions, 52 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 6da25eebf911..b348e44978b0 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -298,11 +298,7 @@ static const short da830_evm_emif25_pins[] = {
298 -1 298 -1
299}; 299};
300 300
301#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE) 301#define HAS_MMC IS_ENABLED(CONFIG_MMC_DAVINCI)
302#define HAS_MMC 1
303#else
304#define HAS_MMC 0
305#endif
306 302
307#ifdef CONFIG_DA830_UI_NAND 303#ifdef CONFIG_DA830_UI_NAND
308static struct mtd_partition da830_evm_nand_partitions[] = { 304static struct mtd_partition da830_evm_nand_partitions[] = {
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index c2dfe06563df..a74dec756647 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -335,12 +335,7 @@ static const short da850_evm_nor_pins[] = {
335 -1 335 -1
336}; 336};
337 337
338#if defined(CONFIG_MMC_DAVINCI) || \ 338#define HAS_MMC IS_ENABLED(CONFIG_MMC_DAVINCI)
339 defined(CONFIG_MMC_DAVINCI_MODULE)
340#define HAS_MMC 1
341#else
342#define HAS_MMC 0
343#endif
344 339
345static inline void da850_evm_setup_nor_nand(void) 340static inline void da850_evm_setup_nor_nand(void)
346{ 341{
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index 71735e7797cc..a042f27fb6bc 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -750,26 +750,11 @@ static int davinci_phy_fixup(struct phy_device *phydev)
750 return 0; 750 return 0;
751} 751}
752 752
753#if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \ 753#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710)
754 defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE) 754
755#define HAS_ATA 1 755#define HAS_NOR IS_ENABLED(CONFIG_MTD_PHYSMAP)
756#else 756
757#define HAS_ATA 0 757#define HAS_NAND IS_ENABLED(CONFIG_MTD_NAND_DAVINCI)
758#endif
759
760#if defined(CONFIG_MTD_PHYSMAP) || \
761 defined(CONFIG_MTD_PHYSMAP_MODULE)
762#define HAS_NOR 1
763#else
764#define HAS_NOR 0
765#endif
766
767#if defined(CONFIG_MTD_NAND_DAVINCI) || \
768 defined(CONFIG_MTD_NAND_DAVINCI_MODULE)
769#define HAS_NAND 1
770#else
771#define HAS_NAND 0
772#endif
773 758
774static __init void davinci_evm_init(void) 759static __init void davinci_evm_init(void)
775{ 760{
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index de7adff324dc..03785e0e9429 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -117,12 +117,7 @@ static struct platform_device davinci_nand_device = {
117 }, 117 },
118}; 118};
119 119
120#if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \ 120#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710)
121 defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE)
122#define HAS_ATA 1
123#else
124#define HAS_ATA 0
125#endif
126 121
127/* CPLD Register 0 bits to control ATA */ 122/* CPLD Register 0 bits to control ATA */
128#define DM646X_EVM_ATA_RST BIT(0) 123#define DM646X_EVM_ATA_RST BIT(0)
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index 1c98107527fa..ea6728be53ba 100644
--- a/arch/arm/mach-davinci/board-neuros-osd2.c
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -167,20 +167,9 @@ static struct davinci_mmc_config davinci_ntosd2_mmc_config = {
167 .version = MMC_CTLR_VERSION_1 167 .version = MMC_CTLR_VERSION_1
168}; 168};
169 169
170#define HAS_ATA IS_ENABLED(CONFIG_BLK_DEV_PALMCHIP_BK3710)
170 171
171#if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \ 172#define HAS_NAND IS_ENABLED(CONFIG_MTD_NAND_DAVINCI)
172 defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE)
173#define HAS_ATA 1
174#else
175#define HAS_ATA 0
176#endif
177
178#if defined(CONFIG_MTD_NAND_DAVINCI) || \
179 defined(CONFIG_MTD_NAND_DAVINCI_MODULE)
180#define HAS_NAND 1
181#else
182#define HAS_NAND 0
183#endif
184 173
185static __init void davinci_ntosd2_init(void) 174static __init void davinci_ntosd2_init(void)
186{ 175{
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
index 4c48a36ee567..df135deed08a 100644
--- a/arch/arm/mach-davinci/devices.c
+++ b/arch/arm/mach-davinci/devices.c
@@ -119,7 +119,7 @@ void __init davinci_init_ide(void)
119 platform_device_register(&ide_device); 119 platform_device_register(&ide_device);
120} 120}
121 121
122#if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE) 122#if IS_ENABLED(CONFIG_MMC_DAVINCI)
123 123
124static u64 mmcsd0_dma_mask = DMA_BIT_MASK(32); 124static u64 mmcsd0_dma_mask = DMA_BIT_MASK(32);
125 125
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index 34509ffba221..5764d65ca25d 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -17,7 +17,7 @@
17#define DA8XX_USB0_BASE 0x01e00000 17#define DA8XX_USB0_BASE 0x01e00000
18#define DA8XX_USB1_BASE 0x01e25000 18#define DA8XX_USB1_BASE 0x01e25000
19 19
20#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 20#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
21static struct musb_hdrc_eps_bits musb_eps[] = { 21static struct musb_hdrc_eps_bits musb_eps[] = {
22 { "ep1_tx", 8, }, 22 { "ep1_tx", 8, },
23 { "ep1_rx", 8, }, 23 { "ep1_rx", 8, },