aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/Kconfig12
-rw-r--r--arch/blackfin/include/asm/bfin_crc.h125
-rw-r--r--arch/blackfin/include/asm/dma.h2
-rw-r--r--arch/blackfin/include/asm/portmux.h10
-rw-r--r--arch/blackfin/kernel/irqchip.c39
-rw-r--r--arch/blackfin/mach-bf518/boards/ezbrd.c87
-rw-r--r--arch/blackfin/mach-bf518/boards/tcm-bf518.c64
-rw-r--r--arch/blackfin/mach-bf527/boards/ad7160eval.c71
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c91
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c76
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c139
-rw-r--r--arch/blackfin/mach-bf527/boards/tll6527m.c91
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c46
-rw-r--r--arch/blackfin/mach-bf533/boards/blackstamp.c44
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c54
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c56
-rw-r--r--arch/blackfin/mach-bf533/boards/ip0x.c26
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c118
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537e.c82
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537u.c70
-rw-r--r--arch/blackfin/mach-bf537/boards/dnp5370.c32
-rw-r--r--arch/blackfin/mach-bf537/boards/minotaur.c50
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c55
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c425
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c70
-rw-r--r--arch/blackfin/mach-bf538/boards/ezkit.c62
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c78
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c136
-rw-r--r--arch/blackfin/mach-bf548/include/mach/defBF544.h30
-rw-r--r--arch/blackfin/mach-bf548/include/mach/defBF547.h30
-rw-r--r--arch/blackfin/mach-bf561/boards/acvilon.c28
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c56
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c74
-rw-r--r--arch/blackfin/mach-bf561/boards/tepla.c8
-rw-r--r--arch/blackfin/mach-bf609/boards/ezkit.c131
-rw-r--r--arch/blackfin/mach-bf609/clock.c18
-rw-r--r--arch/blackfin/mach-bf609/pm.c2
37 files changed, 1115 insertions, 1473 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 9ceccef9c649..f81e7b989fff 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -34,6 +34,7 @@ config BLACKFIN
34 select ARCH_WANT_IPC_PARSE_VERSION 34 select ARCH_WANT_IPC_PARSE_VERSION
35 select GENERIC_ATOMIC64 35 select GENERIC_ATOMIC64
36 select GENERIC_IRQ_PROBE 36 select GENERIC_IRQ_PROBE
37 select GENERIC_IRQ_SHOW
37 select HAVE_NMI_WATCHDOG if NMI_WATCHDOG 38 select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
38 select GENERIC_SMP_IDLE_THREAD 39 select GENERIC_SMP_IDLE_THREAD
39 select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS 40 select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS
@@ -51,9 +52,6 @@ config GENERIC_BUG
51config ZONE_DMA 52config ZONE_DMA
52 def_bool y 53 def_bool y
53 54
54config GENERIC_GPIO
55 def_bool y
56
57config FORCE_MAX_ZONEORDER 55config FORCE_MAX_ZONEORDER
58 int 56 int
59 default "14" 57 default "14"
@@ -870,14 +868,6 @@ config SYS_BFIN_SPINLOCK_L1
870 If enabled, sys_bfin_spinlock function is linked 868 If enabled, sys_bfin_spinlock function is linked
871 into L1 instruction memory. (less latency) 869 into L1 instruction memory. (less latency)
872 870
873config IP_CHECKSUM_L1
874 bool "Locate IP Checksum function in L1 Memory"
875 default n
876 depends on !SMP
877 help
878 If enabled, the IP Checksum function is linked
879 into L1 instruction memory. (less latency)
880
881config CACHELINE_ALIGNED_L1 871config CACHELINE_ALIGNED_L1
882 bool "Locate cacheline_aligned data to L1 Data Memory" 872 bool "Locate cacheline_aligned data to L1 Data Memory"
883 default y if !BF54x 873 default y if !BF54x
diff --git a/arch/blackfin/include/asm/bfin_crc.h b/arch/blackfin/include/asm/bfin_crc.h
deleted file mode 100644
index 75cef4dc85a1..000000000000
--- a/arch/blackfin/include/asm/bfin_crc.h
+++ /dev/null
@@ -1,125 +0,0 @@
1/*
2 * bfin_crc.h - interface to Blackfin CRC controllers
3 *
4 * Copyright 2012 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#ifndef __BFIN_CRC_H__
10#define __BFIN_CRC_H__
11
12/* Function driver which use hardware crc must initialize the structure */
13struct crc_info {
14 /* Input data address */
15 unsigned char *in_addr;
16 /* Output data address */
17 unsigned char *out_addr;
18 /* Input or output bytes */
19 unsigned long datasize;
20 union {
21 /* CRC to compare with that of input buffer */
22 unsigned long crc_compare;
23 /* Value to compare with input data */
24 unsigned long val_verify;
25 /* Value to fill */
26 unsigned long val_fill;
27 };
28 /* Value to program the 32b CRC Polynomial */
29 unsigned long crc_poly;
30 union {
31 /* CRC calculated from the input data */
32 unsigned long crc_result;
33 /* First failed position to verify input data */
34 unsigned long pos_verify;
35 };
36 /* CRC mirror flags */
37 unsigned int bitmirr:1;
38 unsigned int bytmirr:1;
39 unsigned int w16swp:1;
40 unsigned int fdsel:1;
41 unsigned int rsltmirr:1;
42 unsigned int polymirr:1;
43 unsigned int cmpmirr:1;
44};
45
46/* Userspace interface */
47#define CRC_IOC_MAGIC 'C'
48#define CRC_IOC_CALC_CRC _IOWR('C', 0x01, unsigned int)
49#define CRC_IOC_MEMCPY_CRC _IOWR('C', 0x02, unsigned int)
50#define CRC_IOC_VERIFY_VAL _IOWR('C', 0x03, unsigned int)
51#define CRC_IOC_FILL_VAL _IOWR('C', 0x04, unsigned int)
52
53
54#ifdef __KERNEL__
55
56#include <linux/types.h>
57#include <linux/spinlock.h>
58#include <linux/miscdevice.h>
59
60struct crc_register {
61 u32 control;
62 u32 datacnt;
63 u32 datacntrld;
64 u32 __pad_1[2];
65 u32 compare;
66 u32 fillval;
67 u32 datafifo;
68 u32 intren;
69 u32 intrenset;
70 u32 intrenclr;
71 u32 poly;
72 u32 __pad_2[4];
73 u32 status;
74 u32 datacntcap;
75 u32 __pad_3;
76 u32 result;
77 u32 curresult;
78 u32 __pad_4[3];
79 u32 revid;
80};
81
82/* CRC_STATUS Masks */
83#define CMPERR 0x00000002 /* Compare error */
84#define DCNTEXP 0x00000010 /* datacnt register expired */
85#define IBR 0x00010000 /* Input buffer ready */
86#define OBR 0x00020000 /* Output buffer ready */
87#define IRR 0x00040000 /* Immediate result readt */
88#define LUTDONE 0x00080000 /* Look-up table generation done */
89#define FSTAT 0x00700000 /* FIFO status */
90#define MAX_FIFO 4 /* Max fifo size */
91
92/* CRC_CONTROL Masks */
93#define BLKEN 0x00000001 /* Block enable */
94#define OPMODE 0x000000F0 /* Operation mode */
95#define OPMODE_OFFSET 4 /* Operation mode mask offset*/
96#define MODE_DMACPY_CRC 1 /* MTM CRC compute and compare */
97#define MODE_DATA_FILL 2 /* MTM data fill */
98#define MODE_CALC_CRC 3 /* MSM CRC compute and compare */
99#define MODE_DATA_VERIFY 4 /* MSM data verify */
100#define AUTOCLRZ 0x00000100 /* Auto clear to zero */
101#define AUTOCLRF 0x00000200 /* Auto clear to one */
102#define OBRSTALL 0x00001000 /* Stall on output buffer ready */
103#define IRRSTALL 0x00002000 /* Stall on immediate result ready */
104#define BITMIRR 0x00010000 /* Mirror bits within each byte of 32-bit input data */
105#define BITMIRR_OFFSET 16 /* Mirror bits offset */
106#define BYTMIRR 0x00020000 /* Mirror bytes of 32-bit input data */
107#define BYTMIRR_OFFSET 17 /* Mirror bytes offset */
108#define W16SWP 0x00040000 /* Mirror uppper and lower 16-bit word of 32-bit input data */
109#define W16SWP_OFFSET 18 /* Mirror 16-bit word offset */
110#define FDSEL 0x00080000 /* FIFO is written after input data is mirrored */
111#define FDSEL_OFFSET 19 /* Mirror FIFO offset */
112#define RSLTMIRR 0x00100000 /* CRC result registers are mirrored. */
113#define RSLTMIRR_OFFSET 20 /* Mirror CRC result offset. */
114#define POLYMIRR 0x00200000 /* CRC poly register is mirrored. */
115#define POLYMIRR_OFFSET 21 /* Mirror CRC poly offset. */
116#define CMPMIRR 0x00400000 /* CRC compare register is mirrored. */
117#define CMPMIRR_OFFSET 22 /* Mirror CRC compare offset. */
118
119/* CRC_INTREN Masks */
120#define CMPERRI 0x02 /* CRC_ERROR_INTR */
121#define DCNTEXPI 0x10 /* CRC_STATUS_INTR */
122
123#endif
124
125#endif
diff --git a/arch/blackfin/include/asm/dma.h b/arch/blackfin/include/asm/dma.h
index 40e9c2bbc6e3..8d1e4c2d2c36 100644
--- a/arch/blackfin/include/asm/dma.h
+++ b/arch/blackfin/include/asm/dma.h
@@ -316,8 +316,6 @@ static inline void disable_dma(unsigned int channel)
316} 316}
317static inline void enable_dma(unsigned int channel) 317static inline void enable_dma(unsigned int channel)
318{ 318{
319 dma_ch[channel].regs->curr_x_count = 0;
320 dma_ch[channel].regs->curr_y_count = 0;
321 dma_ch[channel].regs->cfg |= DMAEN; 319 dma_ch[channel].regs->cfg |= DMAEN;
322} 320}
323int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data); 321int set_dma_callback(unsigned int channel, irq_handler_t callback, void *data);
diff --git a/arch/blackfin/include/asm/portmux.h b/arch/blackfin/include/asm/portmux.h
index 7aa20436e799..c8f0939419be 100644
--- a/arch/blackfin/include/asm/portmux.h
+++ b/arch/blackfin/include/asm/portmux.h
@@ -18,16 +18,14 @@
18#define P_DONTCARE 0x1000 18#define P_DONTCARE 0x1000
19 19
20#ifdef CONFIG_PINCTRL 20#ifdef CONFIG_PINCTRL
21#include <asm/irq_handler.h> 21int bfin_internal_set_wake(unsigned int irq, unsigned int state);
22 22
23#define gpio_pint_regs bfin_pint_regs 23#define gpio_pint_regs bfin_pint_regs
24#define adi_internal_set_wake bfin_internal_set_wake 24#define adi_internal_set_wake bfin_internal_set_wake
25 25
26#define peripheral_request(per, label) 0 26#define peripheral_request(per, label) (0)
27#define peripheral_free(per) 27#define peripheral_free(per)
28#define peripheral_request_list(per, label) \ 28#define peripheral_request_list(per, label) (0)
29 (pdev ? (IS_ERR(devm_pinctrl_get_select_default(&pdev->dev)) \
30 ? -EINVAL : 0) : 0)
31#define peripheral_free_list(per) 29#define peripheral_free_list(per)
32#else 30#else
33int peripheral_request(unsigned short per, const char *label); 31int peripheral_request(unsigned short per, const char *label);
@@ -39,7 +37,7 @@ void peripheral_free_list(const unsigned short per[]);
39#include <linux/err.h> 37#include <linux/err.h>
40#include <linux/pinctrl/pinctrl.h> 38#include <linux/pinctrl/pinctrl.h>
41#include <mach/portmux.h> 39#include <mach/portmux.h>
42#include <linux/gpio.h> 40#include <mach/gpio.h>
43 41
44#ifndef P_SPORT2_TFS 42#ifndef P_SPORT2_TFS
45#define P_SPORT2_TFS P_UNDEF 43#define P_SPORT2_TFS P_UNDEF
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c
index ff3d747154ac..0ba25764b8c0 100644
--- a/arch/blackfin/kernel/irqchip.c
+++ b/arch/blackfin/kernel/irqchip.c
@@ -11,6 +11,7 @@
11#include <linux/kallsyms.h> 11#include <linux/kallsyms.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/seq_file.h>
14#include <asm/irq_handler.h> 15#include <asm/irq_handler.h>
15#include <asm/trace.h> 16#include <asm/trace.h>
16#include <asm/pda.h> 17#include <asm/pda.h>
@@ -33,37 +34,15 @@ static struct irq_desc bad_irq_desc = {
33#endif 34#endif
34 35
35#ifdef CONFIG_PROC_FS 36#ifdef CONFIG_PROC_FS
36int show_interrupts(struct seq_file *p, void *v) 37int arch_show_interrupts(struct seq_file *p, int prec)
37{ 38{
38 int i = *(loff_t *) v, j; 39 int j;
39 struct irqaction *action; 40
40 unsigned long flags; 41 seq_printf(p, "%*s: ", prec, "NMI");
41 42 for_each_online_cpu(j)
42 if (i < NR_IRQS) { 43 seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
43 struct irq_desc *desc = irq_to_desc(i); 44 seq_printf(p, " CORE Non Maskable Interrupt\n");
44 45 seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
45 raw_spin_lock_irqsave(&desc->lock, flags);
46 action = desc->action;
47 if (!action)
48 goto skip;
49 seq_printf(p, "%3d: ", i);
50 for_each_online_cpu(j)
51 seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
52 seq_printf(p, " %8s", irq_desc_get_chip(desc)->name);
53 seq_printf(p, " %s", action->name);
54 for (action = action->next; action; action = action->next)
55 seq_printf(p, " %s", action->name);
56
57 seq_putc(p, '\n');
58 skip:
59 raw_spin_unlock_irqrestore(&desc->lock, flags);
60 } else if (i == NR_IRQS) {
61 seq_printf(p, "NMI: ");
62 for_each_online_cpu(j)
63 seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
64 seq_printf(p, " CORE Non Maskable Interrupt\n");
65 seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count));
66 }
67 return 0; 46 return 0;
68} 47}
69#endif 48#endif
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
index f8047ca3b339..d022112927c2 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -36,7 +36,7 @@ const char bfin_board_name[] = "ADI BF518F-EZBRD";
36 * Driver needs to know address, irq and flag pin. 36 * Driver needs to know address, irq and flag pin.
37 */ 37 */
38 38
39#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 39#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
40static struct mtd_partition ezbrd_partitions[] = { 40static struct mtd_partition ezbrd_partitions[] = {
41 { 41 {
42 .name = "bootloader(nor)", 42 .name = "bootloader(nor)",
@@ -61,7 +61,7 @@ static struct physmap_flash_data ezbrd_flash_data = {
61 61
62static struct resource ezbrd_flash_resource = { 62static struct resource ezbrd_flash_resource = {
63 .start = 0x20000000, 63 .start = 0x20000000,
64#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 64#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
65 .end = 0x202fffff, 65 .end = 0x202fffff,
66#else 66#else
67 .end = 0x203fffff, 67 .end = 0x203fffff,
@@ -80,14 +80,14 @@ static struct platform_device ezbrd_flash_device = {
80}; 80};
81#endif 81#endif
82 82
83#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 83#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
84static struct platform_device rtc_device = { 84static struct platform_device rtc_device = {
85 .name = "rtc-bfin", 85 .name = "rtc-bfin",
86 .id = -1, 86 .id = -1,
87}; 87};
88#endif 88#endif
89 89
90#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 90#if IS_ENABLED(CONFIG_BFIN_MAC)
91#include <linux/bfin_mac.h> 91#include <linux/bfin_mac.h>
92static const unsigned short bfin_mac_peripherals[] = { 92static const unsigned short bfin_mac_peripherals[] = {
93 P_MII0_ETxD0, 93 P_MII0_ETxD0,
@@ -105,7 +105,7 @@ static const unsigned short bfin_mac_peripherals[] = {
105 105
106static struct bfin_phydev_platform_data bfin_phydev_data[] = { 106static struct bfin_phydev_platform_data bfin_phydev_data[] = {
107 { 107 {
108#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 108#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
109 .addr = 3, 109 .addr = 3,
110#else 110#else
111 .addr = 1, 111 .addr = 1,
@@ -119,7 +119,7 @@ static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
119 .phydev_data = bfin_phydev_data, 119 .phydev_data = bfin_phydev_data,
120 .phy_mode = PHY_INTERFACE_MODE_MII, 120 .phy_mode = PHY_INTERFACE_MODE_MII,
121 .mac_peripherals = bfin_mac_peripherals, 121 .mac_peripherals = bfin_mac_peripherals,
122#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 122#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
123 .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */ 123 .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */
124#endif 124#endif
125 .vlan1_mask = 1, 125 .vlan1_mask = 1,
@@ -140,7 +140,7 @@ static struct platform_device bfin_mac_device = {
140 } 140 }
141}; 141};
142 142
143#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 143#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
144static struct dsa_chip_data ksz8893m_switch_chip_data = { 144static struct dsa_chip_data ksz8893m_switch_chip_data = {
145 .mii_bus = &bfin_mii_bus.dev, 145 .mii_bus = &bfin_mii_bus.dev,
146 .port_names = { 146 .port_names = {
@@ -165,8 +165,7 @@ static struct platform_device ksz8893m_switch_device = {
165#endif 165#endif
166#endif 166#endif
167 167
168#if defined(CONFIG_MTD_M25P80) \ 168#if IS_ENABLED(CONFIG_MTD_M25P80)
169 || defined(CONFIG_MTD_M25P80_MODULE)
170static struct mtd_partition bfin_spi_flash_partitions[] = { 169static struct mtd_partition bfin_spi_flash_partitions[] = {
171 { 170 {
172 .name = "bootloader(spi)", 171 .name = "bootloader(spi)",
@@ -193,13 +192,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
193}; 192};
194#endif 193#endif
195 194
196#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 195#if IS_ENABLED(CONFIG_MMC_SPI)
197static struct bfin5xx_spi_chip mmc_spi_chip_info = { 196static struct bfin5xx_spi_chip mmc_spi_chip_info = {
198 .enable_dma = 0, 197 .enable_dma = 0,
199}; 198};
200#endif 199#endif
201 200
202#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 201#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
203static const struct ad7877_platform_data bfin_ad7877_ts_info = { 202static const struct ad7877_platform_data bfin_ad7877_ts_info = {
204 .model = 7877, 203 .model = 7877,
205 .vref_delay_usecs = 50, /* internal, no capacitor */ 204 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -216,8 +215,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
216#endif 215#endif
217 216
218static struct spi_board_info bfin_spi_board_info[] __initdata = { 217static struct spi_board_info bfin_spi_board_info[] __initdata = {
219#if defined(CONFIG_MTD_M25P80) \ 218#if IS_ENABLED(CONFIG_MTD_M25P80)
220 || defined(CONFIG_MTD_M25P80_MODULE)
221 { 219 {
222 /* the modalias must be the same as spi device driver name */ 220 /* the modalias must be the same as spi device driver name */
223 .modalias = "m25p80", /* Name of spi_driver for this device */ 221 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -230,9 +228,8 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
230 }, 228 },
231#endif 229#endif
232 230
233#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 231#if IS_ENABLED(CONFIG_BFIN_MAC)
234#if defined(CONFIG_NET_DSA_KSZ8893M) \ 232#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
235 || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
236 { 233 {
237 .modalias = "ksz8893m", 234 .modalias = "ksz8893m",
238 .max_speed_hz = 5000000, 235 .max_speed_hz = 5000000,
@@ -244,7 +241,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
244#endif 241#endif
245#endif 242#endif
246 243
247#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 244#if IS_ENABLED(CONFIG_MMC_SPI)
248 { 245 {
249 .modalias = "mmc_spi", 246 .modalias = "mmc_spi",
250 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 247 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
@@ -254,7 +251,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
254 .mode = SPI_MODE_3, 251 .mode = SPI_MODE_3,
255 }, 252 },
256#endif 253#endif
257#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 254#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
258 { 255 {
259 .modalias = "ad7877", 256 .modalias = "ad7877",
260 .platform_data = &bfin_ad7877_ts_info, 257 .platform_data = &bfin_ad7877_ts_info,
@@ -264,7 +261,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
264 .chip_select = 2, 261 .chip_select = 2,
265 }, 262 },
266#endif 263#endif
267#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 264#if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
268 && defined(CONFIG_SND_SOC_WM8731_SPI) 265 && defined(CONFIG_SND_SOC_WM8731_SPI)
269 { 266 {
270 .modalias = "wm8731", 267 .modalias = "wm8731",
@@ -274,7 +271,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
274 .mode = SPI_MODE_0, 271 .mode = SPI_MODE_0,
275 }, 272 },
276#endif 273#endif
277#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 274#if IS_ENABLED(CONFIG_SPI_SPIDEV)
278 { 275 {
279 .modalias = "spidev", 276 .modalias = "spidev",
280 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 277 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -282,7 +279,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
282 .chip_select = 1, 279 .chip_select = 1,
283 }, 280 },
284#endif 281#endif
285#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 282#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
286 { 283 {
287 .modalias = "bfin-lq035q1-spi", 284 .modalias = "bfin-lq035q1-spi",
288 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 285 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -294,7 +291,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
294}; 291};
295 292
296/* SPI controller data */ 293/* SPI controller data */
297#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 294#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
298/* SPI (0) */ 295/* SPI (0) */
299static struct bfin5xx_spi_master bfin_spi0_info = { 296static struct bfin5xx_spi_master bfin_spi0_info = {
300 .num_chipselect = 6, 297 .num_chipselect = 6,
@@ -366,7 +363,7 @@ static struct platform_device bfin_spi1_device = {
366}; 363};
367#endif /* spi master and devices */ 364#endif /* spi master and devices */
368 365
369#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 366#if IS_ENABLED(CONFIG_SERIAL_BFIN)
370#ifdef CONFIG_SERIAL_BFIN_UART0 367#ifdef CONFIG_SERIAL_BFIN_UART0
371static struct resource bfin_uart0_resources[] = { 368static struct resource bfin_uart0_resources[] = {
372 { 369 {
@@ -465,7 +462,7 @@ static struct platform_device bfin_uart1_device = {
465#endif 462#endif
466#endif 463#endif
467 464
468#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 465#if IS_ENABLED(CONFIG_BFIN_SIR)
469#ifdef CONFIG_BFIN_SIR0 466#ifdef CONFIG_BFIN_SIR0
470static struct resource bfin_sir0_resources[] = { 467static struct resource bfin_sir0_resources[] = {
471 { 468 {
@@ -520,7 +517,7 @@ static struct platform_device bfin_sir1_device = {
520#endif 517#endif
521#endif 518#endif
522 519
523#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 520#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
524static struct platform_device bfin_i2s = { 521static struct platform_device bfin_i2s = {
525 .name = "bfin-i2s", 522 .name = "bfin-i2s",
526 .id = CONFIG_SND_BF5XX_SPORT_NUM, 523 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -528,7 +525,7 @@ static struct platform_device bfin_i2s = {
528}; 525};
529#endif 526#endif
530 527
531#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 528#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
532static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 529static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
533 530
534static struct resource bfin_twi0_resource[] = { 531static struct resource bfin_twi0_resource[] = {
@@ -556,25 +553,25 @@ static struct platform_device i2c_bfin_twi_device = {
556#endif 553#endif
557 554
558static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 555static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
559#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 556#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
560 { 557 {
561 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 558 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
562 }, 559 },
563#endif 560#endif
564#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 561#if IS_ENABLED(CONFIG_INPUT_PCF8574)
565 { 562 {
566 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 563 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
567 .irq = IRQ_PF8, 564 .irq = IRQ_PF8,
568 }, 565 },
569#endif 566#endif
570#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 567#if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
571 { 568 {
572 I2C_BOARD_INFO("ssm2602", 0x1b), 569 I2C_BOARD_INFO("ssm2602", 0x1b),
573 }, 570 },
574#endif 571#endif
575}; 572};
576 573
577#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 574#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
578#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 575#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
579static struct resource bfin_sport0_uart_resources[] = { 576static struct resource bfin_sport0_uart_resources[] = {
580 { 577 {
@@ -645,7 +642,7 @@ static struct platform_device bfin_sport1_uart_device = {
645#endif 642#endif
646#endif 643#endif
647 644
648#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 645#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
649#include <linux/input.h> 646#include <linux/input.h>
650#include <linux/gpio_keys.h> 647#include <linux/gpio_keys.h>
651 648
@@ -667,7 +664,7 @@ static struct platform_device bfin_device_gpiokeys = {
667}; 664};
668#endif 665#endif
669 666
670#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 667#if IS_ENABLED(CONFIG_SDH_BFIN)
671 668
672static struct bfin_sd_host bfin_sdh_data = { 669static struct bfin_sd_host bfin_sdh_data = {
673 .dma_chan = CH_RSI, 670 .dma_chan = CH_RSI,
@@ -710,24 +707,24 @@ static struct platform_device *stamp_devices[] __initdata = {
710 707
711 &bfin_dpmc, 708 &bfin_dpmc,
712 709
713#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 710#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
714 &rtc_device, 711 &rtc_device,
715#endif 712#endif
716 713
717#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 714#if IS_ENABLED(CONFIG_BFIN_MAC)
718 &bfin_mii_bus, 715 &bfin_mii_bus,
719 &bfin_mac_device, 716 &bfin_mac_device,
720#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 717#if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
721 &ksz8893m_switch_device, 718 &ksz8893m_switch_device,
722#endif 719#endif
723#endif 720#endif
724 721
725#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 722#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
726 &bfin_spi0_device, 723 &bfin_spi0_device,
727 &bfin_spi1_device, 724 &bfin_spi1_device,
728#endif 725#endif
729 726
730#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 727#if IS_ENABLED(CONFIG_SERIAL_BFIN)
731#ifdef CONFIG_SERIAL_BFIN_UART0 728#ifdef CONFIG_SERIAL_BFIN_UART0
732 &bfin_uart0_device, 729 &bfin_uart0_device,
733#endif 730#endif
@@ -736,7 +733,7 @@ static struct platform_device *stamp_devices[] __initdata = {
736#endif 733#endif
737#endif 734#endif
738 735
739#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 736#if IS_ENABLED(CONFIG_BFIN_SIR)
740#ifdef CONFIG_BFIN_SIR0 737#ifdef CONFIG_BFIN_SIR0
741 &bfin_sir0_device, 738 &bfin_sir0_device,
742#endif 739#endif
@@ -745,15 +742,15 @@ static struct platform_device *stamp_devices[] __initdata = {
745#endif 742#endif
746#endif 743#endif
747 744
748#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 745#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
749 &i2c_bfin_twi_device, 746 &i2c_bfin_twi_device,
750#endif 747#endif
751 748
752#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 749#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
753 &bfin_i2s, 750 &bfin_i2s,
754#endif 751#endif
755 752
756#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 753#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
757#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 754#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
758 &bfin_sport0_uart_device, 755 &bfin_sport0_uart_device,
759#endif 756#endif
@@ -762,15 +759,15 @@ static struct platform_device *stamp_devices[] __initdata = {
762#endif 759#endif
763#endif 760#endif
764 761
765#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 762#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
766 &bfin_device_gpiokeys, 763 &bfin_device_gpiokeys,
767#endif 764#endif
768 765
769#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 766#if IS_ENABLED(CONFIG_SDH_BFIN)
770 &bf51x_sdh_device, 767 &bf51x_sdh_device,
771#endif 768#endif
772 769
773#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 770#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
774 &ezbrd_flash_device, 771 &ezbrd_flash_device,
775#endif 772#endif
776}; 773};
@@ -784,7 +781,7 @@ static int __init ezbrd_init(void)
784 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 781 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
785 /* setup BF518-EZBRD GPIO pin PG11 to AMS2, PG15 to AMS3. */ 782 /* setup BF518-EZBRD GPIO pin PG11 to AMS2, PG15 to AMS3. */
786 peripheral_request(P_AMS2, "ParaFlash"); 783 peripheral_request(P_AMS2, "ParaFlash");
787#if !defined(CONFIG_SPI_BFIN5XX) && !defined(CONFIG_SPI_BFIN5XX_MODULE) 784#if !IS_ENABLED(CONFIG_SPI_BFIN5XX)
788 peripheral_request(P_AMS3, "ParaFlash"); 785 peripheral_request(P_AMS3, "ParaFlash");
789#endif 786#endif
790 return 0; 787 return 0;
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index 0bedc737566b..240d5cb1f02c 100644
--- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
+++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
@@ -36,7 +36,7 @@ const char bfin_board_name[] = "Bluetechnix TCM-BF518";
36 * Driver needs to know address, irq and flag pin. 36 * Driver needs to know address, irq and flag pin.
37 */ 37 */
38 38
39#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 39#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
40static struct mtd_partition tcm_partitions[] = { 40static struct mtd_partition tcm_partitions[] = {
41 { 41 {
42 .name = "bootloader(nor)", 42 .name = "bootloader(nor)",
@@ -73,14 +73,14 @@ static struct platform_device tcm_flash_device = {
73}; 73};
74#endif 74#endif
75 75
76#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 76#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
77static struct platform_device rtc_device = { 77static struct platform_device rtc_device = {
78 .name = "rtc-bfin", 78 .name = "rtc-bfin",
79 .id = -1, 79 .id = -1,
80}; 80};
81#endif 81#endif
82 82
83#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 83#if IS_ENABLED(CONFIG_BFIN_MAC)
84#include <linux/bfin_mac.h> 84#include <linux/bfin_mac.h>
85static const unsigned short bfin_mac_peripherals[] = P_MII0; 85static const unsigned short bfin_mac_peripherals[] = P_MII0;
86 86
@@ -113,8 +113,7 @@ static struct platform_device bfin_mac_device = {
113}; 113};
114#endif 114#endif
115 115
116#if defined(CONFIG_MTD_M25P80) \ 116#if IS_ENABLED(CONFIG_MTD_M25P80)
117 || defined(CONFIG_MTD_M25P80_MODULE)
118static struct mtd_partition bfin_spi_flash_partitions[] = { 117static struct mtd_partition bfin_spi_flash_partitions[] = {
119 { 118 {
120 .name = "bootloader(spi)", 119 .name = "bootloader(spi)",
@@ -141,13 +140,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
141}; 140};
142#endif 141#endif
143 142
144#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 143#if IS_ENABLED(CONFIG_MMC_SPI)
145static struct bfin5xx_spi_chip mmc_spi_chip_info = { 144static struct bfin5xx_spi_chip mmc_spi_chip_info = {
146 .enable_dma = 0, 145 .enable_dma = 0,
147}; 146};
148#endif 147#endif
149 148
150#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 149#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
151static const struct ad7877_platform_data bfin_ad7877_ts_info = { 150static const struct ad7877_platform_data bfin_ad7877_ts_info = {
152 .model = 7877, 151 .model = 7877,
153 .vref_delay_usecs = 50, /* internal, no capacitor */ 152 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -164,8 +163,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
164#endif 163#endif
165 164
166static struct spi_board_info bfin_spi_board_info[] __initdata = { 165static struct spi_board_info bfin_spi_board_info[] __initdata = {
167#if defined(CONFIG_MTD_M25P80) \ 166#if IS_ENABLED(CONFIG_MTD_M25P80)
168 || defined(CONFIG_MTD_M25P80_MODULE)
169 { 167 {
170 /* the modalias must be the same as spi device driver name */ 168 /* the modalias must be the same as spi device driver name */
171 .modalias = "m25p80", /* Name of spi_driver for this device */ 169 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -178,7 +176,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
178 }, 176 },
179#endif 177#endif
180 178
181#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 179#if IS_ENABLED(CONFIG_MMC_SPI)
182 { 180 {
183 .modalias = "mmc_spi", 181 .modalias = "mmc_spi",
184 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 182 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -188,7 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
188 .mode = SPI_MODE_3, 186 .mode = SPI_MODE_3,
189 }, 187 },
190#endif 188#endif
191#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 189#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
192 { 190 {
193 .modalias = "ad7877", 191 .modalias = "ad7877",
194 .platform_data = &bfin_ad7877_ts_info, 192 .platform_data = &bfin_ad7877_ts_info,
@@ -198,7 +196,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
198 .chip_select = 2, 196 .chip_select = 2,
199 }, 197 },
200#endif 198#endif
201#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 199#if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
202 && defined(CONFIG_SND_SOC_WM8731_SPI) 200 && defined(CONFIG_SND_SOC_WM8731_SPI)
203 { 201 {
204 .modalias = "wm8731", 202 .modalias = "wm8731",
@@ -208,7 +206,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
208 .mode = SPI_MODE_0, 206 .mode = SPI_MODE_0,
209 }, 207 },
210#endif 208#endif
211#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 209#if IS_ENABLED(CONFIG_SPI_SPIDEV)
212 { 210 {
213 .modalias = "spidev", 211 .modalias = "spidev",
214 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 212 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -216,7 +214,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
216 .chip_select = 1, 214 .chip_select = 1,
217 }, 215 },
218#endif 216#endif
219#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 217#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
220 { 218 {
221 .modalias = "bfin-lq035q1-spi", 219 .modalias = "bfin-lq035q1-spi",
222 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 220 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -228,7 +226,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
228}; 226};
229 227
230/* SPI controller data */ 228/* SPI controller data */
231#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 229#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
232/* SPI (0) */ 230/* SPI (0) */
233static struct bfin5xx_spi_master bfin_spi0_info = { 231static struct bfin5xx_spi_master bfin_spi0_info = {
234 .num_chipselect = 6, 232 .num_chipselect = 6,
@@ -300,7 +298,7 @@ static struct platform_device bfin_spi1_device = {
300}; 298};
301#endif /* spi master and devices */ 299#endif /* spi master and devices */
302 300
303#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 301#if IS_ENABLED(CONFIG_SERIAL_BFIN)
304#ifdef CONFIG_SERIAL_BFIN_UART0 302#ifdef CONFIG_SERIAL_BFIN_UART0
305static struct resource bfin_uart0_resources[] = { 303static struct resource bfin_uart0_resources[] = {
306 { 304 {
@@ -399,7 +397,7 @@ static struct platform_device bfin_uart1_device = {
399#endif 397#endif
400#endif 398#endif
401 399
402#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 400#if IS_ENABLED(CONFIG_BFIN_SIR)
403#ifdef CONFIG_BFIN_SIR0 401#ifdef CONFIG_BFIN_SIR0
404static struct resource bfin_sir0_resources[] = { 402static struct resource bfin_sir0_resources[] = {
405 { 403 {
@@ -454,7 +452,7 @@ static struct platform_device bfin_sir1_device = {
454#endif 452#endif
455#endif 453#endif
456 454
457#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 455#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
458static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 456static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
459 457
460static struct resource bfin_twi0_resource[] = { 458static struct resource bfin_twi0_resource[] = {
@@ -482,12 +480,12 @@ static struct platform_device i2c_bfin_twi_device = {
482#endif 480#endif
483 481
484static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 482static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
485#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 483#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
486 { 484 {
487 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 485 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
488 }, 486 },
489#endif 487#endif
490#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 488#if IS_ENABLED(CONFIG_INPUT_PCF8574)
491 { 489 {
492 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 490 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
493 .irq = IRQ_PF8, 491 .irq = IRQ_PF8,
@@ -495,7 +493,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
495#endif 493#endif
496}; 494};
497 495
498#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 496#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
499#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 497#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
500static struct resource bfin_sport0_uart_resources[] = { 498static struct resource bfin_sport0_uart_resources[] = {
501 { 499 {
@@ -566,7 +564,7 @@ static struct platform_device bfin_sport1_uart_device = {
566#endif 564#endif
567#endif 565#endif
568 566
569#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 567#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
570#include <linux/input.h> 568#include <linux/input.h>
571#include <linux/gpio_keys.h> 569#include <linux/gpio_keys.h>
572 570
@@ -588,7 +586,7 @@ static struct platform_device bfin_device_gpiokeys = {
588}; 586};
589#endif 587#endif
590 588
591#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 589#if IS_ENABLED(CONFIG_SDH_BFIN)
592 590
593static struct bfin_sd_host bfin_sdh_data = { 591static struct bfin_sd_host bfin_sdh_data = {
594 .dma_chan = CH_RSI, 592 .dma_chan = CH_RSI,
@@ -631,21 +629,21 @@ static struct platform_device *tcm_devices[] __initdata = {
631 629
632 &bfin_dpmc, 630 &bfin_dpmc,
633 631
634#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 632#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
635 &rtc_device, 633 &rtc_device,
636#endif 634#endif
637 635
638#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 636#if IS_ENABLED(CONFIG_BFIN_MAC)
639 &bfin_mii_bus, 637 &bfin_mii_bus,
640 &bfin_mac_device, 638 &bfin_mac_device,
641#endif 639#endif
642 640
643#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 641#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
644 &bfin_spi0_device, 642 &bfin_spi0_device,
645 &bfin_spi1_device, 643 &bfin_spi1_device,
646#endif 644#endif
647 645
648#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 646#if IS_ENABLED(CONFIG_SERIAL_BFIN)
649#ifdef CONFIG_SERIAL_BFIN_UART0 647#ifdef CONFIG_SERIAL_BFIN_UART0
650 &bfin_uart0_device, 648 &bfin_uart0_device,
651#endif 649#endif
@@ -654,7 +652,7 @@ static struct platform_device *tcm_devices[] __initdata = {
654#endif 652#endif
655#endif 653#endif
656 654
657#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 655#if IS_ENABLED(CONFIG_BFIN_SIR)
658#ifdef CONFIG_BFIN_SIR0 656#ifdef CONFIG_BFIN_SIR0
659 &bfin_sir0_device, 657 &bfin_sir0_device,
660#endif 658#endif
@@ -663,11 +661,11 @@ static struct platform_device *tcm_devices[] __initdata = {
663#endif 661#endif
664#endif 662#endif
665 663
666#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 664#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
667 &i2c_bfin_twi_device, 665 &i2c_bfin_twi_device,
668#endif 666#endif
669 667
670#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 668#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
671#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 669#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
672 &bfin_sport0_uart_device, 670 &bfin_sport0_uart_device,
673#endif 671#endif
@@ -676,15 +674,15 @@ static struct platform_device *tcm_devices[] __initdata = {
676#endif 674#endif
677#endif 675#endif
678 676
679#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 677#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
680 &bfin_device_gpiokeys, 678 &bfin_device_gpiokeys,
681#endif 679#endif
682 680
683#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 681#if IS_ENABLED(CONFIG_SDH_BFIN)
684 &bf51x_sdh_device, 682 &bf51x_sdh_device,
685#endif 683#endif
686 684
687#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 685#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
688 &tcm_flash_device, 686 &tcm_flash_device,
689#endif 687#endif
690}; 688};
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index 1e7be62fccb6..9501bd8d9cd1 100644
--- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -37,7 +37,7 @@ const char bfin_board_name[] = "ADI BF527-AD7160EVAL";
37 * Driver needs to know address, irq and flag pin. 37 * Driver needs to know address, irq and flag pin.
38 */ 38 */
39 39
40#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 40#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
41static struct resource musb_resources[] = { 41static struct resource musb_resources[] = {
42 [0] = { 42 [0] = {
43 .start = 0xffc03800, 43 .start = 0xffc03800,
@@ -97,7 +97,7 @@ static struct platform_device musb_device = {
97}; 97};
98#endif 98#endif
99 99
100#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) 100#if IS_ENABLED(CONFIG_FB_BFIN_RA158Z)
101static struct resource bf52x_ra158z_resources[] = { 101static struct resource bf52x_ra158z_resources[] = {
102 { 102 {
103 .start = IRQ_PPI_ERROR, 103 .start = IRQ_PPI_ERROR,
@@ -114,7 +114,7 @@ static struct platform_device bf52x_ra158z_device = {
114}; 114};
115#endif 115#endif
116 116
117#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 117#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
118static struct mtd_partition ad7160eval_partitions[] = { 118static struct mtd_partition ad7160eval_partitions[] = {
119 { 119 {
120 .name = "bootloader(nor)", 120 .name = "bootloader(nor)",
@@ -154,7 +154,7 @@ static struct platform_device ad7160eval_flash_device = {
154}; 154};
155#endif 155#endif
156 156
157#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 157#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
158static struct mtd_partition partition_info[] = { 158static struct mtd_partition partition_info[] = {
159 { 159 {
160 .name = "linux kernel(nand)", 160 .name = "linux kernel(nand)",
@@ -200,14 +200,14 @@ static struct platform_device bf5xx_nand_device = {
200}; 200};
201#endif 201#endif
202 202
203#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 203#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
204static struct platform_device rtc_device = { 204static struct platform_device rtc_device = {
205 .name = "rtc-bfin", 205 .name = "rtc-bfin",
206 .id = -1, 206 .id = -1,
207}; 207};
208#endif 208#endif
209 209
210#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 210#if IS_ENABLED(CONFIG_BFIN_MAC)
211#include <linux/bfin_mac.h> 211#include <linux/bfin_mac.h>
212static const unsigned short bfin_mac_peripherals[] = P_RMII0; 212static const unsigned short bfin_mac_peripherals[] = P_RMII0;
213 213
@@ -241,8 +241,7 @@ static struct platform_device bfin_mac_device = {
241#endif 241#endif
242 242
243 243
244#if defined(CONFIG_MTD_M25P80) \ 244#if IS_ENABLED(CONFIG_MTD_M25P80)
245 || defined(CONFIG_MTD_M25P80_MODULE)
246static struct mtd_partition bfin_spi_flash_partitions[] = { 245static struct mtd_partition bfin_spi_flash_partitions[] = {
247 { 246 {
248 .name = "bootloader(spi)", 247 .name = "bootloader(spi)",
@@ -269,13 +268,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
269}; 268};
270#endif 269#endif
271 270
272#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 271#if IS_ENABLED(CONFIG_MMC_SPI)
273static struct bfin5xx_spi_chip mmc_spi_chip_info = { 272static struct bfin5xx_spi_chip mmc_spi_chip_info = {
274 .enable_dma = 0, 273 .enable_dma = 0,
275}; 274};
276#endif 275#endif
277 276
278#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 277#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
279static struct platform_device bfin_i2s = { 278static struct platform_device bfin_i2s = {
280 .name = "bfin-i2s", 279 .name = "bfin-i2s",
281 .id = CONFIG_SND_BF5XX_SPORT_NUM, 280 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -284,8 +283,7 @@ static struct platform_device bfin_i2s = {
284#endif 283#endif
285 284
286static struct spi_board_info bfin_spi_board_info[] __initdata = { 285static struct spi_board_info bfin_spi_board_info[] __initdata = {
287#if defined(CONFIG_MTD_M25P80) \ 286#if IS_ENABLED(CONFIG_MTD_M25P80)
288 || defined(CONFIG_MTD_M25P80_MODULE)
289 { 287 {
290 /* the modalias must be the same as spi device driver name */ 288 /* the modalias must be the same as spi device driver name */
291 .modalias = "m25p80", /* Name of spi_driver for this device */ 289 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -297,8 +295,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
297 .mode = SPI_MODE_3, 295 .mode = SPI_MODE_3,
298 }, 296 },
299#endif 297#endif
300#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 298#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
301 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
302 { 299 {
303 .modalias = "ad183x", 300 .modalias = "ad183x",
304 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 301 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -306,7 +303,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
306 .chip_select = 4, 303 .chip_select = 4,
307 }, 304 },
308#endif 305#endif
309#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 306#if IS_ENABLED(CONFIG_MMC_SPI)
310 { 307 {
311 .modalias = "mmc_spi", 308 .modalias = "mmc_spi",
312 .max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */ 309 .max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */
@@ -316,7 +313,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
316 .mode = SPI_MODE_3, 313 .mode = SPI_MODE_3,
317 }, 314 },
318#endif 315#endif
319#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 316#if IS_ENABLED(CONFIG_SPI_SPIDEV)
320 { 317 {
321 .modalias = "spidev", 318 .modalias = "spidev",
322 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 319 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -326,7 +323,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
326#endif 323#endif
327}; 324};
328 325
329#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 326#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
330/* SPI controller data */ 327/* SPI controller data */
331static struct bfin5xx_spi_master bfin_spi0_info = { 328static struct bfin5xx_spi_master bfin_spi0_info = {
332 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, 329 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
@@ -364,7 +361,7 @@ static struct platform_device bfin_spi0_device = {
364}; 361};
365#endif /* spi master and devices */ 362#endif /* spi master and devices */
366 363
367#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 364#if IS_ENABLED(CONFIG_SERIAL_BFIN)
368#ifdef CONFIG_SERIAL_BFIN_UART0 365#ifdef CONFIG_SERIAL_BFIN_UART0
369static struct resource bfin_uart0_resources[] = { 366static struct resource bfin_uart0_resources[] = {
370 { 367 {
@@ -475,7 +472,7 @@ static struct platform_device bfin_uart1_device = {
475#endif 472#endif
476#endif 473#endif
477 474
478#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 475#if IS_ENABLED(CONFIG_BFIN_SIR)
479#ifdef CONFIG_BFIN_SIR0 476#ifdef CONFIG_BFIN_SIR0
480static struct resource bfin_sir0_resources[] = { 477static struct resource bfin_sir0_resources[] = {
481 { 478 {
@@ -530,7 +527,7 @@ static struct platform_device bfin_sir1_device = {
530#endif 527#endif
531#endif 528#endif
532 529
533#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) 530#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160)
534#include <linux/input/ad7160.h> 531#include <linux/input/ad7160.h>
535static const struct ad7160_platform_data bfin_ad7160_ts_info = { 532static const struct ad7160_platform_data bfin_ad7160_ts_info = {
536 .sensor_x_res = 854, 533 .sensor_x_res = 854,
@@ -560,7 +557,7 @@ static const struct ad7160_platform_data bfin_ad7160_ts_info = {
560}; 557};
561#endif 558#endif
562 559
563#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 560#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
564static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 561static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
565 562
566static struct resource bfin_twi0_resource[] = { 563static struct resource bfin_twi0_resource[] = {
@@ -588,7 +585,7 @@ static struct platform_device i2c_bfin_twi_device = {
588#endif 585#endif
589 586
590static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 587static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
591#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) 588#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160)
592 { 589 {
593 I2C_BOARD_INFO("ad7160", 0x33), 590 I2C_BOARD_INFO("ad7160", 0x33),
594 .irq = IRQ_PH1, 591 .irq = IRQ_PH1,
@@ -597,7 +594,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
597#endif 594#endif
598}; 595};
599 596
600#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 597#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
601#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 598#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
602static struct resource bfin_sport0_uart_resources[] = { 599static struct resource bfin_sport0_uart_resources[] = {
603 { 600 {
@@ -668,7 +665,7 @@ static struct platform_device bfin_sport1_uart_device = {
668#endif 665#endif
669#endif 666#endif
670 667
671#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 668#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
672#include <asm/bfin_rotary.h> 669#include <asm/bfin_rotary.h>
673 670
674static struct bfin_rotary_platform_data bfin_rotary_data = { 671static struct bfin_rotary_platform_data bfin_rotary_data = {
@@ -725,28 +722,28 @@ static struct platform_device *stamp_devices[] __initdata = {
725 722
726 &bfin_dpmc, 723 &bfin_dpmc,
727 724
728#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 725#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
729 &bf5xx_nand_device, 726 &bf5xx_nand_device,
730#endif 727#endif
731 728
732#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 729#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
733 &rtc_device, 730 &rtc_device,
734#endif 731#endif
735 732
736#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 733#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
737 &musb_device, 734 &musb_device,
738#endif 735#endif
739 736
740#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 737#if IS_ENABLED(CONFIG_BFIN_MAC)
741 &bfin_mii_bus, 738 &bfin_mii_bus,
742 &bfin_mac_device, 739 &bfin_mac_device,
743#endif 740#endif
744 741
745#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 742#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
746 &bfin_spi0_device, 743 &bfin_spi0_device,
747#endif 744#endif
748 745
749#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 746#if IS_ENABLED(CONFIG_SERIAL_BFIN)
750#ifdef CONFIG_SERIAL_BFIN_UART0 747#ifdef CONFIG_SERIAL_BFIN_UART0
751 &bfin_uart0_device, 748 &bfin_uart0_device,
752#endif 749#endif
@@ -755,11 +752,11 @@ static struct platform_device *stamp_devices[] __initdata = {
755#endif 752#endif
756#endif 753#endif
757 754
758#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) 755#if IS_ENABLED(CONFIG_FB_BFIN_RA158Z)
759 &bf52x_ra158z_device, 756 &bf52x_ra158z_device,
760#endif 757#endif
761 758
762#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 759#if IS_ENABLED(CONFIG_BFIN_SIR)
763#ifdef CONFIG_BFIN_SIR0 760#ifdef CONFIG_BFIN_SIR0
764 &bfin_sir0_device, 761 &bfin_sir0_device,
765#endif 762#endif
@@ -768,11 +765,11 @@ static struct platform_device *stamp_devices[] __initdata = {
768#endif 765#endif
769#endif 766#endif
770 767
771#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 768#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
772 &i2c_bfin_twi_device, 769 &i2c_bfin_twi_device,
773#endif 770#endif
774 771
775#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 772#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
776#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 773#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
777 &bfin_sport0_uart_device, 774 &bfin_sport0_uart_device,
778#endif 775#endif
@@ -781,15 +778,15 @@ static struct platform_device *stamp_devices[] __initdata = {
781#endif 778#endif
782#endif 779#endif
783 780
784#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 781#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
785 &bfin_rotary_device, 782 &bfin_rotary_device,
786#endif 783#endif
787 784
788#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 785#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
789 &ad7160eval_flash_device, 786 &ad7160eval_flash_device,
790#endif 787#endif
791 788
792#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 789#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
793 &bfin_i2s, 790 &bfin_i2s,
794#endif 791#endif
795}; 792};
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 413d0132b66f..b1004b35db36 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -37,7 +37,7 @@ const char bfin_board_name[] = "Bluetechnix CM-BF527";
37 * Driver needs to know address, irq and flag pin. 37 * Driver needs to know address, irq and flag pin.
38 */ 38 */
39 39
40#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 40#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
41#include <linux/usb/isp1760.h> 41#include <linux/usb/isp1760.h>
42static struct resource bfin_isp1760_resources[] = { 42static struct resource bfin_isp1760_resources[] = {
43 [0] = { 43 [0] = {
@@ -72,7 +72,7 @@ static struct platform_device bfin_isp1760_device = {
72}; 72};
73#endif 73#endif
74 74
75#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 75#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
76static struct resource musb_resources[] = { 76static struct resource musb_resources[] = {
77 [0] = { 77 [0] = {
78 .start = 0xffc03800, 78 .start = 0xffc03800,
@@ -134,7 +134,7 @@ static struct platform_device musb_device = {
134}; 134};
135#endif 135#endif
136 136
137#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 137#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
138static struct mtd_partition partition_info[] = { 138static struct mtd_partition partition_info[] = {
139 { 139 {
140 .name = "linux kernel(nand)", 140 .name = "linux kernel(nand)",
@@ -180,7 +180,7 @@ static struct platform_device bf5xx_nand_device = {
180}; 180};
181#endif 181#endif
182 182
183#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 183#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
184static struct resource bfin_pcmcia_cf_resources[] = { 184static struct resource bfin_pcmcia_cf_resources[] = {
185 { 185 {
186 .start = 0x20310000, /* IO PORT */ 186 .start = 0x20310000, /* IO PORT */
@@ -209,14 +209,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
209}; 209};
210#endif 210#endif
211 211
212#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 212#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
213static struct platform_device rtc_device = { 213static struct platform_device rtc_device = {
214 .name = "rtc-bfin", 214 .name = "rtc-bfin",
215 .id = -1, 215 .id = -1,
216}; 216};
217#endif 217#endif
218 218
219#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 219#if IS_ENABLED(CONFIG_SMC91X)
220#include <linux/smc91x.h> 220#include <linux/smc91x.h>
221 221
222static struct smc91x_platdata smc91x_info = { 222static struct smc91x_platdata smc91x_info = {
@@ -249,7 +249,7 @@ static struct platform_device smc91x_device = {
249}; 249};
250#endif 250#endif
251 251
252#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 252#if IS_ENABLED(CONFIG_DM9000)
253static struct resource dm9000_resources[] = { 253static struct resource dm9000_resources[] = {
254 [0] = { 254 [0] = {
255 .start = 0x203FB800, 255 .start = 0x203FB800,
@@ -276,7 +276,7 @@ static struct platform_device dm9000_device = {
276}; 276};
277#endif 277#endif
278 278
279#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 279#if IS_ENABLED(CONFIG_BFIN_MAC)
280#include <linux/bfin_mac.h> 280#include <linux/bfin_mac.h>
281static const unsigned short bfin_mac_peripherals[] = P_RMII0; 281static const unsigned short bfin_mac_peripherals[] = P_RMII0;
282 282
@@ -309,7 +309,7 @@ static struct platform_device bfin_mac_device = {
309}; 309};
310#endif 310#endif
311 311
312#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 312#if IS_ENABLED(CONFIG_USB_NET2272)
313static struct resource net2272_bfin_resources[] = { 313static struct resource net2272_bfin_resources[] = {
314 { 314 {
315 .start = 0x20300000, 315 .start = 0x20300000,
@@ -330,8 +330,7 @@ static struct platform_device net2272_bfin_device = {
330}; 330};
331#endif 331#endif
332 332
333#if defined(CONFIG_MTD_M25P80) \ 333#if IS_ENABLED(CONFIG_MTD_M25P80)
334 || defined(CONFIG_MTD_M25P80_MODULE)
335static struct mtd_partition bfin_spi_flash_partitions[] = { 334static struct mtd_partition bfin_spi_flash_partitions[] = {
336 { 335 {
337 .name = "bootloader(spi)", 336 .name = "bootloader(spi)",
@@ -358,13 +357,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
358}; 357};
359#endif 358#endif
360 359
361#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 360#if IS_ENABLED(CONFIG_MMC_SPI)
362static struct bfin5xx_spi_chip mmc_spi_chip_info = { 361static struct bfin5xx_spi_chip mmc_spi_chip_info = {
363 .enable_dma = 0, 362 .enable_dma = 0,
364}; 363};
365#endif 364#endif
366 365
367#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 366#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
368static const struct ad7877_platform_data bfin_ad7877_ts_info = { 367static const struct ad7877_platform_data bfin_ad7877_ts_info = {
369 .model = 7877, 368 .model = 7877,
370 .vref_delay_usecs = 50, /* internal, no capacitor */ 369 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -381,8 +380,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
381#endif 380#endif
382 381
383static struct spi_board_info bfin_spi_board_info[] __initdata = { 382static struct spi_board_info bfin_spi_board_info[] __initdata = {
384#if defined(CONFIG_MTD_M25P80) \ 383#if IS_ENABLED(CONFIG_MTD_M25P80)
385 || defined(CONFIG_MTD_M25P80_MODULE)
386 { 384 {
387 /* the modalias must be the same as spi device driver name */ 385 /* the modalias must be the same as spi device driver name */
388 .modalias = "m25p80", /* Name of spi_driver for this device */ 386 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -395,8 +393,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
395 }, 393 },
396#endif 394#endif
397 395
398#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 396#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
399 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
400 { 397 {
401 .modalias = "ad183x", 398 .modalias = "ad183x",
402 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 399 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -404,7 +401,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
404 .chip_select = 4, 401 .chip_select = 4,
405 }, 402 },
406#endif 403#endif
407#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 404#if IS_ENABLED(CONFIG_MMC_SPI)
408 { 405 {
409 .modalias = "mmc_spi", 406 .modalias = "mmc_spi",
410 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 407 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -414,7 +411,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
414 .mode = SPI_MODE_3, 411 .mode = SPI_MODE_3,
415 }, 412 },
416#endif 413#endif
417#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 414#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
418 { 415 {
419 .modalias = "ad7877", 416 .modalias = "ad7877",
420 .platform_data = &bfin_ad7877_ts_info, 417 .platform_data = &bfin_ad7877_ts_info,
@@ -424,7 +421,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
424 .chip_select = 2, 421 .chip_select = 2,
425 }, 422 },
426#endif 423#endif
427#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 424#if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
428 && defined(CONFIG_SND_SOC_WM8731_SPI) 425 && defined(CONFIG_SND_SOC_WM8731_SPI)
429 { 426 {
430 .modalias = "wm8731", 427 .modalias = "wm8731",
@@ -434,7 +431,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
434 .mode = SPI_MODE_0, 431 .mode = SPI_MODE_0,
435 }, 432 },
436#endif 433#endif
437#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 434#if IS_ENABLED(CONFIG_SPI_SPIDEV)
438 { 435 {
439 .modalias = "spidev", 436 .modalias = "spidev",
440 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 437 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -444,7 +441,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
444#endif 441#endif
445}; 442};
446 443
447#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 444#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
448/* SPI controller data */ 445/* SPI controller data */
449static struct bfin5xx_spi_master bfin_spi0_info = { 446static struct bfin5xx_spi_master bfin_spi0_info = {
450 .num_chipselect = 8, 447 .num_chipselect = 8,
@@ -482,7 +479,7 @@ static struct platform_device bfin_spi0_device = {
482}; 479};
483#endif /* spi master and devices */ 480#endif /* spi master and devices */
484 481
485#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 482#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
486static struct mtd_partition cm_partitions[] = { 483static struct mtd_partition cm_partitions[] = {
487 { 484 {
488 .name = "bootloader(nor)", 485 .name = "bootloader(nor)",
@@ -531,7 +528,7 @@ static struct platform_device cm_flash_device = {
531}; 528};
532#endif 529#endif
533 530
534#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 531#if IS_ENABLED(CONFIG_SERIAL_BFIN)
535#ifdef CONFIG_SERIAL_BFIN_UART0 532#ifdef CONFIG_SERIAL_BFIN_UART0
536static struct resource bfin_uart0_resources[] = { 533static struct resource bfin_uart0_resources[] = {
537 { 534 {
@@ -642,7 +639,7 @@ static struct platform_device bfin_uart1_device = {
642#endif 639#endif
643#endif 640#endif
644 641
645#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 642#if IS_ENABLED(CONFIG_BFIN_SIR)
646#ifdef CONFIG_BFIN_SIR0 643#ifdef CONFIG_BFIN_SIR0
647static struct resource bfin_sir0_resources[] = { 644static struct resource bfin_sir0_resources[] = {
648 { 645 {
@@ -697,7 +694,7 @@ static struct platform_device bfin_sir1_device = {
697#endif 694#endif
698#endif 695#endif
699 696
700#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 697#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
701static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 698static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
702 699
703static struct resource bfin_twi0_resource[] = { 700static struct resource bfin_twi0_resource[] = {
@@ -725,25 +722,25 @@ static struct platform_device i2c_bfin_twi_device = {
725#endif 722#endif
726 723
727static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 724static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
728#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 725#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
729 { 726 {
730 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 727 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
731 }, 728 },
732#endif 729#endif
733#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 730#if IS_ENABLED(CONFIG_INPUT_PCF8574)
734 { 731 {
735 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 732 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
736 .irq = IRQ_PF8, 733 .irq = IRQ_PF8,
737 }, 734 },
738#endif 735#endif
739#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 736#if IS_ENABLED(CONFIG_FB_BFIN_7393)
740 { 737 {
741 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 738 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
742 }, 739 },
743#endif 740#endif
744}; 741};
745 742
746#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 743#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
747#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 744#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
748static struct resource bfin_sport0_uart_resources[] = { 745static struct resource bfin_sport0_uart_resources[] = {
749 { 746 {
@@ -814,7 +811,7 @@ static struct platform_device bfin_sport1_uart_device = {
814#endif 811#endif
815#endif 812#endif
816 813
817#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 814#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
818#include <linux/input.h> 815#include <linux/input.h>
819#include <linux/gpio_keys.h> 816#include <linux/gpio_keys.h>
820 817
@@ -861,48 +858,48 @@ static struct platform_device *cmbf527_devices[] __initdata = {
861 858
862 &bfin_dpmc, 859 &bfin_dpmc,
863 860
864#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 861#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
865 &bf5xx_nand_device, 862 &bf5xx_nand_device,
866#endif 863#endif
867 864
868#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 865#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
869 &bfin_pcmcia_cf_device, 866 &bfin_pcmcia_cf_device,
870#endif 867#endif
871 868
872#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 869#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
873 &rtc_device, 870 &rtc_device,
874#endif 871#endif
875 872
876#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 873#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
877 &bfin_isp1760_device, 874 &bfin_isp1760_device,
878#endif 875#endif
879 876
880#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 877#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
881 &musb_device, 878 &musb_device,
882#endif 879#endif
883 880
884#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 881#if IS_ENABLED(CONFIG_SMC91X)
885 &smc91x_device, 882 &smc91x_device,
886#endif 883#endif
887 884
888#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 885#if IS_ENABLED(CONFIG_DM9000)
889 &dm9000_device, 886 &dm9000_device,
890#endif 887#endif
891 888
892#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 889#if IS_ENABLED(CONFIG_BFIN_MAC)
893 &bfin_mii_bus, 890 &bfin_mii_bus,
894 &bfin_mac_device, 891 &bfin_mac_device,
895#endif 892#endif
896 893
897#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 894#if IS_ENABLED(CONFIG_USB_NET2272)
898 &net2272_bfin_device, 895 &net2272_bfin_device,
899#endif 896#endif
900 897
901#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 898#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
902 &bfin_spi0_device, 899 &bfin_spi0_device,
903#endif 900#endif
904 901
905#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 902#if IS_ENABLED(CONFIG_SERIAL_BFIN)
906#ifdef CONFIG_SERIAL_BFIN_UART0 903#ifdef CONFIG_SERIAL_BFIN_UART0
907 &bfin_uart0_device, 904 &bfin_uart0_device,
908#endif 905#endif
@@ -911,7 +908,7 @@ static struct platform_device *cmbf527_devices[] __initdata = {
911#endif 908#endif
912#endif 909#endif
913 910
914#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 911#if IS_ENABLED(CONFIG_BFIN_SIR)
915#ifdef CONFIG_BFIN_SIR0 912#ifdef CONFIG_BFIN_SIR0
916 &bfin_sir0_device, 913 &bfin_sir0_device,
917#endif 914#endif
@@ -920,11 +917,11 @@ static struct platform_device *cmbf527_devices[] __initdata = {
920#endif 917#endif
921#endif 918#endif
922 919
923#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 920#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
924 &i2c_bfin_twi_device, 921 &i2c_bfin_twi_device,
925#endif 922#endif
926 923
927#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 924#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
928#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 925#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
929 &bfin_sport0_uart_device, 926 &bfin_sport0_uart_device,
930#endif 927#endif
@@ -933,11 +930,11 @@ static struct platform_device *cmbf527_devices[] __initdata = {
933#endif 930#endif
934#endif 931#endif
935 932
936#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 933#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
937 &bfin_device_gpiokeys, 934 &bfin_device_gpiokeys,
938#endif 935#endif
939 936
940#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 937#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
941 &cm_flash_device, 938 &cm_flash_device,
942#endif 939#endif
943}; 940};
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 50bda79194e5..a3a572352769 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -36,7 +36,7 @@ const char bfin_board_name[] = "ADI BF526-EZBRD";
36 * Driver needs to know address, irq and flag pin. 36 * Driver needs to know address, irq and flag pin.
37 */ 37 */
38 38
39#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 39#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
40static struct resource musb_resources[] = { 40static struct resource musb_resources[] = {
41 [0] = { 41 [0] = {
42 .start = 0xffc03800, 42 .start = 0xffc03800,
@@ -98,7 +98,7 @@ static struct platform_device musb_device = {
98}; 98};
99#endif 99#endif
100 100
101#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 101#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
102static struct mtd_partition ezbrd_partitions[] = { 102static struct mtd_partition ezbrd_partitions[] = {
103 { 103 {
104 .name = "bootloader(nor)", 104 .name = "bootloader(nor)",
@@ -138,7 +138,7 @@ static struct platform_device ezbrd_flash_device = {
138}; 138};
139#endif 139#endif
140 140
141#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 141#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
142static struct mtd_partition partition_info[] = { 142static struct mtd_partition partition_info[] = {
143 { 143 {
144 .name = "bootloader(nand)", 144 .name = "bootloader(nand)",
@@ -188,7 +188,7 @@ static struct platform_device bf5xx_nand_device = {
188}; 188};
189#endif 189#endif
190 190
191#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 191#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
192static struct platform_device rtc_device = { 192static struct platform_device rtc_device = {
193 .name = "rtc-bfin", 193 .name = "rtc-bfin",
194 .id = -1, 194 .id = -1,
@@ -196,7 +196,7 @@ static struct platform_device rtc_device = {
196#endif 196#endif
197 197
198 198
199#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 199#if IS_ENABLED(CONFIG_BFIN_MAC)
200#include <linux/bfin_mac.h> 200#include <linux/bfin_mac.h>
201static const unsigned short bfin_mac_peripherals[] = P_RMII0; 201static const unsigned short bfin_mac_peripherals[] = P_RMII0;
202 202
@@ -229,8 +229,7 @@ static struct platform_device bfin_mac_device = {
229}; 229};
230#endif 230#endif
231 231
232#if defined(CONFIG_MTD_M25P80) \ 232#if IS_ENABLED(CONFIG_MTD_M25P80)
233 || defined(CONFIG_MTD_M25P80_MODULE)
234static struct mtd_partition bfin_spi_flash_partitions[] = { 233static struct mtd_partition bfin_spi_flash_partitions[] = {
235 { 234 {
236 .name = "bootloader(spi)", 235 .name = "bootloader(spi)",
@@ -257,13 +256,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
257}; 256};
258#endif 257#endif
259 258
260#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 259#if IS_ENABLED(CONFIG_MMC_SPI)
261static struct bfin5xx_spi_chip mmc_spi_chip_info = { 260static struct bfin5xx_spi_chip mmc_spi_chip_info = {
262 .enable_dma = 0, 261 .enable_dma = 0,
263}; 262};
264#endif 263#endif
265 264
266#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 265#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
267static const struct ad7877_platform_data bfin_ad7877_ts_info = { 266static const struct ad7877_platform_data bfin_ad7877_ts_info = {
268 .model = 7877, 267 .model = 7877,
269 .vref_delay_usecs = 50, /* internal, no capacitor */ 268 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -279,7 +278,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
279}; 278};
280#endif 279#endif
281 280
282#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 281#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
283#include <linux/spi/ad7879.h> 282#include <linux/spi/ad7879.h>
284static const struct ad7879_platform_data bfin_ad7879_ts_info = { 283static const struct ad7879_platform_data bfin_ad7879_ts_info = {
285 .model = 7879, /* Model = AD7879 */ 284 .model = 7879, /* Model = AD7879 */
@@ -297,8 +296,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
297#endif 296#endif
298 297
299static struct spi_board_info bfin_spi_board_info[] __initdata = { 298static struct spi_board_info bfin_spi_board_info[] __initdata = {
300#if defined(CONFIG_MTD_M25P80) \ 299#if IS_ENABLED(CONFIG_MTD_M25P80)
301 || defined(CONFIG_MTD_M25P80_MODULE)
302 { 300 {
303 /* the modalias must be the same as spi device driver name */ 301 /* the modalias must be the same as spi device driver name */
304 .modalias = "m25p80", /* Name of spi_driver for this device */ 302 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -311,7 +309,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
311 }, 309 },
312#endif 310#endif
313 311
314#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 312#if IS_ENABLED(CONFIG_MMC_SPI)
315 { 313 {
316 .modalias = "mmc_spi", 314 .modalias = "mmc_spi",
317 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 315 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
@@ -321,7 +319,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
321 .mode = SPI_MODE_3, 319 .mode = SPI_MODE_3,
322 }, 320 },
323#endif 321#endif
324#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 322#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
325 { 323 {
326 .modalias = "ad7877", 324 .modalias = "ad7877",
327 .platform_data = &bfin_ad7877_ts_info, 325 .platform_data = &bfin_ad7877_ts_info,
@@ -331,7 +329,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
331 .chip_select = 2, 329 .chip_select = 2,
332 }, 330 },
333#endif 331#endif
334#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 332#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
335 { 333 {
336 .modalias = "ad7879", 334 .modalias = "ad7879",
337 .platform_data = &bfin_ad7879_ts_info, 335 .platform_data = &bfin_ad7879_ts_info,
@@ -342,7 +340,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
342 .mode = SPI_CPHA | SPI_CPOL, 340 .mode = SPI_CPHA | SPI_CPOL,
343 }, 341 },
344#endif 342#endif
345#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 343#if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
346 && defined(CONFIG_SND_SOC_WM8731_SPI) 344 && defined(CONFIG_SND_SOC_WM8731_SPI)
347 { 345 {
348 .modalias = "wm8731", 346 .modalias = "wm8731",
@@ -352,7 +350,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
352 .mode = SPI_MODE_0, 350 .mode = SPI_MODE_0,
353 }, 351 },
354#endif 352#endif
355#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 353#if IS_ENABLED(CONFIG_SPI_SPIDEV)
356 { 354 {
357 .modalias = "spidev", 355 .modalias = "spidev",
358 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 356 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -360,7 +358,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
360 .chip_select = 1, 358 .chip_select = 1,
361 }, 359 },
362#endif 360#endif
363#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 361#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
364 { 362 {
365 .modalias = "bfin-lq035q1-spi", 363 .modalias = "bfin-lq035q1-spi",
366 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 364 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -371,7 +369,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
371#endif 369#endif
372}; 370};
373 371
374#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 372#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
375/* SPI controller data */ 373/* SPI controller data */
376static struct bfin5xx_spi_master bfin_spi0_info = { 374static struct bfin5xx_spi_master bfin_spi0_info = {
377 .num_chipselect = 8, 375 .num_chipselect = 8,
@@ -409,7 +407,7 @@ static struct platform_device bfin_spi0_device = {
409}; 407};
410#endif /* spi master and devices */ 408#endif /* spi master and devices */
411 409
412#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 410#if IS_ENABLED(CONFIG_SERIAL_BFIN)
413#ifdef CONFIG_SERIAL_BFIN_UART0 411#ifdef CONFIG_SERIAL_BFIN_UART0
414static struct resource bfin_uart0_resources[] = { 412static struct resource bfin_uart0_resources[] = {
415 { 413 {
@@ -520,7 +518,7 @@ static struct platform_device bfin_uart1_device = {
520#endif 518#endif
521#endif 519#endif
522 520
523#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 521#if IS_ENABLED(CONFIG_BFIN_SIR)
524#ifdef CONFIG_BFIN_SIR0 522#ifdef CONFIG_BFIN_SIR0
525static struct resource bfin_sir0_resources[] = { 523static struct resource bfin_sir0_resources[] = {
526 { 524 {
@@ -575,7 +573,7 @@ static struct platform_device bfin_sir1_device = {
575#endif 573#endif
576#endif 574#endif
577 575
578#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 576#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
579static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 577static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
580 578
581static struct resource bfin_twi0_resource[] = { 579static struct resource bfin_twi0_resource[] = {
@@ -603,12 +601,12 @@ static struct platform_device i2c_bfin_twi_device = {
603#endif 601#endif
604 602
605static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 603static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
606#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 604#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
607 { 605 {
608 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 606 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
609 }, 607 },
610#endif 608#endif
611#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 609#if IS_ENABLED(CONFIG_INPUT_PCF8574)
612 { 610 {
613 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 611 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
614 .irq = IRQ_PF8, 612 .irq = IRQ_PF8,
@@ -616,7 +614,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
616#endif 614#endif
617}; 615};
618 616
619#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 617#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
620#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 618#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
621static struct resource bfin_sport0_uart_resources[] = { 619static struct resource bfin_sport0_uart_resources[] = {
622 { 620 {
@@ -687,7 +685,7 @@ static struct platform_device bfin_sport1_uart_device = {
687#endif 685#endif
688#endif 686#endif
689 687
690#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 688#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
691#include <linux/input.h> 689#include <linux/input.h>
692#include <linux/gpio_keys.h> 690#include <linux/gpio_keys.h>
693 691
@@ -731,7 +729,7 @@ static struct platform_device bfin_dpmc = {
731 }, 729 },
732}; 730};
733 731
734#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 732#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
735#include <asm/bfin-lq035q1.h> 733#include <asm/bfin-lq035q1.h>
736 734
737static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { 735static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
@@ -764,28 +762,28 @@ static struct platform_device *stamp_devices[] __initdata = {
764 762
765 &bfin_dpmc, 763 &bfin_dpmc,
766 764
767#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 765#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
768 &bf5xx_nand_device, 766 &bf5xx_nand_device,
769#endif 767#endif
770 768
771#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 769#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
772 &rtc_device, 770 &rtc_device,
773#endif 771#endif
774 772
775#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 773#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
776 &musb_device, 774 &musb_device,
777#endif 775#endif
778 776
779#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 777#if IS_ENABLED(CONFIG_BFIN_MAC)
780 &bfin_mii_bus, 778 &bfin_mii_bus,
781 &bfin_mac_device, 779 &bfin_mac_device,
782#endif 780#endif
783 781
784#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 782#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
785 &bfin_spi0_device, 783 &bfin_spi0_device,
786#endif 784#endif
787 785
788#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 786#if IS_ENABLED(CONFIG_SERIAL_BFIN)
789#ifdef CONFIG_SERIAL_BFIN_UART0 787#ifdef CONFIG_SERIAL_BFIN_UART0
790 &bfin_uart0_device, 788 &bfin_uart0_device,
791#endif 789#endif
@@ -794,11 +792,11 @@ static struct platform_device *stamp_devices[] __initdata = {
794#endif 792#endif
795#endif 793#endif
796 794
797#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 795#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
798 &bfin_lq035q1_device, 796 &bfin_lq035q1_device,
799#endif 797#endif
800 798
801#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 799#if IS_ENABLED(CONFIG_BFIN_SIR)
802#ifdef CONFIG_BFIN_SIR0 800#ifdef CONFIG_BFIN_SIR0
803 &bfin_sir0_device, 801 &bfin_sir0_device,
804#endif 802#endif
@@ -807,11 +805,11 @@ static struct platform_device *stamp_devices[] __initdata = {
807#endif 805#endif
808#endif 806#endif
809 807
810#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 808#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
811 &i2c_bfin_twi_device, 809 &i2c_bfin_twi_device,
812#endif 810#endif
813 811
814#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 812#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
815#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 813#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
816 &bfin_sport0_uart_device, 814 &bfin_sport0_uart_device,
817#endif 815#endif
@@ -820,11 +818,11 @@ static struct platform_device *stamp_devices[] __initdata = {
820#endif 818#endif
821#endif 819#endif
822 820
823#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 821#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
824 &bfin_device_gpiokeys, 822 &bfin_device_gpiokeys,
825#endif 823#endif
826 824
827#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 825#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
828 &ezbrd_flash_device, 826 &ezbrd_flash_device,
829#endif 827#endif
830}; 828};
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index d0a0c5e527cd..d64f565dc2a0 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -42,7 +42,7 @@ const char bfin_board_name[] = "ADI BF527-EZKIT";
42 * Driver needs to know address, irq and flag pin. 42 * Driver needs to know address, irq and flag pin.
43 */ 43 */
44 44
45#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 45#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
46#include <linux/usb/isp1760.h> 46#include <linux/usb/isp1760.h>
47static struct resource bfin_isp1760_resources[] = { 47static struct resource bfin_isp1760_resources[] = {
48 [0] = { 48 [0] = {
@@ -77,7 +77,7 @@ static struct platform_device bfin_isp1760_device = {
77}; 77};
78#endif 78#endif
79 79
80#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 80#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
81static struct resource musb_resources[] = { 81static struct resource musb_resources[] = {
82 [0] = { 82 [0] = {
83 .start = 0xffc03800, 83 .start = 0xffc03800,
@@ -139,7 +139,7 @@ static struct platform_device musb_device = {
139}; 139};
140#endif 140#endif
141 141
142#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE) 142#if IS_ENABLED(CONFIG_FB_BFIN_T350MCQB)
143 143
144static struct resource bf52x_t350mcqb_resources[] = { 144static struct resource bf52x_t350mcqb_resources[] = {
145 { 145 {
@@ -157,7 +157,7 @@ static struct platform_device bf52x_t350mcqb_device = {
157}; 157};
158#endif 158#endif
159 159
160#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 160#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
161#include <asm/bfin-lq035q1.h> 161#include <asm/bfin-lq035q1.h>
162 162
163static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { 163static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
@@ -184,7 +184,7 @@ static struct platform_device bfin_lq035q1_device = {
184}; 184};
185#endif 185#endif
186 186
187#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 187#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
188static struct mtd_partition ezkit_partitions[] = { 188static struct mtd_partition ezkit_partitions[] = {
189 { 189 {
190 .name = "bootloader(nor)", 190 .name = "bootloader(nor)",
@@ -224,7 +224,7 @@ static struct platform_device ezkit_flash_device = {
224}; 224};
225#endif 225#endif
226 226
227#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 227#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
228static struct mtd_partition partition_info[] = { 228static struct mtd_partition partition_info[] = {
229 { 229 {
230 .name = "bootloader(nand)", 230 .name = "bootloader(nand)",
@@ -274,7 +274,7 @@ static struct platform_device bf5xx_nand_device = {
274}; 274};
275#endif 275#endif
276 276
277#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 277#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
278static struct resource bfin_pcmcia_cf_resources[] = { 278static struct resource bfin_pcmcia_cf_resources[] = {
279 { 279 {
280 .start = 0x20310000, /* IO PORT */ 280 .start = 0x20310000, /* IO PORT */
@@ -303,14 +303,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
303}; 303};
304#endif 304#endif
305 305
306#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 306#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
307static struct platform_device rtc_device = { 307static struct platform_device rtc_device = {
308 .name = "rtc-bfin", 308 .name = "rtc-bfin",
309 .id = -1, 309 .id = -1,
310}; 310};
311#endif 311#endif
312 312
313#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 313#if IS_ENABLED(CONFIG_SMC91X)
314#include <linux/smc91x.h> 314#include <linux/smc91x.h>
315 315
316static struct smc91x_platdata smc91x_info = { 316static struct smc91x_platdata smc91x_info = {
@@ -343,7 +343,7 @@ static struct platform_device smc91x_device = {
343}; 343};
344#endif 344#endif
345 345
346#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 346#if IS_ENABLED(CONFIG_DM9000)
347static struct resource dm9000_resources[] = { 347static struct resource dm9000_resources[] = {
348 [0] = { 348 [0] = {
349 .start = 0x203FB800, 349 .start = 0x203FB800,
@@ -370,7 +370,7 @@ static struct platform_device dm9000_device = {
370}; 370};
371#endif 371#endif
372 372
373#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 373#if IS_ENABLED(CONFIG_BFIN_MAC)
374#include <linux/bfin_mac.h> 374#include <linux/bfin_mac.h>
375static const unsigned short bfin_mac_peripherals[] = P_RMII0; 375static const unsigned short bfin_mac_peripherals[] = P_RMII0;
376 376
@@ -403,7 +403,7 @@ static struct platform_device bfin_mac_device = {
403}; 403};
404#endif 404#endif
405 405
406#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 406#if IS_ENABLED(CONFIG_USB_NET2272)
407static struct resource net2272_bfin_resources[] = { 407static struct resource net2272_bfin_resources[] = {
408 { 408 {
409 .start = 0x20300000, 409 .start = 0x20300000,
@@ -427,8 +427,7 @@ static struct platform_device net2272_bfin_device = {
427}; 427};
428#endif 428#endif
429 429
430#if defined(CONFIG_MTD_M25P80) \ 430#if IS_ENABLED(CONFIG_MTD_M25P80)
431 || defined(CONFIG_MTD_M25P80_MODULE)
432static struct mtd_partition bfin_spi_flash_partitions[] = { 431static struct mtd_partition bfin_spi_flash_partitions[] = {
433 { 432 {
434 .name = "bootloader(spi)", 433 .name = "bootloader(spi)",
@@ -455,13 +454,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
455}; 454};
456#endif 455#endif
457 456
458#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 457#if IS_ENABLED(CONFIG_MMC_SPI)
459static struct bfin5xx_spi_chip mmc_spi_chip_info = { 458static struct bfin5xx_spi_chip mmc_spi_chip_info = {
460 .enable_dma = 0, 459 .enable_dma = 0,
461}; 460};
462#endif 461#endif
463 462
464#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 463#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
465static const struct ad7877_platform_data bfin_ad7877_ts_info = { 464static const struct ad7877_platform_data bfin_ad7877_ts_info = {
466 .model = 7877, 465 .model = 7877,
467 .vref_delay_usecs = 50, /* internal, no capacitor */ 466 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -477,7 +476,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
477}; 476};
478#endif 477#endif
479 478
480#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 479#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
481#include <linux/spi/ad7879.h> 480#include <linux/spi/ad7879.h>
482static const struct ad7879_platform_data bfin_ad7879_ts_info = { 481static const struct ad7879_platform_data bfin_ad7879_ts_info = {
483 .model = 7879, /* Model = AD7879 */ 482 .model = 7879, /* Model = AD7879 */
@@ -493,7 +492,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
493}; 492};
494#endif 493#endif
495 494
496#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 495#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
497 496
498static const u16 bfin_snd_pin[][7] = { 497static const u16 bfin_snd_pin[][7] = {
499 {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 498 {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
@@ -541,21 +540,21 @@ static struct resource bfin_snd_resources[][4] = {
541}; 540};
542#endif 541#endif
543 542
544#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 543#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
545static struct platform_device bfin_i2s_pcm = { 544static struct platform_device bfin_i2s_pcm = {
546 .name = "bfin-i2s-pcm-audio", 545 .name = "bfin-i2s-pcm-audio",
547 .id = -1, 546 .id = -1,
548}; 547};
549#endif 548#endif
550 549
551#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 550#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
552static struct platform_device bfin_ac97_pcm = { 551static struct platform_device bfin_ac97_pcm = {
553 .name = "bfin-ac97-pcm-audio", 552 .name = "bfin-ac97-pcm-audio",
554 .id = -1, 553 .id = -1,
555}; 554};
556#endif 555#endif
557 556
558#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 557#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
559static struct platform_device bfin_i2s = { 558static struct platform_device bfin_i2s = {
560 .name = "bfin-i2s", 559 .name = "bfin-i2s",
561 .id = CONFIG_SND_BF5XX_SPORT_NUM, 560 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -567,8 +566,7 @@ static struct platform_device bfin_i2s = {
567}; 566};
568#endif 567#endif
569 568
570#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 569#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
571 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
572static const char * const ad1836_link[] = { 570static const char * const ad1836_link[] = {
573 "bfin-i2s.0", 571 "bfin-i2s.0",
574 "spi0.4", 572 "spi0.4",
@@ -583,8 +581,7 @@ static struct platform_device bfin_ad1836_machine = {
583#endif 581#endif
584 582
585static struct spi_board_info bfin_spi_board_info[] __initdata = { 583static struct spi_board_info bfin_spi_board_info[] __initdata = {
586#if defined(CONFIG_MTD_M25P80) \ 584#if IS_ENABLED(CONFIG_MTD_M25P80)
587 || defined(CONFIG_MTD_M25P80_MODULE)
588 { 585 {
589 /* the modalias must be the same as spi device driver name */ 586 /* the modalias must be the same as spi device driver name */
590 .modalias = "m25p80", /* Name of spi_driver for this device */ 587 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -597,8 +594,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
597 }, 594 },
598#endif 595#endif
599 596
600#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 597#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
601 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
602 { 598 {
603 .modalias = "ad183x", 599 .modalias = "ad183x",
604 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 600 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -608,7 +604,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
608 .mode = SPI_MODE_3, 604 .mode = SPI_MODE_3,
609 }, 605 },
610#endif 606#endif
611#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 607#if IS_ENABLED(CONFIG_MMC_SPI)
612 { 608 {
613 .modalias = "mmc_spi", 609 .modalias = "mmc_spi",
614 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 610 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -619,7 +615,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
619 }, 615 },
620#endif 616#endif
621 617
622#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 618#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
623 { 619 {
624 .modalias = "ad7877", 620 .modalias = "ad7877",
625 .platform_data = &bfin_ad7877_ts_info, 621 .platform_data = &bfin_ad7877_ts_info,
@@ -629,7 +625,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
629 .chip_select = 2, 625 .chip_select = 2,
630 }, 626 },
631#endif 627#endif
632#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 628#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
633 { 629 {
634 .modalias = "ad7879", 630 .modalias = "ad7879",
635 .platform_data = &bfin_ad7879_ts_info, 631 .platform_data = &bfin_ad7879_ts_info,
@@ -640,7 +636,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
640 .mode = SPI_CPHA | SPI_CPOL, 636 .mode = SPI_CPHA | SPI_CPOL,
641 }, 637 },
642#endif 638#endif
643#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 639#if IS_ENABLED(CONFIG_SPI_SPIDEV)
644 { 640 {
645 .modalias = "spidev", 641 .modalias = "spidev",
646 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 642 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -648,7 +644,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
648 .chip_select = 1, 644 .chip_select = 1,
649 }, 645 },
650#endif 646#endif
651#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 647#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
652 { 648 {
653 .modalias = "bfin-lq035q1-spi", 649 .modalias = "bfin-lq035q1-spi",
654 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 650 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -659,7 +655,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
659#endif 655#endif
660}; 656};
661 657
662#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 658#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
663/* SPI controller data */ 659/* SPI controller data */
664static struct bfin5xx_spi_master bfin_spi0_info = { 660static struct bfin5xx_spi_master bfin_spi0_info = {
665 .num_chipselect = 8, 661 .num_chipselect = 8,
@@ -697,7 +693,7 @@ static struct platform_device bfin_spi0_device = {
697}; 693};
698#endif /* spi master and devices */ 694#endif /* spi master and devices */
699 695
700#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 696#if IS_ENABLED(CONFIG_SERIAL_BFIN)
701#ifdef CONFIG_SERIAL_BFIN_UART0 697#ifdef CONFIG_SERIAL_BFIN_UART0
702static struct resource bfin_uart0_resources[] = { 698static struct resource bfin_uart0_resources[] = {
703 { 699 {
@@ -808,7 +804,7 @@ static struct platform_device bfin_uart1_device = {
808#endif 804#endif
809#endif 805#endif
810 806
811#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 807#if IS_ENABLED(CONFIG_BFIN_SIR)
812#ifdef CONFIG_BFIN_SIR0 808#ifdef CONFIG_BFIN_SIR0
813static struct resource bfin_sir0_resources[] = { 809static struct resource bfin_sir0_resources[] = {
814 { 810 {
@@ -863,7 +859,7 @@ static struct platform_device bfin_sir1_device = {
863#endif 859#endif
864#endif 860#endif
865 861
866#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 862#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
867static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 863static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
868 864
869static struct resource bfin_twi0_resource[] = { 865static struct resource bfin_twi0_resource[] = {
@@ -890,7 +886,7 @@ static struct platform_device i2c_bfin_twi_device = {
890}; 886};
891#endif 887#endif
892 888
893#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 889#if IS_ENABLED(CONFIG_PMIC_ADP5520)
894#include <linux/mfd/adp5520.h> 890#include <linux/mfd/adp5520.h>
895 891
896 /* 892 /*
@@ -956,54 +952,54 @@ static struct adp5520_platform_data adp5520_pdev_data = {
956#endif 952#endif
957 953
958static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 954static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
959#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 955#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
960 { 956 {
961 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 957 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
962 }, 958 },
963#endif 959#endif
964#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 960#if IS_ENABLED(CONFIG_INPUT_PCF8574)
965 { 961 {
966 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 962 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
967 .irq = IRQ_PF8, 963 .irq = IRQ_PF8,
968 }, 964 },
969#endif 965#endif
970#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 966#if IS_ENABLED(CONFIG_FB_BFIN_7393)
971 { 967 {
972 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 968 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
973 }, 969 },
974#endif 970#endif
975#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) 971#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C)
976 { 972 {
977 I2C_BOARD_INFO("ad7879", 0x2C), 973 I2C_BOARD_INFO("ad7879", 0x2C),
978 .irq = IRQ_PF8, 974 .irq = IRQ_PF8,
979 .platform_data = (void *)&bfin_ad7879_ts_info, 975 .platform_data = (void *)&bfin_ad7879_ts_info,
980 }, 976 },
981#endif 977#endif
982#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 978#if IS_ENABLED(CONFIG_PMIC_ADP5520)
983 { 979 {
984 I2C_BOARD_INFO("pmic-adp5520", 0x32), 980 I2C_BOARD_INFO("pmic-adp5520", 0x32),
985 .irq = IRQ_PF9, 981 .irq = IRQ_PF9,
986 .platform_data = (void *)&adp5520_pdev_data, 982 .platform_data = (void *)&adp5520_pdev_data,
987 }, 983 },
988#endif 984#endif
989#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 985#if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
990 { 986 {
991 I2C_BOARD_INFO("ssm2602", 0x1b), 987 I2C_BOARD_INFO("ssm2602", 0x1b),
992 }, 988 },
993#endif 989#endif
994#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 990#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
995 { 991 {
996 I2C_BOARD_INFO("ad5252", 0x2f), 992 I2C_BOARD_INFO("ad5252", 0x2f),
997 }, 993 },
998#endif 994#endif
999#if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE) 995#if IS_ENABLED(CONFIG_SND_SOC_ADAU1373)
1000 { 996 {
1001 I2C_BOARD_INFO("adau1373", 0x1A), 997 I2C_BOARD_INFO("adau1373", 0x1A),
1002 }, 998 },
1003#endif 999#endif
1004}; 1000};
1005 1001
1006#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1002#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
1007#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1003#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1008static struct resource bfin_sport0_uart_resources[] = { 1004static struct resource bfin_sport0_uart_resources[] = {
1009 { 1005 {
@@ -1074,7 +1070,7 @@ static struct platform_device bfin_sport1_uart_device = {
1074#endif 1070#endif
1075#endif 1071#endif
1076 1072
1077#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1073#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
1078#include <linux/gpio_keys.h> 1074#include <linux/gpio_keys.h>
1079 1075
1080static struct gpio_keys_button bfin_gpio_keys_table[] = { 1076static struct gpio_keys_button bfin_gpio_keys_table[] = {
@@ -1095,7 +1091,7 @@ static struct platform_device bfin_device_gpiokeys = {
1095}; 1091};
1096#endif 1092#endif
1097 1093
1098#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 1094#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
1099#include <asm/bfin_rotary.h> 1095#include <asm/bfin_rotary.h>
1100 1096
1101static struct bfin_rotary_platform_data bfin_rotary_data = { 1097static struct bfin_rotary_platform_data bfin_rotary_data = {
@@ -1153,56 +1149,56 @@ static struct platform_device *stamp_devices[] __initdata = {
1153 1149
1154 &bfin_dpmc, 1150 &bfin_dpmc,
1155 1151
1156#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 1152#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
1157 &bf5xx_nand_device, 1153 &bf5xx_nand_device,
1158#endif 1154#endif
1159 1155
1160#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 1156#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
1161 &bfin_pcmcia_cf_device, 1157 &bfin_pcmcia_cf_device,
1162#endif 1158#endif
1163 1159
1164#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 1160#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
1165 &rtc_device, 1161 &rtc_device,
1166#endif 1162#endif
1167 1163
1168#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 1164#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
1169 &bfin_isp1760_device, 1165 &bfin_isp1760_device,
1170#endif 1166#endif
1171 1167
1172#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 1168#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
1173 &musb_device, 1169 &musb_device,
1174#endif 1170#endif
1175 1171
1176#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 1172#if IS_ENABLED(CONFIG_SMC91X)
1177 &smc91x_device, 1173 &smc91x_device,
1178#endif 1174#endif
1179 1175
1180#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 1176#if IS_ENABLED(CONFIG_DM9000)
1181 &dm9000_device, 1177 &dm9000_device,
1182#endif 1178#endif
1183 1179
1184#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 1180#if IS_ENABLED(CONFIG_BFIN_MAC)
1185 &bfin_mii_bus, 1181 &bfin_mii_bus,
1186 &bfin_mac_device, 1182 &bfin_mac_device,
1187#endif 1183#endif
1188 1184
1189#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 1185#if IS_ENABLED(CONFIG_USB_NET2272)
1190 &net2272_bfin_device, 1186 &net2272_bfin_device,
1191#endif 1187#endif
1192 1188
1193#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1189#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
1194 &bfin_spi0_device, 1190 &bfin_spi0_device,
1195#endif 1191#endif
1196 1192
1197#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE) 1193#if IS_ENABLED(CONFIG_FB_BFIN_T350MCQB)
1198 &bf52x_t350mcqb_device, 1194 &bf52x_t350mcqb_device,
1199#endif 1195#endif
1200 1196
1201#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 1197#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
1202 &bfin_lq035q1_device, 1198 &bfin_lq035q1_device,
1203#endif 1199#endif
1204 1200
1205#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1201#if IS_ENABLED(CONFIG_SERIAL_BFIN)
1206#ifdef CONFIG_SERIAL_BFIN_UART0 1202#ifdef CONFIG_SERIAL_BFIN_UART0
1207 &bfin_uart0_device, 1203 &bfin_uart0_device,
1208#endif 1204#endif
@@ -1211,7 +1207,7 @@ static struct platform_device *stamp_devices[] __initdata = {
1211#endif 1207#endif
1212#endif 1208#endif
1213 1209
1214#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1210#if IS_ENABLED(CONFIG_BFIN_SIR)
1215#ifdef CONFIG_BFIN_SIR0 1211#ifdef CONFIG_BFIN_SIR0
1216 &bfin_sir0_device, 1212 &bfin_sir0_device,
1217#endif 1213#endif
@@ -1220,11 +1216,11 @@ static struct platform_device *stamp_devices[] __initdata = {
1220#endif 1216#endif
1221#endif 1217#endif
1222 1218
1223#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1219#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
1224 &i2c_bfin_twi_device, 1220 &i2c_bfin_twi_device,
1225#endif 1221#endif
1226 1222
1227#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1223#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
1228#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1224#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1229 &bfin_sport0_uart_device, 1225 &bfin_sport0_uart_device,
1230#endif 1226#endif
@@ -1233,32 +1229,31 @@ static struct platform_device *stamp_devices[] __initdata = {
1233#endif 1229#endif
1234#endif 1230#endif
1235 1231
1236#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1232#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
1237 &bfin_device_gpiokeys, 1233 &bfin_device_gpiokeys,
1238#endif 1234#endif
1239 1235
1240#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 1236#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
1241 &bfin_rotary_device, 1237 &bfin_rotary_device,
1242#endif 1238#endif
1243 1239
1244#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1240#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
1245 &ezkit_flash_device, 1241 &ezkit_flash_device,
1246#endif 1242#endif
1247 1243
1248#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1244#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
1249 &bfin_i2s_pcm, 1245 &bfin_i2s_pcm,
1250#endif 1246#endif
1251 1247
1252#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 1248#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
1253 &bfin_ac97_pcm, 1249 &bfin_ac97_pcm,
1254#endif 1250#endif
1255 1251
1256#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1252#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
1257 &bfin_i2s, 1253 &bfin_i2s,
1258#endif 1254#endif
1259 1255
1260#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 1256#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
1261 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
1262 &bfin_ad1836_machine, 1257 &bfin_ad1836_machine,
1263#endif 1258#endif
1264}; 1259};
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 1509c5a8a3ff..a0f5856a5ff8 100644
--- a/arch/blackfin/mach-bf527/boards/tll6527m.c
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -28,8 +28,7 @@
28#include <asm/portmux.h> 28#include <asm/portmux.h>
29#include <asm/dpmc.h> 29#include <asm/dpmc.h>
30 30
31#if defined(CONFIG_TOUCHSCREEN_AD7879) \ 31#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
32 || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
33#include <linux/spi/ad7879.h> 32#include <linux/spi/ad7879.h>
34#define LCD_BACKLIGHT_GPIO 0x40 33#define LCD_BACKLIGHT_GPIO 0x40
35/* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for 34/* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for
@@ -45,7 +44,7 @@ const char bfin_board_name[] = "TLL6527M";
45 * Driver needs to know address, irq and flag pin. 44 * Driver needs to know address, irq and flag pin.
46 */ 45 */
47 46
48#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 47#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
49static struct resource musb_resources[] = { 48static struct resource musb_resources[] = {
50 [0] = { 49 [0] = {
51 .start = 0xffc03800, 50 .start = 0xffc03800,
@@ -104,7 +103,7 @@ static struct platform_device musb_device = {
104}; 103};
105#endif 104#endif
106 105
107#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 106#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
108#include <asm/bfin-lq035q1.h> 107#include <asm/bfin-lq035q1.h>
109 108
110static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { 109static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
@@ -133,7 +132,7 @@ static struct platform_device bfin_lq035q1_device = {
133}; 132};
134#endif 133#endif
135 134
136#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 135#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
137static struct mtd_partition tll6527m_partitions[] = { 136static struct mtd_partition tll6527m_partitions[] = {
138 { 137 {
139 .name = "bootloader(nor)", 138 .name = "bootloader(nor)",
@@ -182,7 +181,7 @@ static struct platform_device tll6527m_flash_device = {
182}; 181};
183#endif 182#endif
184 183
185#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) 184#if IS_ENABLED(CONFIG_GPIO_DECODER)
186/* An SN74LVC138A 3:8 decoder chip has been used to generate 7 augmented 185/* An SN74LVC138A 3:8 decoder chip has been used to generate 7 augmented
187 * outputs used as SPI CS lines for all SPI SLAVE devices on TLL6527v1-0. 186 * outputs used as SPI CS lines for all SPI SLAVE devices on TLL6527v1-0.
188 * EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being 187 * EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being
@@ -215,7 +214,7 @@ static struct platform_device spi_decoded_gpio = {
215 214
216#endif 215#endif
217 216
218#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 217#if IS_ENABLED(CONFIG_INPUT_ADXL34X)
219#include <linux/input/adxl34x.h> 218#include <linux/input/adxl34x.h>
220static const struct adxl34x_platform_data adxl345_info = { 219static const struct adxl34x_platform_data adxl345_info = {
221 .x_axis_offset = 0, 220 .x_axis_offset = 0,
@@ -250,14 +249,14 @@ static const struct adxl34x_platform_data adxl345_info = {
250}; 249};
251#endif 250#endif
252 251
253#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 252#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
254static struct platform_device rtc_device = { 253static struct platform_device rtc_device = {
255 .name = "rtc-bfin", 254 .name = "rtc-bfin",
256 .id = -1, 255 .id = -1,
257}; 256};
258#endif 257#endif
259 258
260#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 259#if IS_ENABLED(CONFIG_BFIN_MAC)
261#include <linux/bfin_mac.h> 260#include <linux/bfin_mac.h>
262static const unsigned short bfin_mac_peripherals[] = P_RMII0; 261static const unsigned short bfin_mac_peripherals[] = P_RMII0;
263 262
@@ -290,8 +289,7 @@ static struct platform_device bfin_mac_device = {
290}; 289};
291#endif 290#endif
292 291
293#if defined(CONFIG_MTD_M25P80) \ 292#if IS_ENABLED(CONFIG_MTD_M25P80)
294 || defined(CONFIG_MTD_M25P80_MODULE)
295static struct mtd_partition bfin_spi_flash_partitions[] = { 293static struct mtd_partition bfin_spi_flash_partitions[] = {
296 { 294 {
297 .name = "bootloader(spi)", 295 .name = "bootloader(spi)",
@@ -318,14 +316,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
318}; 316};
319#endif 317#endif
320 318
321#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 319#if IS_ENABLED(CONFIG_MMC_SPI)
322static struct bfin5xx_spi_chip mmc_spi_chip_info = { 320static struct bfin5xx_spi_chip mmc_spi_chip_info = {
323 .enable_dma = 0, 321 .enable_dma = 0,
324}; 322};
325#endif 323#endif
326 324
327#if defined(CONFIG_TOUCHSCREEN_AD7879) \ 325#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
328 || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
329static const struct ad7879_platform_data bfin_ad7879_ts_info = { 326static const struct ad7879_platform_data bfin_ad7879_ts_info = {
330 .model = 7879, /* Model = AD7879 */ 327 .model = 7879, /* Model = AD7879 */
331 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ 328 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
@@ -343,7 +340,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
343}; 340};
344#endif 341#endif
345 342
346#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 343#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
347static struct platform_device bfin_i2s = { 344static struct platform_device bfin_i2s = {
348 .name = "bfin-i2s", 345 .name = "bfin-i2s",
349 .id = CONFIG_SND_BF5XX_SPORT_NUM, 346 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -351,7 +348,7 @@ static struct platform_device bfin_i2s = {
351}; 348};
352#endif 349#endif
353 350
354#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) 351#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
355#include <linux/spi/mcp23s08.h> 352#include <linux/spi/mcp23s08.h>
356static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { 353static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = {
357 .chip[0].is_present = true, 354 .chip[0].is_present = true,
@@ -364,8 +361,7 @@ static const struct mcp23s08_platform_data bfin_mcp23s08_usr_gpio_info = {
364#endif 361#endif
365 362
366static struct spi_board_info bfin_spi_board_info[] __initdata = { 363static struct spi_board_info bfin_spi_board_info[] __initdata = {
367#if defined(CONFIG_MTD_M25P80) \ 364#if IS_ENABLED(CONFIG_MTD_M25P80)
368 || defined(CONFIG_MTD_M25P80_MODULE)
369 { 365 {
370 /* the modalias must be the same as spi device driver name */ 366 /* the modalias must be the same as spi device driver name */
371 .modalias = "m25p80", /* Name of spi_driver for this device */ 367 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -381,7 +377,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
381 }, 377 },
382#endif 378#endif
383 379
384#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 380#if IS_ENABLED(CONFIG_MMC_SPI)
385 { 381 {
386 .modalias = "mmc_spi", 382 .modalias = "mmc_spi",
387/* 383/*
@@ -396,8 +392,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
396 .mode = SPI_MODE_0, 392 .mode = SPI_MODE_0,
397 }, 393 },
398#endif 394#endif
399#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \ 395#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
400 || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
401 { 396 {
402 .modalias = "ad7879", 397 .modalias = "ad7879",
403 .platform_data = &bfin_ad7879_ts_info, 398 .platform_data = &bfin_ad7879_ts_info,
@@ -409,7 +404,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
409 .mode = SPI_CPHA | SPI_CPOL, 404 .mode = SPI_CPHA | SPI_CPOL,
410 }, 405 },
411#endif 406#endif
412#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 407#if IS_ENABLED(CONFIG_SPI_SPIDEV)
413 { 408 {
414 .modalias = "spidev", 409 .modalias = "spidev",
415 .max_speed_hz = 10000000, 410 .max_speed_hz = 10000000,
@@ -419,7 +414,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
419 .mode = SPI_CPHA | SPI_CPOL, 414 .mode = SPI_CPHA | SPI_CPOL,
420 }, 415 },
421#endif 416#endif
422#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 417#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
423 { 418 {
424 .modalias = "bfin-lq035q1-spi", 419 .modalias = "bfin-lq035q1-spi",
425 .max_speed_hz = 20000000, 420 .max_speed_hz = 20000000,
@@ -428,7 +423,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
428 .mode = SPI_CPHA | SPI_CPOL, 423 .mode = SPI_CPHA | SPI_CPOL,
429 }, 424 },
430#endif 425#endif
431#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) 426#if IS_ENABLED(CONFIG_GPIO_MCP23S08)
432 { 427 {
433 .modalias = "mcp23s08", 428 .modalias = "mcp23s08",
434 .platform_data = &bfin_mcp23s08_sys_gpio_info, 429 .platform_data = &bfin_mcp23s08_sys_gpio_info,
@@ -448,7 +443,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
448#endif 443#endif
449}; 444};
450 445
451#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 446#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
452/* SPI controller data */ 447/* SPI controller data */
453static struct bfin5xx_spi_master bfin_spi0_info = { 448static struct bfin5xx_spi_master bfin_spi0_info = {
454 .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS, 449 .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS,
@@ -487,7 +482,7 @@ static struct platform_device bfin_spi0_device = {
487}; 482};
488#endif /* spi master and devices */ 483#endif /* spi master and devices */
489 484
490#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 485#if IS_ENABLED(CONFIG_SERIAL_BFIN)
491#ifdef CONFIG_SERIAL_BFIN_UART0 486#ifdef CONFIG_SERIAL_BFIN_UART0
492static struct resource bfin_uart0_resources[] = { 487static struct resource bfin_uart0_resources[] = {
493 { 488 {
@@ -600,7 +595,7 @@ static struct platform_device bfin_uart1_device = {
600#endif 595#endif
601#endif 596#endif
602 597
603#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 598#if IS_ENABLED(CONFIG_BFIN_SIR)
604#ifdef CONFIG_BFIN_SIR0 599#ifdef CONFIG_BFIN_SIR0
605static struct resource bfin_sir0_resources[] = { 600static struct resource bfin_sir0_resources[] = {
606 { 601 {
@@ -655,7 +650,7 @@ static struct platform_device bfin_sir1_device = {
655#endif 650#endif
656#endif 651#endif
657 652
658#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 653#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
659static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 654static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
660 655
661static struct resource bfin_twi0_resource[] = { 656static struct resource bfin_twi0_resource[] = {
@@ -683,26 +678,25 @@ static struct platform_device i2c_bfin_twi_device = {
683#endif 678#endif
684 679
685static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 680static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
686#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 681#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
687 { 682 {
688 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 683 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
689 }, 684 },
690#endif 685#endif
691 686
692#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 687#if IS_ENABLED(CONFIG_FB_BFIN_7393)
693 { 688 {
694 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 689 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
695 }, 690 },
696#endif 691#endif
697#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) \ 692#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C)
698 || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE)
699 { 693 {
700 I2C_BOARD_INFO("ad7879", 0x2C), 694 I2C_BOARD_INFO("ad7879", 0x2C),
701 .irq = IRQ_PH14, 695 .irq = IRQ_PH14,
702 .platform_data = (void *)&bfin_ad7879_ts_info, 696 .platform_data = (void *)&bfin_ad7879_ts_info,
703 }, 697 },
704#endif 698#endif
705#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 699#if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
706 { 700 {
707 I2C_BOARD_INFO("ssm2602", 0x1b), 701 I2C_BOARD_INFO("ssm2602", 0x1b),
708 }, 702 },
@@ -714,8 +708,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
714 { 708 {
715 I2C_BOARD_INFO("ltc3576", 0x09), 709 I2C_BOARD_INFO("ltc3576", 0x09),
716 }, 710 },
717#if defined(CONFIG_INPUT_ADXL34X_I2C) \ 711#if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
718 || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
719 { 712 {
720 I2C_BOARD_INFO("adxl34x", 0x53), 713 I2C_BOARD_INFO("adxl34x", 0x53),
721 .irq = IRQ_PH13, 714 .irq = IRQ_PH13,
@@ -724,8 +717,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
724#endif 717#endif
725}; 718};
726 719
727#if defined(CONFIG_SERIAL_BFIN_SPORT) \ 720#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
728 || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
729#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 721#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
730static struct resource bfin_sport0_uart_resources[] = { 722static struct resource bfin_sport0_uart_resources[] = {
731 { 723 {
@@ -823,28 +815,28 @@ static struct platform_device *tll6527m_devices[] __initdata = {
823 815
824 &bfin_dpmc, 816 &bfin_dpmc,
825 817
826#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 818#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
827 &rtc_device, 819 &rtc_device,
828#endif 820#endif
829 821
830#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 822#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
831 &musb_device, 823 &musb_device,
832#endif 824#endif
833 825
834#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 826#if IS_ENABLED(CONFIG_BFIN_MAC)
835 &bfin_mii_bus, 827 &bfin_mii_bus,
836 &bfin_mac_device, 828 &bfin_mac_device,
837#endif 829#endif
838 830
839#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 831#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
840 &bfin_spi0_device, 832 &bfin_spi0_device,
841#endif 833#endif
842 834
843#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 835#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
844 &bfin_lq035q1_device, 836 &bfin_lq035q1_device,
845#endif 837#endif
846 838
847#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 839#if IS_ENABLED(CONFIG_SERIAL_BFIN)
848#ifdef CONFIG_SERIAL_BFIN_UART0 840#ifdef CONFIG_SERIAL_BFIN_UART0
849 &bfin_uart0_device, 841 &bfin_uart0_device,
850#endif 842#endif
@@ -853,7 +845,7 @@ static struct platform_device *tll6527m_devices[] __initdata = {
853#endif 845#endif
854#endif 846#endif
855 847
856#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 848#if IS_ENABLED(CONFIG_BFIN_SIR)
857#ifdef CONFIG_BFIN_SIR0 849#ifdef CONFIG_BFIN_SIR0
858 &bfin_sir0_device, 850 &bfin_sir0_device,
859#endif 851#endif
@@ -862,12 +854,11 @@ static struct platform_device *tll6527m_devices[] __initdata = {
862#endif 854#endif
863#endif 855#endif
864 856
865#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 857#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
866 &i2c_bfin_twi_device, 858 &i2c_bfin_twi_device,
867#endif 859#endif
868 860
869#if defined(CONFIG_SERIAL_BFIN_SPORT) \ 861#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
870 || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
871#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 862#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
872 &bfin_sport0_uart_device, 863 &bfin_sport0_uart_device,
873#endif 864#endif
@@ -876,15 +867,15 @@ static struct platform_device *tll6527m_devices[] __initdata = {
876#endif 867#endif
877#endif 868#endif
878 869
879#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 870#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
880 &tll6527m_flash_device, 871 &tll6527m_flash_device,
881#endif 872#endif
882 873
883#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 874#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
884 &bfin_i2s, 875 &bfin_i2s,
885#endif 876#endif
886 877
887#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) 878#if IS_ENABLED(CONFIG_GPIO_DECODER)
888 &spi_decoded_gpio, 879 &spi_decoded_gpio,
889#endif 880#endif
890}; 881};
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 6cb7b3ed9b3d..01300f40db15 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -14,7 +14,7 @@
14#include <linux/mtd/partitions.h> 14#include <linux/mtd/partitions.h>
15#include <linux/spi/spi.h> 15#include <linux/spi/spi.h>
16#include <linux/spi/flash.h> 16#include <linux/spi/flash.h>
17#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 17#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
18#include <linux/usb/isp1362.h> 18#include <linux/usb/isp1362.h>
19#endif 19#endif
20#include <linux/irq.h> 20#include <linux/irq.h>
@@ -29,7 +29,7 @@
29 */ 29 */
30const char bfin_board_name[] = "HV Sistemas H8606"; 30const char bfin_board_name[] = "HV Sistemas H8606";
31 31
32#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 32#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
33static struct platform_device rtc_device = { 33static struct platform_device rtc_device = {
34 .name = "rtc-bfin", 34 .name = "rtc-bfin",
35 .id = -1, 35 .id = -1,
@@ -39,7 +39,7 @@ static struct platform_device rtc_device = {
39/* 39/*
40* Driver needs to know address, irq and flag pin. 40* Driver needs to know address, irq and flag pin.
41 */ 41 */
42 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 42#if IS_ENABLED(CONFIG_DM9000)
43static struct resource dm9000_resources[] = { 43static struct resource dm9000_resources[] = {
44 [0] = { 44 [0] = {
45 .start = 0x20300000, 45 .start = 0x20300000,
@@ -67,7 +67,7 @@ static struct platform_device dm9000_device = {
67}; 67};
68#endif 68#endif
69 69
70#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 70#if IS_ENABLED(CONFIG_SMC91X)
71#include <linux/smc91x.h> 71#include <linux/smc91x.h>
72 72
73static struct smc91x_platdata smc91x_info = { 73static struct smc91x_platdata smc91x_info = {
@@ -104,7 +104,7 @@ static struct platform_device smc91x_device = {
104}; 104};
105#endif 105#endif
106 106
107#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 107#if IS_ENABLED(CONFIG_USB_NET2272)
108static struct resource net2272_bfin_resources[] = { 108static struct resource net2272_bfin_resources[] = {
109 { 109 {
110 .start = 0x20300000, 110 .start = 0x20300000,
@@ -125,10 +125,10 @@ static struct platform_device net2272_bfin_device = {
125}; 125};
126#endif 126#endif
127 127
128#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 128#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
129/* all SPI peripherals info goes here */ 129/* all SPI peripherals info goes here */
130 130
131#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 131#if IS_ENABLED(CONFIG_MTD_M25P80)
132static struct mtd_partition bfin_spi_flash_partitions[] = { 132static struct mtd_partition bfin_spi_flash_partitions[] = {
133 { 133 {
134 .name = "bootloader (spi)", 134 .name = "bootloader (spi)",
@@ -166,7 +166,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
166/* Notice: for blackfin, the speed_hz is the value of register 166/* Notice: for blackfin, the speed_hz is the value of register
167 * SPI_BAUD, not the real baudrate */ 167 * SPI_BAUD, not the real baudrate */
168static struct spi_board_info bfin_spi_board_info[] __initdata = { 168static struct spi_board_info bfin_spi_board_info[] __initdata = {
169#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 169#if IS_ENABLED(CONFIG_MTD_M25P80)
170 { 170 {
171 /* the modalias must be the same as spi device driver name */ 171 /* the modalias must be the same as spi device driver name */
172 .modalias = "m25p80", /* Name of spi_driver for this device */ 172 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -180,7 +180,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
180 }, 180 },
181#endif 181#endif
182 182
183#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 183#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
184 { 184 {
185 .modalias = "ad183x", 185 .modalias = "ad183x",
186 .max_speed_hz = 16, 186 .max_speed_hz = 16,
@@ -229,7 +229,7 @@ static struct platform_device bfin_spi0_device = {
229}; 229};
230#endif /* spi master and devices */ 230#endif /* spi master and devices */
231 231
232#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 232#if IS_ENABLED(CONFIG_SERIAL_BFIN)
233#ifdef CONFIG_SERIAL_BFIN_UART0 233#ifdef CONFIG_SERIAL_BFIN_UART0
234static struct resource bfin_uart0_resources[] = { 234static struct resource bfin_uart0_resources[] = {
235 { 235 {
@@ -280,7 +280,7 @@ static struct platform_device bfin_uart0_device = {
280#endif 280#endif
281#endif 281#endif
282 282
283#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 283#if IS_ENABLED(CONFIG_BFIN_SIR)
284#ifdef CONFIG_BFIN_SIR0 284#ifdef CONFIG_BFIN_SIR0
285static struct resource bfin_sir0_resources[] = { 285static struct resource bfin_sir0_resources[] = {
286 { 286 {
@@ -309,7 +309,7 @@ static struct platform_device bfin_sir0_device = {
309#endif 309#endif
310#endif 310#endif
311 311
312#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 312#if IS_ENABLED(CONFIG_SERIAL_8250)
313 313
314#include <linux/serial_8250.h> 314#include <linux/serial_8250.h>
315#include <linux/serial.h> 315#include <linux/serial.h>
@@ -353,7 +353,7 @@ static struct platform_device serial8250_device = {
353 353
354#endif 354#endif
355 355
356#if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) 356#if IS_ENABLED(CONFIG_KEYBOARD_OPENCORES)
357 357
358/* 358/*
359 * Configuration for one OpenCores keyboard controller in FPGA at address 0x20200030, 359 * Configuration for one OpenCores keyboard controller in FPGA at address 0x20200030,
@@ -382,43 +382,43 @@ static struct platform_device opencores_kbd_device = {
382#endif 382#endif
383 383
384static struct platform_device *h8606_devices[] __initdata = { 384static struct platform_device *h8606_devices[] __initdata = {
385#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 385#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
386 &rtc_device, 386 &rtc_device,
387#endif 387#endif
388 388
389#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 389#if IS_ENABLED(CONFIG_DM9000)
390 &dm9000_device, 390 &dm9000_device,
391#endif 391#endif
392 392
393#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 393#if IS_ENABLED(CONFIG_SMC91X)
394 &smc91x_device, 394 &smc91x_device,
395#endif 395#endif
396 396
397#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 397#if IS_ENABLED(CONFIG_USB_NET2272)
398 &net2272_bfin_device, 398 &net2272_bfin_device,
399#endif 399#endif
400 400
401#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 401#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
402 &bfin_spi0_device, 402 &bfin_spi0_device,
403#endif 403#endif
404 404
405#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 405#if IS_ENABLED(CONFIG_SERIAL_BFIN)
406#ifdef CONFIG_SERIAL_BFIN_UART0 406#ifdef CONFIG_SERIAL_BFIN_UART0
407 &bfin_uart0_device, 407 &bfin_uart0_device,
408#endif 408#endif
409#endif 409#endif
410 410
411#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) 411#if IS_ENABLED(CONFIG_SERIAL_8250)
412 &serial8250_device, 412 &serial8250_device,
413#endif 413#endif
414 414
415#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 415#if IS_ENABLED(CONFIG_BFIN_SIR)
416#ifdef CONFIG_BFIN_SIR0 416#ifdef CONFIG_BFIN_SIR0
417 &bfin_sir0_device, 417 &bfin_sir0_device,
418#endif 418#endif
419#endif 419#endif
420 420
421#if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) 421#if IS_ENABLED(CONFIG_KEYBOARD_OPENCORES)
422 &opencores_kbd_device, 422 &opencores_kbd_device,
423#endif 423#endif
424}; 424};
@@ -428,7 +428,7 @@ static int __init H8606_init(void)
428 printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n"); 428 printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n");
429 printk(KERN_INFO "%s(): registering device resources\n", __func__); 429 printk(KERN_INFO "%s(): registering device resources\n", __func__);
430 platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices)); 430 platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices));
431#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 431#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
432 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 432 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
433#endif 433#endif
434 return 0; 434 return 0;
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
index de44a3765e59..63b0e4fe760c 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -31,7 +31,7 @@
31 */ 31 */
32const char bfin_board_name[] = "BlackStamp"; 32const char bfin_board_name[] = "BlackStamp";
33 33
34#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 34#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
35static struct platform_device rtc_device = { 35static struct platform_device rtc_device = {
36 .name = "rtc-bfin", 36 .name = "rtc-bfin",
37 .id = -1, 37 .id = -1,
@@ -41,7 +41,7 @@ static struct platform_device rtc_device = {
41/* 41/*
42 * Driver needs to know address, irq and flag pin. 42 * Driver needs to know address, irq and flag pin.
43 */ 43 */
44#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 44#if IS_ENABLED(CONFIG_SMC91X)
45#include <linux/smc91x.h> 45#include <linux/smc91x.h>
46 46
47static struct smc91x_platdata smc91x_info = { 47static struct smc91x_platdata smc91x_info = {
@@ -74,7 +74,7 @@ static struct platform_device smc91x_device = {
74}; 74};
75#endif 75#endif
76 76
77#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 77#if IS_ENABLED(CONFIG_MTD_M25P80)
78static struct mtd_partition bfin_spi_flash_partitions[] = { 78static struct mtd_partition bfin_spi_flash_partitions[] = {
79 { 79 {
80 .name = "bootloader(spi)", 80 .name = "bootloader(spi)",
@@ -105,14 +105,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
105}; 105};
106#endif 106#endif
107 107
108#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 108#if IS_ENABLED(CONFIG_MMC_SPI)
109static struct bfin5xx_spi_chip mmc_spi_chip_info = { 109static struct bfin5xx_spi_chip mmc_spi_chip_info = {
110 .enable_dma = 0, 110 .enable_dma = 0,
111}; 111};
112#endif 112#endif
113 113
114static struct spi_board_info bfin_spi_board_info[] __initdata = { 114static struct spi_board_info bfin_spi_board_info[] __initdata = {
115#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 115#if IS_ENABLED(CONFIG_MTD_M25P80)
116 { 116 {
117 /* the modalias must be the same as spi device driver name */ 117 /* the modalias must be the same as spi device driver name */
118 .modalias = "m25p80", /* Name of spi_driver for this device */ 118 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -125,7 +125,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
125 }, 125 },
126#endif 126#endif
127 127
128#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 128#if IS_ENABLED(CONFIG_MMC_SPI)
129 { 129 {
130 .modalias = "mmc_spi", 130 .modalias = "mmc_spi",
131 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 131 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -136,7 +136,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
136 }, 136 },
137#endif 137#endif
138 138
139#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 139#if IS_ENABLED(CONFIG_SPI_SPIDEV)
140 { 140 {
141 .modalias = "spidev", 141 .modalias = "spidev",
142 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 142 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -146,7 +146,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
146#endif 146#endif
147}; 147};
148 148
149#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 149#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
150/* SPI (0) */ 150/* SPI (0) */
151static struct resource bfin_spi0_resource[] = { 151static struct resource bfin_spi0_resource[] = {
152 [0] = { 152 [0] = {
@@ -184,7 +184,7 @@ static struct platform_device bfin_spi0_device = {
184}; 184};
185#endif /* spi master and devices */ 185#endif /* spi master and devices */
186 186
187#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 187#if IS_ENABLED(CONFIG_SERIAL_BFIN)
188#ifdef CONFIG_SERIAL_BFIN_UART0 188#ifdef CONFIG_SERIAL_BFIN_UART0
189static struct resource bfin_uart0_resources[] = { 189static struct resource bfin_uart0_resources[] = {
190 { 190 {
@@ -235,7 +235,7 @@ static struct platform_device bfin_uart0_device = {
235#endif 235#endif
236#endif 236#endif
237 237
238#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 238#if IS_ENABLED(CONFIG_BFIN_SIR)
239#ifdef CONFIG_BFIN_SIR0 239#ifdef CONFIG_BFIN_SIR0
240static struct resource bfin_sir0_resources[] = { 240static struct resource bfin_sir0_resources[] = {
241 { 241 {
@@ -264,7 +264,7 @@ static struct platform_device bfin_sir0_device = {
264#endif 264#endif
265#endif 265#endif
266 266
267#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 267#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
268#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 268#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
269static struct resource bfin_sport0_uart_resources[] = { 269static struct resource bfin_sport0_uart_resources[] = {
270 { 270 {
@@ -335,7 +335,7 @@ static struct platform_device bfin_sport1_uart_device = {
335#endif 335#endif
336#endif 336#endif
337 337
338#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 338#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
339#include <linux/input.h> 339#include <linux/input.h>
340#include <linux/gpio_keys.h> 340#include <linux/gpio_keys.h>
341 341
@@ -358,7 +358,7 @@ static struct platform_device bfin_device_gpiokeys = {
358}; 358};
359#endif 359#endif
360 360
361#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 361#if IS_ENABLED(CONFIG_I2C_GPIO)
362#include <linux/i2c-gpio.h> 362#include <linux/i2c-gpio.h>
363 363
364static struct i2c_gpio_platform_data i2c_gpio_data = { 364static struct i2c_gpio_platform_data i2c_gpio_data = {
@@ -413,32 +413,32 @@ static struct platform_device *stamp_devices[] __initdata = {
413 413
414 &bfin_dpmc, 414 &bfin_dpmc,
415 415
416#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 416#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
417 &rtc_device, 417 &rtc_device,
418#endif 418#endif
419 419
420#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 420#if IS_ENABLED(CONFIG_SMC91X)
421 &smc91x_device, 421 &smc91x_device,
422#endif 422#endif
423 423
424 424
425#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 425#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
426 &bfin_spi0_device, 426 &bfin_spi0_device,
427#endif 427#endif
428 428
429#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 429#if IS_ENABLED(CONFIG_SERIAL_BFIN)
430#ifdef CONFIG_SERIAL_BFIN_UART0 430#ifdef CONFIG_SERIAL_BFIN_UART0
431 &bfin_uart0_device, 431 &bfin_uart0_device,
432#endif 432#endif
433#endif 433#endif
434 434
435#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 435#if IS_ENABLED(CONFIG_BFIN_SIR)
436#ifdef CONFIG_BFIN_SIR0 436#ifdef CONFIG_BFIN_SIR0
437 &bfin_sir0_device, 437 &bfin_sir0_device,
438#endif 438#endif
439#endif 439#endif
440 440
441#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 441#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
442#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 442#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
443 &bfin_sport0_uart_device, 443 &bfin_sport0_uart_device,
444#endif 444#endif
@@ -447,11 +447,11 @@ static struct platform_device *stamp_devices[] __initdata = {
447#endif 447#endif
448#endif 448#endif
449 449
450#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 450#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
451 &bfin_device_gpiokeys, 451 &bfin_device_gpiokeys,
452#endif 452#endif
453 453
454#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 454#if IS_ENABLED(CONFIG_I2C_GPIO)
455 &i2c_gpio_device, 455 &i2c_gpio_device,
456#endif 456#endif
457}; 457};
@@ -469,7 +469,7 @@ static int __init blackstamp_init(void)
469 if (ret < 0) 469 if (ret < 0)
470 return ret; 470 return ret;
471 471
472#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 472#if IS_ENABLED(CONFIG_SMC91X)
473 /* 473 /*
474 * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC. 474 * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
475 * the bfin-async-map driver takes care of flipping between 475 * the bfin-async-map driver takes care of flipping between
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index fe47e048c4e6..4ef2fb0e48d5 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -15,7 +15,7 @@
15#include <linux/spi/spi.h> 15#include <linux/spi/spi.h>
16#include <linux/spi/flash.h> 16#include <linux/spi/flash.h>
17#include <linux/spi/mmc_spi.h> 17#include <linux/spi/mmc_spi.h>
18#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 18#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
19#include <linux/usb/isp1362.h> 19#include <linux/usb/isp1362.h>
20#endif 20#endif
21#include <linux/irq.h> 21#include <linux/irq.h>
@@ -29,9 +29,9 @@
29 */ 29 */
30const char bfin_board_name[] = "Bluetechnix CM BF533"; 30const char bfin_board_name[] = "Bluetechnix CM BF533";
31 31
32#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 32#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
33/* all SPI peripherals info goes here */ 33/* all SPI peripherals info goes here */
34#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 34#if IS_ENABLED(CONFIG_MTD_M25P80)
35static struct mtd_partition bfin_spi_flash_partitions[] = { 35static struct mtd_partition bfin_spi_flash_partitions[] = {
36 { 36 {
37 .name = "bootloader(spi)", 37 .name = "bootloader(spi)",
@@ -62,14 +62,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
62}; 62};
63#endif 63#endif
64 64
65#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 65#if IS_ENABLED(CONFIG_MMC_SPI)
66static struct bfin5xx_spi_chip mmc_spi_chip_info = { 66static struct bfin5xx_spi_chip mmc_spi_chip_info = {
67 .enable_dma = 0, 67 .enable_dma = 0,
68}; 68};
69#endif 69#endif
70 70
71static struct spi_board_info bfin_spi_board_info[] __initdata = { 71static struct spi_board_info bfin_spi_board_info[] __initdata = {
72#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 72#if IS_ENABLED(CONFIG_MTD_M25P80)
73 { 73 {
74 /* the modalias must be the same as spi device driver name */ 74 /* the modalias must be the same as spi device driver name */
75 .modalias = "m25p80", /* Name of spi_driver for this device */ 75 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -82,7 +82,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
82 }, 82 },
83#endif 83#endif
84 84
85#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 85#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
86 { 86 {
87 .modalias = "ad183x", 87 .modalias = "ad183x",
88 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 88 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -91,7 +91,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
91 }, 91 },
92#endif 92#endif
93 93
94#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 94#if IS_ENABLED(CONFIG_MMC_SPI)
95 { 95 {
96 .modalias = "mmc_spi", 96 .modalias = "mmc_spi",
97 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 97 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -140,14 +140,14 @@ static struct platform_device bfin_spi0_device = {
140}; 140};
141#endif /* spi master and devices */ 141#endif /* spi master and devices */
142 142
143#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 143#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
144static struct platform_device rtc_device = { 144static struct platform_device rtc_device = {
145 .name = "rtc-bfin", 145 .name = "rtc-bfin",
146 .id = -1, 146 .id = -1,
147}; 147};
148#endif 148#endif
149 149
150#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 150#if IS_ENABLED(CONFIG_SMC91X)
151#include <linux/smc91x.h> 151#include <linux/smc91x.h>
152 152
153static struct smc91x_platdata smc91x_info = { 153static struct smc91x_platdata smc91x_info = {
@@ -178,7 +178,7 @@ static struct platform_device smc91x_device = {
178}; 178};
179#endif 179#endif
180 180
181#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 181#if IS_ENABLED(CONFIG_SMSC911X)
182#include <linux/smsc911x.h> 182#include <linux/smsc911x.h>
183 183
184static struct resource smsc911x_resources[] = { 184static struct resource smsc911x_resources[] = {
@@ -212,7 +212,7 @@ static struct platform_device smsc911x_device = {
212}; 212};
213#endif 213#endif
214 214
215#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 215#if IS_ENABLED(CONFIG_SERIAL_BFIN)
216#ifdef CONFIG_SERIAL_BFIN_UART0 216#ifdef CONFIG_SERIAL_BFIN_UART0
217static struct resource bfin_uart0_resources[] = { 217static struct resource bfin_uart0_resources[] = {
218 { 218 {
@@ -263,7 +263,7 @@ static struct platform_device bfin_uart0_device = {
263#endif 263#endif
264#endif 264#endif
265 265
266#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 266#if IS_ENABLED(CONFIG_BFIN_SIR)
267#ifdef CONFIG_BFIN_SIR0 267#ifdef CONFIG_BFIN_SIR0
268static struct resource bfin_sir0_resources[] = { 268static struct resource bfin_sir0_resources[] = {
269 { 269 {
@@ -292,7 +292,7 @@ static struct platform_device bfin_sir0_device = {
292#endif 292#endif
293#endif 293#endif
294 294
295#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 295#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
296#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 296#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
297static struct resource bfin_sport0_uart_resources[] = { 297static struct resource bfin_sport0_uart_resources[] = {
298 { 298 {
@@ -363,7 +363,7 @@ static struct platform_device bfin_sport1_uart_device = {
363#endif 363#endif
364#endif 364#endif
365 365
366#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 366#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
367static struct resource isp1362_hcd_resources[] = { 367static struct resource isp1362_hcd_resources[] = {
368 { 368 {
369 .start = 0x20308000, 369 .start = 0x20308000,
@@ -403,7 +403,7 @@ static struct platform_device isp1362_hcd_device = {
403#endif 403#endif
404 404
405 405
406#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 406#if IS_ENABLED(CONFIG_USB_NET2272)
407static struct resource net2272_bfin_resources[] = { 407static struct resource net2272_bfin_resources[] = {
408 { 408 {
409 .start = 0x20300000, 409 .start = 0x20300000,
@@ -426,7 +426,7 @@ static struct platform_device net2272_bfin_device = {
426 426
427 427
428 428
429#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 429#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
430static struct mtd_partition para_partitions[] = { 430static struct mtd_partition para_partitions[] = {
431 { 431 {
432 .name = "bootloader(nor)", 432 .name = "bootloader(nor)",
@@ -495,19 +495,19 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
495 495
496 &bfin_dpmc, 496 &bfin_dpmc,
497 497
498#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 498#if IS_ENABLED(CONFIG_SERIAL_BFIN)
499#ifdef CONFIG_SERIAL_BFIN_UART0 499#ifdef CONFIG_SERIAL_BFIN_UART0
500 &bfin_uart0_device, 500 &bfin_uart0_device,
501#endif 501#endif
502#endif 502#endif
503 503
504#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 504#if IS_ENABLED(CONFIG_BFIN_SIR)
505#ifdef CONFIG_BFIN_SIR0 505#ifdef CONFIG_BFIN_SIR0
506 &bfin_sir0_device, 506 &bfin_sir0_device,
507#endif 507#endif
508#endif 508#endif
509 509
510#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 510#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
511#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 511#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
512 &bfin_sport0_uart_device, 512 &bfin_sport0_uart_device,
513#endif 513#endif
@@ -516,31 +516,31 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
516#endif 516#endif
517#endif 517#endif
518 518
519#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 519#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
520 &rtc_device, 520 &rtc_device,
521#endif 521#endif
522 522
523#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 523#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
524 &isp1362_hcd_device, 524 &isp1362_hcd_device,
525#endif 525#endif
526 526
527#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 527#if IS_ENABLED(CONFIG_SMC91X)
528 &smc91x_device, 528 &smc91x_device,
529#endif 529#endif
530 530
531#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 531#if IS_ENABLED(CONFIG_SMSC911X)
532 &smsc911x_device, 532 &smsc911x_device,
533#endif 533#endif
534 534
535#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 535#if IS_ENABLED(CONFIG_USB_NET2272)
536 &net2272_bfin_device, 536 &net2272_bfin_device,
537#endif 537#endif
538 538
539#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 539#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
540 &bfin_spi0_device, 540 &bfin_spi0_device,
541#endif 541#endif
542 542
543#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 543#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
544 &para_flash_device, 544 &para_flash_device,
545#endif 545#endif
546}; 546};
@@ -549,7 +549,7 @@ static int __init cm_bf533_init(void)
549{ 549{
550 printk(KERN_INFO "%s(): registering device resources\n", __func__); 550 printk(KERN_INFO "%s(): registering device resources\n", __func__);
551 platform_add_devices(cm_bf533_devices, ARRAY_SIZE(cm_bf533_devices)); 551 platform_add_devices(cm_bf533_devices, ARRAY_SIZE(cm_bf533_devices));
552#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 552#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
553 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 553 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
554#endif 554#endif
555 return 0; 555 return 0;
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 90fb0d14b147..3625e9eaa8a8 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -14,7 +14,7 @@
14#include <linux/mtd/physmap.h> 14#include <linux/mtd/physmap.h>
15#include <linux/spi/spi.h> 15#include <linux/spi/spi.h>
16#include <linux/spi/flash.h> 16#include <linux/spi/flash.h>
17#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 17#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
18#include <linux/usb/isp1362.h> 18#include <linux/usb/isp1362.h>
19#endif 19#endif
20#include <linux/irq.h> 20#include <linux/irq.h>
@@ -29,7 +29,7 @@
29 */ 29 */
30const char bfin_board_name[] = "ADI BF533-EZKIT"; 30const char bfin_board_name[] = "ADI BF533-EZKIT";
31 31
32#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 32#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
33static struct platform_device rtc_device = { 33static struct platform_device rtc_device = {
34 .name = "rtc-bfin", 34 .name = "rtc-bfin",
35 .id = -1, 35 .id = -1,
@@ -40,7 +40,7 @@ static struct platform_device rtc_device = {
40 * USB-LAN EzExtender board 40 * USB-LAN EzExtender board
41 * Driver needs to know address, irq and flag pin. 41 * Driver needs to know address, irq and flag pin.
42 */ 42 */
43#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 43#if IS_ENABLED(CONFIG_SMC91X)
44#include <linux/smc91x.h> 44#include <linux/smc91x.h>
45 45
46static struct smc91x_platdata smc91x_info = { 46static struct smc91x_platdata smc91x_info = {
@@ -72,7 +72,7 @@ static struct platform_device smc91x_device = {
72}; 72};
73#endif 73#endif
74 74
75#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 75#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
76static struct mtd_partition ezkit_partitions_a[] = { 76static struct mtd_partition ezkit_partitions_a[] = {
77 { 77 {
78 .name = "bootloader(nor a)", 78 .name = "bootloader(nor a)",
@@ -138,7 +138,7 @@ static struct platform_device ezkit_flash_device_b = {
138}; 138};
139#endif 139#endif
140 140
141#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 141#if IS_ENABLED(CONFIG_MTD_PLATRAM)
142static struct platdata_mtd_ram sram_data_a = { 142static struct platdata_mtd_ram sram_data_a = {
143 .mapname = "Flash A SRAM", 143 .mapname = "Flash A SRAM",
144 .bankwidth = 2, 144 .bankwidth = 2,
@@ -182,7 +182,7 @@ static struct platform_device sram_device_b = {
182}; 182};
183#endif 183#endif
184 184
185#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 185#if IS_ENABLED(CONFIG_MTD_M25P80)
186static struct mtd_partition bfin_spi_flash_partitions[] = { 186static struct mtd_partition bfin_spi_flash_partitions[] = {
187 { 187 {
188 .name = "bootloader(spi)", 188 .name = "bootloader(spi)",
@@ -214,7 +214,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
214#endif 214#endif
215 215
216static struct spi_board_info bfin_spi_board_info[] __initdata = { 216static struct spi_board_info bfin_spi_board_info[] __initdata = {
217#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 217#if IS_ENABLED(CONFIG_MTD_M25P80)
218 { 218 {
219 /* the modalias must be the same as spi device driver name */ 219 /* the modalias must be the same as spi device driver name */
220 .modalias = "m25p80", /* Name of spi_driver for this device */ 220 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -227,7 +227,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
227 }, 227 },
228#endif 228#endif
229 229
230#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 230#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
231 { 231 {
232 .modalias = "ad183x", 232 .modalias = "ad183x",
233 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 233 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -235,7 +235,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
235 .chip_select = 4, 235 .chip_select = 4,
236 }, 236 },
237#endif 237#endif
238#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 238#if IS_ENABLED(CONFIG_SPI_SPIDEV)
239 { 239 {
240 .modalias = "spidev", 240 .modalias = "spidev",
241 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 241 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -245,7 +245,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
245#endif 245#endif
246}; 246};
247 247
248#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 248#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
249/* SPI (0) */ 249/* SPI (0) */
250static struct resource bfin_spi0_resource[] = { 250static struct resource bfin_spi0_resource[] = {
251 [0] = { 251 [0] = {
@@ -283,7 +283,7 @@ static struct platform_device bfin_spi0_device = {
283}; 283};
284#endif /* spi master and devices */ 284#endif /* spi master and devices */
285 285
286#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 286#if IS_ENABLED(CONFIG_SERIAL_BFIN)
287#ifdef CONFIG_SERIAL_BFIN_UART0 287#ifdef CONFIG_SERIAL_BFIN_UART0
288static struct resource bfin_uart0_resources[] = { 288static struct resource bfin_uart0_resources[] = {
289 { 289 {
@@ -334,7 +334,7 @@ static struct platform_device bfin_uart0_device = {
334#endif 334#endif
335#endif 335#endif
336 336
337#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 337#if IS_ENABLED(CONFIG_BFIN_SIR)
338#ifdef CONFIG_BFIN_SIR0 338#ifdef CONFIG_BFIN_SIR0
339static struct resource bfin_sir0_resources[] = { 339static struct resource bfin_sir0_resources[] = {
340 { 340 {
@@ -363,7 +363,7 @@ static struct platform_device bfin_sir0_device = {
363#endif 363#endif
364#endif 364#endif
365 365
366#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 366#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
367#include <linux/input.h> 367#include <linux/input.h>
368#include <linux/gpio_keys.h> 368#include <linux/gpio_keys.h>
369 369
@@ -387,7 +387,7 @@ static struct platform_device bfin_device_gpiokeys = {
387}; 387};
388#endif 388#endif
389 389
390#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 390#if IS_ENABLED(CONFIG_I2C_GPIO)
391#include <linux/i2c-gpio.h> 391#include <linux/i2c-gpio.h>
392 392
393static struct i2c_gpio_platform_data i2c_gpio_data = { 393static struct i2c_gpio_platform_data i2c_gpio_data = {
@@ -435,14 +435,14 @@ static struct platform_device bfin_dpmc = {
435}; 435};
436 436
437static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 437static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
438#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 438#if IS_ENABLED(CONFIG_FB_BFIN_7393)
439 { 439 {
440 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 440 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
441 }, 441 },
442#endif 442#endif
443}; 443};
444 444
445#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 445#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
446static struct platform_device bfin_i2s = { 446static struct platform_device bfin_i2s = {
447 .name = "bfin-i2s", 447 .name = "bfin-i2s",
448 .id = CONFIG_SND_BF5XX_SPORT_NUM, 448 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -450,7 +450,7 @@ static struct platform_device bfin_i2s = {
450}; 450};
451#endif 451#endif
452 452
453#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 453#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
454static struct platform_device bfin_ac97 = { 454static struct platform_device bfin_ac97 = {
455 .name = "bfin-ac97", 455 .name = "bfin-ac97",
456 .id = CONFIG_SND_BF5XX_SPORT_NUM, 456 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -462,53 +462,53 @@ static struct platform_device *ezkit_devices[] __initdata = {
462 462
463 &bfin_dpmc, 463 &bfin_dpmc,
464 464
465#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 465#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
466 &ezkit_flash_device_a, 466 &ezkit_flash_device_a,
467 &ezkit_flash_device_b, 467 &ezkit_flash_device_b,
468#endif 468#endif
469 469
470#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 470#if IS_ENABLED(CONFIG_MTD_PLATRAM)
471 &sram_device_a, 471 &sram_device_a,
472 &sram_device_b, 472 &sram_device_b,
473#endif 473#endif
474 474
475#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 475#if IS_ENABLED(CONFIG_SMC91X)
476 &smc91x_device, 476 &smc91x_device,
477#endif 477#endif
478 478
479#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 479#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
480 &bfin_spi0_device, 480 &bfin_spi0_device,
481#endif 481#endif
482 482
483#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 483#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
484 &rtc_device, 484 &rtc_device,
485#endif 485#endif
486 486
487#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 487#if IS_ENABLED(CONFIG_SERIAL_BFIN)
488#ifdef CONFIG_SERIAL_BFIN_UART0 488#ifdef CONFIG_SERIAL_BFIN_UART0
489 &bfin_uart0_device, 489 &bfin_uart0_device,
490#endif 490#endif
491#endif 491#endif
492 492
493#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 493#if IS_ENABLED(CONFIG_BFIN_SIR)
494#ifdef CONFIG_BFIN_SIR0 494#ifdef CONFIG_BFIN_SIR0
495 &bfin_sir0_device, 495 &bfin_sir0_device,
496#endif 496#endif
497#endif 497#endif
498 498
499#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 499#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
500 &bfin_device_gpiokeys, 500 &bfin_device_gpiokeys,
501#endif 501#endif
502 502
503#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 503#if IS_ENABLED(CONFIG_I2C_GPIO)
504 &i2c_gpio_device, 504 &i2c_gpio_device,
505#endif 505#endif
506 506
507#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 507#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
508 &bfin_i2s, 508 &bfin_i2s,
509#endif 509#endif
510 510
511#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 511#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
512 &bfin_ac97, 512 &bfin_ac97,
513#endif 513#endif
514}; 514};
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c
index e303dae4e2d9..39c8e8547b82 100644
--- a/arch/blackfin/mach-bf533/boards/ip0x.c
+++ b/arch/blackfin/mach-bf533/boards/ip0x.c
@@ -15,7 +15,7 @@
15#include <linux/mtd/partitions.h> 15#include <linux/mtd/partitions.h>
16#include <linux/spi/spi.h> 16#include <linux/spi/spi.h>
17#include <linux/spi/flash.h> 17#include <linux/spi/flash.h>
18#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 18#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
19#include <linux/usb/isp1362.h> 19#include <linux/usb/isp1362.h>
20#endif 20#endif
21#include <asm/irq.h> 21#include <asm/irq.h>
@@ -32,7 +32,7 @@ const char bfin_board_name[] = "IP04/IP08";
32 * Driver needs to know address, irq and flag pin. 32 * Driver needs to know address, irq and flag pin.
33 */ 33 */
34#if defined(CONFIG_BFIN532_IP0X) 34#if defined(CONFIG_BFIN532_IP0X)
35#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 35#if IS_ENABLED(CONFIG_DM9000)
36 36
37#include <linux/dm9000.h> 37#include <linux/dm9000.h>
38 38
@@ -104,10 +104,10 @@ static struct platform_device dm9000_device2 = {
104#endif 104#endif
105 105
106 106
107#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 107#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
108/* all SPI peripherals info goes here */ 108/* all SPI peripherals info goes here */
109 109
110#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 110#if IS_ENABLED(CONFIG_MMC_SPI)
111static struct bfin5xx_spi_chip mmc_spi_chip_info = { 111static struct bfin5xx_spi_chip mmc_spi_chip_info = {
112 .enable_dma = 0, /* if 1 - block!!! */ 112 .enable_dma = 0, /* if 1 - block!!! */
113}; 113};
@@ -116,7 +116,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
116/* Notice: for blackfin, the speed_hz is the value of register 116/* Notice: for blackfin, the speed_hz is the value of register
117 * SPI_BAUD, not the real baudrate */ 117 * SPI_BAUD, not the real baudrate */
118static struct spi_board_info bfin_spi_board_info[] __initdata = { 118static struct spi_board_info bfin_spi_board_info[] __initdata = {
119#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 119#if IS_ENABLED(CONFIG_MMC_SPI)
120 { 120 {
121 .modalias = "mmc_spi", 121 .modalias = "mmc_spi",
122 .max_speed_hz = 2, 122 .max_speed_hz = 2,
@@ -142,7 +142,7 @@ static struct platform_device spi_bfin_master_device = {
142}; 142};
143#endif /* spi master and devices */ 143#endif /* spi master and devices */
144 144
145#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 145#if IS_ENABLED(CONFIG_SERIAL_BFIN)
146#ifdef CONFIG_SERIAL_BFIN_UART0 146#ifdef CONFIG_SERIAL_BFIN_UART0
147static struct resource bfin_uart0_resources[] = { 147static struct resource bfin_uart0_resources[] = {
148 { 148 {
@@ -193,7 +193,7 @@ static struct platform_device bfin_uart0_device = {
193#endif 193#endif
194#endif 194#endif
195 195
196#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 196#if IS_ENABLED(CONFIG_BFIN_SIR)
197#ifdef CONFIG_BFIN_SIR0 197#ifdef CONFIG_BFIN_SIR0
198static struct resource bfin_sir0_resources[] = { 198static struct resource bfin_sir0_resources[] = {
199 { 199 {
@@ -222,7 +222,7 @@ static struct platform_device bfin_sir0_device = {
222#endif 222#endif
223#endif 223#endif
224 224
225#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 225#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
226static struct resource isp1362_hcd_resources[] = { 226static struct resource isp1362_hcd_resources[] = {
227 { 227 {
228 .start = 0x20300000, 228 .start = 0x20300000,
@@ -264,29 +264,29 @@ static struct platform_device isp1362_hcd_device = {
264 264
265static struct platform_device *ip0x_devices[] __initdata = { 265static struct platform_device *ip0x_devices[] __initdata = {
266#if defined(CONFIG_BFIN532_IP0X) 266#if defined(CONFIG_BFIN532_IP0X)
267#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 267#if IS_ENABLED(CONFIG_DM9000)
268 &dm9000_device1, 268 &dm9000_device1,
269 &dm9000_device2, 269 &dm9000_device2,
270#endif 270#endif
271#endif 271#endif
272 272
273#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 273#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
274 &spi_bfin_master_device, 274 &spi_bfin_master_device,
275#endif 275#endif
276 276
277#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 277#if IS_ENABLED(CONFIG_SERIAL_BFIN)
278#ifdef CONFIG_SERIAL_BFIN_UART0 278#ifdef CONFIG_SERIAL_BFIN_UART0
279 &bfin_uart0_device, 279 &bfin_uart0_device,
280#endif 280#endif
281#endif 281#endif
282 282
283#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 283#if IS_ENABLED(CONFIG_BFIN_SIR)
284#ifdef CONFIG_BFIN_SIR0 284#ifdef CONFIG_BFIN_SIR0
285 &bfin_sir0_device, 285 &bfin_sir0_device,
286#endif 286#endif
287#endif 287#endif
288 288
289#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 289#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
290 &isp1362_hcd_device, 290 &isp1362_hcd_device,
291#endif 291#endif
292}; 292};
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 4da70c47cc05..d0989290f54c 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -14,7 +14,7 @@
14#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/spi/flash.h> 15#include <linux/spi/flash.h>
16#include <linux/spi/mmc_spi.h> 16#include <linux/spi/mmc_spi.h>
17#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 17#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
18#include <linux/usb/isp1362.h> 18#include <linux/usb/isp1362.h>
19#endif 19#endif
20#include <linux/irq.h> 20#include <linux/irq.h>
@@ -30,7 +30,7 @@
30 */ 30 */
31const char bfin_board_name[] = "ADI BF533-STAMP"; 31const char bfin_board_name[] = "ADI BF533-STAMP";
32 32
33#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 33#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
34static struct platform_device rtc_device = { 34static struct platform_device rtc_device = {
35 .name = "rtc-bfin", 35 .name = "rtc-bfin",
36 .id = -1, 36 .id = -1,
@@ -40,7 +40,7 @@ static struct platform_device rtc_device = {
40/* 40/*
41 * Driver needs to know address, irq and flag pin. 41 * Driver needs to know address, irq and flag pin.
42 */ 42 */
43#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 43#if IS_ENABLED(CONFIG_SMC91X)
44#include <linux/smc91x.h> 44#include <linux/smc91x.h>
45 45
46static struct smc91x_platdata smc91x_info = { 46static struct smc91x_platdata smc91x_info = {
@@ -73,7 +73,7 @@ static struct platform_device smc91x_device = {
73}; 73};
74#endif 74#endif
75 75
76#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 76#if IS_ENABLED(CONFIG_USB_NET2272)
77static struct resource net2272_bfin_resources[] = { 77static struct resource net2272_bfin_resources[] = {
78 { 78 {
79 .start = 0x20300000, 79 .start = 0x20300000,
@@ -97,7 +97,7 @@ static struct platform_device net2272_bfin_device = {
97}; 97};
98#endif 98#endif
99 99
100#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) 100#if IS_ENABLED(CONFIG_MTD_BFIN_ASYNC)
101static struct mtd_partition stamp_partitions[] = { 101static struct mtd_partition stamp_partitions[] = {
102 { 102 {
103 .name = "bootloader(nor)", 103 .name = "bootloader(nor)",
@@ -147,7 +147,7 @@ static struct platform_device stamp_flash_device = {
147}; 147};
148#endif 148#endif
149 149
150#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 150#if IS_ENABLED(CONFIG_MTD_M25P80)
151static struct mtd_partition bfin_spi_flash_partitions[] = { 151static struct mtd_partition bfin_spi_flash_partitions[] = {
152 { 152 {
153 .name = "bootloader(spi)", 153 .name = "bootloader(spi)",
@@ -178,7 +178,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
178}; 178};
179#endif 179#endif
180 180
181#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 181#if IS_ENABLED(CONFIG_MMC_SPI)
182#define MMC_SPI_CARD_DETECT_INT IRQ_PF5 182#define MMC_SPI_CARD_DETECT_INT IRQ_PF5
183static int bfin_mmc_spi_init(struct device *dev, 183static int bfin_mmc_spi_init(struct device *dev,
184 irqreturn_t (*detect_int)(int, void *), void *data) 184 irqreturn_t (*detect_int)(int, void *), void *data)
@@ -206,7 +206,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
206#endif 206#endif
207 207
208static struct spi_board_info bfin_spi_board_info[] __initdata = { 208static struct spi_board_info bfin_spi_board_info[] __initdata = {
209#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 209#if IS_ENABLED(CONFIG_MTD_M25P80)
210 { 210 {
211 /* the modalias must be the same as spi device driver name */ 211 /* the modalias must be the same as spi device driver name */
212 .modalias = "m25p80", /* Name of spi_driver for this device */ 212 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -219,8 +219,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
219 }, 219 },
220#endif 220#endif
221 221
222#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 222#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
223 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
224 { 223 {
225 .modalias = "ad1836", 224 .modalias = "ad1836",
226 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 225 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -231,7 +230,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
231 }, 230 },
232#endif 231#endif
233 232
234#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 233#if IS_ENABLED(CONFIG_SPI_SPIDEV)
235 { 234 {
236 .modalias = "spidev", 235 .modalias = "spidev",
237 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 236 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -239,7 +238,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
239 .chip_select = 1, 238 .chip_select = 1,
240 }, 239 },
241#endif 240#endif
242#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 241#if IS_ENABLED(CONFIG_MMC_SPI)
243 { 242 {
244 .modalias = "mmc_spi", 243 .modalias = "mmc_spi",
245 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 244 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -252,7 +251,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
252#endif 251#endif
253}; 252};
254 253
255#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 254#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
256/* SPI (0) */ 255/* SPI (0) */
257static struct resource bfin_spi0_resource[] = { 256static struct resource bfin_spi0_resource[] = {
258 [0] = { 257 [0] = {
@@ -290,7 +289,7 @@ static struct platform_device bfin_spi0_device = {
290}; 289};
291#endif /* spi master and devices */ 290#endif /* spi master and devices */
292 291
293#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 292#if IS_ENABLED(CONFIG_SERIAL_BFIN)
294#ifdef CONFIG_SERIAL_BFIN_UART0 293#ifdef CONFIG_SERIAL_BFIN_UART0
295static struct resource bfin_uart0_resources[] = { 294static struct resource bfin_uart0_resources[] = {
296 { 295 {
@@ -341,7 +340,7 @@ static struct platform_device bfin_uart0_device = {
341#endif 340#endif
342#endif 341#endif
343 342
344#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 343#if IS_ENABLED(CONFIG_BFIN_SIR)
345#ifdef CONFIG_BFIN_SIR0 344#ifdef CONFIG_BFIN_SIR0
346static struct resource bfin_sir0_resources[] = { 345static struct resource bfin_sir0_resources[] = {
347 { 346 {
@@ -370,8 +369,7 @@ static struct platform_device bfin_sir0_device = {
370#endif 369#endif
371#endif 370#endif
372 371
373#if defined(CONFIG_SERIAL_BFIN_SPORT) || \ 372#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
374 defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
375#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 373#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
376static struct resource bfin_sport0_uart_resources[] = { 374static struct resource bfin_sport0_uart_resources[] = {
377 { 375 {
@@ -442,7 +440,7 @@ static struct platform_device bfin_sport1_uart_device = {
442#endif 440#endif
443#endif 441#endif
444 442
445#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 443#if IS_ENABLED(CONFIG_BFIN_SPORT)
446static struct resource bfin_sport0_resources[] = { 444static struct resource bfin_sport0_resources[] = {
447 { 445 {
448 .start = SPORT0_TCR1, 446 .start = SPORT0_TCR1,
@@ -486,7 +484,7 @@ static struct platform_device bfin_sport0_device = {
486}; 484};
487#endif 485#endif
488 486
489#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 487#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
490#include <linux/input.h> 488#include <linux/input.h>
491#include <linux/gpio_keys.h> 489#include <linux/gpio_keys.h>
492 490
@@ -509,7 +507,7 @@ static struct platform_device bfin_device_gpiokeys = {
509}; 507};
510#endif 508#endif
511 509
512#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 510#if IS_ENABLED(CONFIG_I2C_GPIO)
513#include <linux/i2c-gpio.h> 511#include <linux/i2c-gpio.h>
514 512
515static struct i2c_gpio_platform_data i2c_gpio_data = { 513static struct i2c_gpio_platform_data i2c_gpio_data = {
@@ -530,29 +528,29 @@ static struct platform_device i2c_gpio_device = {
530#endif 528#endif
531 529
532static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 530static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
533#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) 531#if IS_ENABLED(CONFIG_JOYSTICK_AD7142)
534 { 532 {
535 I2C_BOARD_INFO("ad7142_joystick", 0x2C), 533 I2C_BOARD_INFO("ad7142_joystick", 0x2C),
536 .irq = 39, 534 .irq = 39,
537 }, 535 },
538#endif 536#endif
539#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 537#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
540 { 538 {
541 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 539 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
542 }, 540 },
543#endif 541#endif
544#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 542#if IS_ENABLED(CONFIG_INPUT_PCF8574)
545 { 543 {
546 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 544 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
547 .irq = 39, 545 .irq = 39,
548 }, 546 },
549#endif 547#endif
550#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 548#if IS_ENABLED(CONFIG_FB_BFIN_7393)
551 { 549 {
552 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 550 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
553 }, 551 },
554#endif 552#endif
555#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 553#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
556 { 554 {
557 I2C_BOARD_INFO("ad5252", 0x2f), 555 I2C_BOARD_INFO("ad5252", 0x2f),
558 }, 556 },
@@ -586,9 +584,8 @@ static struct platform_device bfin_dpmc = {
586 }, 584 },
587}; 585};
588 586
589#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ 587#if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \
590 defined(CONFIG_SND_BF5XX_AC97) || \ 588 IS_ENABLED(CONFIG_SND_BF5XX_AC97)
591 defined(CONFIG_SND_BF5XX_AC97_MODULE)
592 589
593#include <asm/bfin_sport.h> 590#include <asm/bfin_sport.h>
594 591
@@ -640,22 +637,21 @@ static struct resource bfin_snd_resources[][4] = {
640}; 637};
641#endif 638#endif
642 639
643#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 640#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
644static struct platform_device bfin_i2s_pcm = { 641static struct platform_device bfin_i2s_pcm = {
645 .name = "bfin-i2s-pcm-audio", 642 .name = "bfin-i2s-pcm-audio",
646 .id = -1, 643 .id = -1,
647}; 644};
648#endif 645#endif
649 646
650#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 647#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
651static struct platform_device bfin_ac97_pcm = { 648static struct platform_device bfin_ac97_pcm = {
652 .name = "bfin-ac97-pcm-audio", 649 .name = "bfin-ac97-pcm-audio",
653 .id = -1, 650 .id = -1,
654}; 651};
655#endif 652#endif
656 653
657#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 654#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
658 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
659static const char * const ad1836_link[] = { 655static const char * const ad1836_link[] = {
660 "bfin-i2s.0", 656 "bfin-i2s.0",
661 "spi0.4", 657 "spi0.4",
@@ -669,8 +665,7 @@ static struct platform_device bfin_ad1836_machine = {
669}; 665};
670#endif 666#endif
671 667
672#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 668#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
673 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
674static const unsigned ad73311_gpio[] = { 669static const unsigned ad73311_gpio[] = {
675 GPIO_PF4, 670 GPIO_PF4,
676}; 671};
@@ -684,22 +679,21 @@ static struct platform_device bfin_ad73311_machine = {
684}; 679};
685#endif 680#endif
686 681
687#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) 682#if IS_ENABLED(CONFIG_SND_SOC_AD73311)
688static struct platform_device bfin_ad73311_codec_device = { 683static struct platform_device bfin_ad73311_codec_device = {
689 .name = "ad73311", 684 .name = "ad73311",
690 .id = -1, 685 .id = -1,
691}; 686};
692#endif 687#endif
693 688
694#if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE) 689#if IS_ENABLED(CONFIG_SND_SOC_AD74111)
695static struct platform_device bfin_ad74111_codec_device = { 690static struct platform_device bfin_ad74111_codec_device = {
696 .name = "ad74111", 691 .name = "ad74111",
697 .id = -1, 692 .id = -1,
698}; 693};
699#endif 694#endif
700 695
701#if defined(CONFIG_SND_BF5XX_SOC_I2S) || \ 696#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
702 defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
703static struct platform_device bfin_i2s = { 697static struct platform_device bfin_i2s = {
704 .name = "bfin-i2s", 698 .name = "bfin-i2s",
705 .id = CONFIG_SND_BF5XX_SPORT_NUM, 699 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -712,8 +706,7 @@ static struct platform_device bfin_i2s = {
712}; 706};
713#endif 707#endif
714 708
715#if defined(CONFIG_SND_BF5XX_SOC_AC97) || \ 709#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
716 defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
717static struct platform_device bfin_ac97 = { 710static struct platform_device bfin_ac97 = {
718 .name = "bfin-ac97", 711 .name = "bfin-ac97",
719 .id = CONFIG_SND_BF5XX_SPORT_NUM, 712 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -730,36 +723,35 @@ static struct platform_device *stamp_devices[] __initdata = {
730 723
731 &bfin_dpmc, 724 &bfin_dpmc,
732 725
733#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 726#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
734 &rtc_device, 727 &rtc_device,
735#endif 728#endif
736 729
737#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 730#if IS_ENABLED(CONFIG_SMC91X)
738 &smc91x_device, 731 &smc91x_device,
739#endif 732#endif
740 733
741#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 734#if IS_ENABLED(CONFIG_USB_NET2272)
742 &net2272_bfin_device, 735 &net2272_bfin_device,
743#endif 736#endif
744 737
745#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 738#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
746 &bfin_spi0_device, 739 &bfin_spi0_device,
747#endif 740#endif
748 741
749#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 742#if IS_ENABLED(CONFIG_SERIAL_BFIN)
750#ifdef CONFIG_SERIAL_BFIN_UART0 743#ifdef CONFIG_SERIAL_BFIN_UART0
751 &bfin_uart0_device, 744 &bfin_uart0_device,
752#endif 745#endif
753#endif 746#endif
754 747
755#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 748#if IS_ENABLED(CONFIG_BFIN_SIR)
756#ifdef CONFIG_BFIN_SIR0 749#ifdef CONFIG_BFIN_SIR0
757 &bfin_sir0_device, 750 &bfin_sir0_device,
758#endif 751#endif
759#endif 752#endif
760 753
761#if defined(CONFIG_SERIAL_BFIN_SPORT) || \ 754#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
762 defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
763#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 755#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
764 &bfin_sport0_uart_device, 756 &bfin_sport0_uart_device,
765#endif 757#endif
@@ -768,58 +760,54 @@ static struct platform_device *stamp_devices[] __initdata = {
768#endif 760#endif
769#endif 761#endif
770 762
771#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 763#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
772 &bfin_device_gpiokeys, 764 &bfin_device_gpiokeys,
773#endif 765#endif
774 766
775#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 767#if IS_ENABLED(CONFIG_I2C_GPIO)
776 &i2c_gpio_device, 768 &i2c_gpio_device,
777#endif 769#endif
778 770
779#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) 771#if IS_ENABLED(CONFIG_MTD_BFIN_ASYNC)
780 &stamp_flash_device, 772 &stamp_flash_device,
781#endif 773#endif
782 774
783#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 775#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
784 &bfin_i2s_pcm, 776 &bfin_i2s_pcm,
785#endif 777#endif
786 778
787#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 779#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
788 &bfin_ac97_pcm, 780 &bfin_ac97_pcm,
789#endif 781#endif
790 782
791#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 783#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
792 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
793 &bfin_ad1836_machine, 784 &bfin_ad1836_machine,
794#endif 785#endif
795 786
796#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 787#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
797 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
798 &bfin_ad73311_machine, 788 &bfin_ad73311_machine,
799#endif 789#endif
800 790
801#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) 791#if IS_ENABLED(CONFIG_SND_SOC_AD73311)
802 &bfin_ad73311_codec_device, 792 &bfin_ad73311_codec_device,
803#endif 793#endif
804 794
805#if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE) 795#if IS_ENABLED(CONFIG_SND_SOC_AD74111)
806 &bfin_ad74111_codec_device, 796 &bfin_ad74111_codec_device,
807#endif 797#endif
808 798
809#if defined(CONFIG_SND_BF5XX_SOC_I2S) || \ 799#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
810 defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
811 &bfin_i2s, 800 &bfin_i2s,
812#endif 801#endif
813 802
814#if defined(CONFIG_SND_BF5XX_SOC_AC97) || \ 803#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
815 defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
816 &bfin_ac97, 804 &bfin_ac97,
817#endif 805#endif
818}; 806};
819 807
820static int __init net2272_init(void) 808static int __init net2272_init(void)
821{ 809{
822#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 810#if IS_ENABLED(CONFIG_USB_NET2272)
823 int ret; 811 int ret;
824 812
825 /* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */ 813 /* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */
@@ -865,7 +853,7 @@ static int __init stamp_init(void)
865 if (ret < 0) 853 if (ret < 0)
866 return ret; 854 return ret;
867 855
868#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 856#if IS_ENABLED(CONFIG_SMC91X)
869 /* 857 /*
870 * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC. 858 * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
871 * the bfin-async-map driver takes care of flipping between 859 * the bfin-async-map driver takes care of flipping between
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 85e4fc9f9c22..c65c6dbda3da 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -16,7 +16,7 @@
16#include <linux/mtd/physmap.h> 16#include <linux/mtd/physmap.h>
17#include <linux/spi/spi.h> 17#include <linux/spi/spi.h>
18#include <linux/spi/flash.h> 18#include <linux/spi/flash.h>
19#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 19#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
20#include <linux/usb/isp1362.h> 20#include <linux/usb/isp1362.h>
21#endif 21#endif
22#include <linux/ata_platform.h> 22#include <linux/ata_platform.h>
@@ -32,10 +32,10 @@
32 */ 32 */
33const char bfin_board_name[] = "Bluetechnix CM BF537E"; 33const char bfin_board_name[] = "Bluetechnix CM BF537E";
34 34
35#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 35#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
36/* all SPI peripherals info goes here */ 36/* all SPI peripherals info goes here */
37 37
38#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 38#if IS_ENABLED(CONFIG_MTD_M25P80)
39static struct mtd_partition bfin_spi_flash_partitions[] = { 39static struct mtd_partition bfin_spi_flash_partitions[] = {
40 { 40 {
41 .name = "bootloader(spi)", 41 .name = "bootloader(spi)",
@@ -66,14 +66,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
66}; 66};
67#endif 67#endif
68 68
69#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 69#if IS_ENABLED(CONFIG_MMC_SPI)
70static struct bfin5xx_spi_chip mmc_spi_chip_info = { 70static struct bfin5xx_spi_chip mmc_spi_chip_info = {
71 .enable_dma = 0, 71 .enable_dma = 0,
72}; 72};
73#endif 73#endif
74 74
75static struct spi_board_info bfin_spi_board_info[] __initdata = { 75static struct spi_board_info bfin_spi_board_info[] __initdata = {
76#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 76#if IS_ENABLED(CONFIG_MTD_M25P80)
77 { 77 {
78 /* the modalias must be the same as spi device driver name */ 78 /* the modalias must be the same as spi device driver name */
79 .modalias = "m25p80", /* Name of spi_driver for this device */ 79 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -86,7 +86,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
86 }, 86 },
87#endif 87#endif
88 88
89#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 89#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
90 { 90 {
91 .modalias = "ad183x", 91 .modalias = "ad183x",
92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -95,7 +95,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
95 }, 95 },
96#endif 96#endif
97 97
98#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 98#if IS_ENABLED(CONFIG_MMC_SPI)
99 { 99 {
100 .modalias = "mmc_spi", 100 .modalias = "mmc_spi",
101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -144,7 +144,7 @@ static struct platform_device bfin_spi0_device = {
144}; 144};
145#endif /* spi master and devices */ 145#endif /* spi master and devices */
146 146
147#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) 147#if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
148 148
149/* SPORT SPI controller data */ 149/* SPORT SPI controller data */
150static struct bfin5xx_spi_master bfin_sport_spi0_info = { 150static struct bfin5xx_spi_master bfin_sport_spi0_info = {
@@ -209,20 +209,20 @@ static struct platform_device bfin_sport_spi1_device = {
209 209
210#endif /* sport spi master and devices */ 210#endif /* sport spi master and devices */
211 211
212#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 212#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
213static struct platform_device rtc_device = { 213static struct platform_device rtc_device = {
214 .name = "rtc-bfin", 214 .name = "rtc-bfin",
215 .id = -1, 215 .id = -1,
216}; 216};
217#endif 217#endif
218 218
219#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 219#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
220static struct platform_device hitachi_fb_device = { 220static struct platform_device hitachi_fb_device = {
221 .name = "hitachi-tx09", 221 .name = "hitachi-tx09",
222}; 222};
223#endif 223#endif
224 224
225#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 225#if IS_ENABLED(CONFIG_SMC91X)
226#include <linux/smc91x.h> 226#include <linux/smc91x.h>
227 227
228static struct smc91x_platdata smc91x_info = { 228static struct smc91x_platdata smc91x_info = {
@@ -254,7 +254,7 @@ static struct platform_device smc91x_device = {
254}; 254};
255#endif 255#endif
256 256
257#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 257#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
258static struct resource isp1362_hcd_resources[] = { 258static struct resource isp1362_hcd_resources[] = {
259 { 259 {
260 .start = 0x20308000, 260 .start = 0x20308000,
@@ -293,7 +293,7 @@ static struct platform_device isp1362_hcd_device = {
293}; 293};
294#endif 294#endif
295 295
296#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 296#if IS_ENABLED(CONFIG_USB_NET2272)
297static struct resource net2272_bfin_resources[] = { 297static struct resource net2272_bfin_resources[] = {
298 { 298 {
299 .start = 0x20300000, 299 .start = 0x20300000,
@@ -314,7 +314,7 @@ static struct platform_device net2272_bfin_device = {
314}; 314};
315#endif 315#endif
316 316
317#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 317#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
318static struct mtd_partition cm_partitions[] = { 318static struct mtd_partition cm_partitions[] = {
319 { 319 {
320 .name = "bootloader(nor)", 320 .name = "bootloader(nor)",
@@ -363,7 +363,7 @@ static struct platform_device cm_flash_device = {
363}; 363};
364#endif 364#endif
365 365
366#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 366#if IS_ENABLED(CONFIG_SERIAL_BFIN)
367#ifdef CONFIG_SERIAL_BFIN_UART0 367#ifdef CONFIG_SERIAL_BFIN_UART0
368static struct resource bfin_uart0_resources[] = { 368static struct resource bfin_uart0_resources[] = {
369 { 369 {
@@ -498,7 +498,7 @@ static struct platform_device bfin_uart1_device = {
498#endif 498#endif
499#endif 499#endif
500 500
501#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 501#if IS_ENABLED(CONFIG_BFIN_SIR)
502#ifdef CONFIG_BFIN_SIR0 502#ifdef CONFIG_BFIN_SIR0
503static struct resource bfin_sir0_resources[] = { 503static struct resource bfin_sir0_resources[] = {
504 { 504 {
@@ -551,7 +551,7 @@ static struct platform_device bfin_sir1_device = {
551#endif 551#endif
552#endif 552#endif
553 553
554#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 554#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
555static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 555static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
556 556
557static struct resource bfin_twi0_resource[] = { 557static struct resource bfin_twi0_resource[] = {
@@ -578,14 +578,14 @@ static struct platform_device i2c_bfin_twi_device = {
578}; 578};
579#endif 579#endif
580 580
581#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) \ 581#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) \
582|| defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 582|| IS_ENABLED(CONFIG_BFIN_SPORT)
583unsigned short bfin_sport0_peripherals[] = { 583unsigned short bfin_sport0_peripherals[] = {
584 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 584 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
585 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 585 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
586}; 586};
587#endif 587#endif
588#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 588#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
589#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 589#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
590static struct resource bfin_sport0_uart_resources[] = { 590static struct resource bfin_sport0_uart_resources[] = {
591 { 591 {
@@ -650,7 +650,7 @@ static struct platform_device bfin_sport1_uart_device = {
650}; 650};
651#endif 651#endif
652#endif 652#endif
653#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 653#if IS_ENABLED(CONFIG_BFIN_SPORT)
654static struct resource bfin_sport0_resources[] = { 654static struct resource bfin_sport0_resources[] = {
655 { 655 {
656 .start = SPORT0_TCR1, 656 .start = SPORT0_TCR1,
@@ -694,7 +694,7 @@ static struct platform_device bfin_sport0_device = {
694}; 694};
695#endif 695#endif
696 696
697#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 697#if IS_ENABLED(CONFIG_BFIN_MAC)
698#include <linux/bfin_mac.h> 698#include <linux/bfin_mac.h>
699static const unsigned short bfin_mac_peripherals[] = P_MII0; 699static const unsigned short bfin_mac_peripherals[] = P_MII0;
700 700
@@ -727,7 +727,7 @@ static struct platform_device bfin_mac_device = {
727}; 727};
728#endif 728#endif
729 729
730#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 730#if IS_ENABLED(CONFIG_PATA_PLATFORM)
731#define PATA_INT IRQ_PF14 731#define PATA_INT IRQ_PF14
732 732
733static struct pata_platform_info bfin_pata_platform_data = { 733static struct pata_platform_info bfin_pata_platform_data = {
@@ -795,19 +795,19 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
795 795
796 &bfin_dpmc, 796 &bfin_dpmc,
797 797
798#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 798#if IS_ENABLED(CONFIG_BFIN_SPORT)
799 &bfin_sport0_device, 799 &bfin_sport0_device,
800#endif 800#endif
801 801
802#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 802#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
803 &hitachi_fb_device, 803 &hitachi_fb_device,
804#endif 804#endif
805 805
806#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 806#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
807 &rtc_device, 807 &rtc_device,
808#endif 808#endif
809 809
810#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 810#if IS_ENABLED(CONFIG_SERIAL_BFIN)
811#ifdef CONFIG_SERIAL_BFIN_UART0 811#ifdef CONFIG_SERIAL_BFIN_UART0
812 &bfin_uart0_device, 812 &bfin_uart0_device,
813#endif 813#endif
@@ -816,7 +816,7 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
816#endif 816#endif
817#endif 817#endif
818 818
819#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 819#if IS_ENABLED(CONFIG_BFIN_SIR)
820#ifdef CONFIG_BFIN_SIR0 820#ifdef CONFIG_BFIN_SIR0
821 &bfin_sir0_device, 821 &bfin_sir0_device,
822#endif 822#endif
@@ -825,11 +825,11 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
825#endif 825#endif
826#endif 826#endif
827 827
828#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 828#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
829 &i2c_bfin_twi_device, 829 &i2c_bfin_twi_device,
830#endif 830#endif
831 831
832#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 832#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
833#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 833#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
834 &bfin_sport0_uart_device, 834 &bfin_sport0_uart_device,
835#endif 835#endif
@@ -838,44 +838,44 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
838#endif 838#endif
839#endif 839#endif
840 840
841#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 841#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
842 &isp1362_hcd_device, 842 &isp1362_hcd_device,
843#endif 843#endif
844 844
845#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 845#if IS_ENABLED(CONFIG_SMC91X)
846 &smc91x_device, 846 &smc91x_device,
847#endif 847#endif
848 848
849#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 849#if IS_ENABLED(CONFIG_BFIN_MAC)
850 &bfin_mii_bus, 850 &bfin_mii_bus,
851 &bfin_mac_device, 851 &bfin_mac_device,
852#endif 852#endif
853 853
854#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 854#if IS_ENABLED(CONFIG_USB_NET2272)
855 &net2272_bfin_device, 855 &net2272_bfin_device,
856#endif 856#endif
857 857
858#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 858#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
859 &bfin_spi0_device, 859 &bfin_spi0_device,
860#endif 860#endif
861 861
862#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) 862#if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
863 &bfin_sport_spi0_device, 863 &bfin_sport_spi0_device,
864 &bfin_sport_spi1_device, 864 &bfin_sport_spi1_device,
865#endif 865#endif
866 866
867#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 867#if IS_ENABLED(CONFIG_PATA_PLATFORM)
868 &bfin_pata_device, 868 &bfin_pata_device,
869#endif 869#endif
870 870
871#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 871#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
872 &cm_flash_device, 872 &cm_flash_device,
873#endif 873#endif
874}; 874};
875 875
876static int __init net2272_init(void) 876static int __init net2272_init(void)
877{ 877{
878#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 878#if IS_ENABLED(CONFIG_USB_NET2272)
879 int ret; 879 int ret;
880 880
881 ret = gpio_request(GPIO_PG14, "net2272"); 881 ret = gpio_request(GPIO_PG14, "net2272");
@@ -895,11 +895,11 @@ static int __init cm_bf537e_init(void)
895{ 895{
896 printk(KERN_INFO "%s(): registering device resources\n", __func__); 896 printk(KERN_INFO "%s(): registering device resources\n", __func__);
897 platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices)); 897 platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices));
898#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 898#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
899 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 899 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
900#endif 900#endif
901 901
902#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 902#if IS_ENABLED(CONFIG_PATA_PLATFORM)
903 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 903 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
904#endif 904#endif
905 905
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 0143d8bef909..af58454b4bff 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -16,7 +16,7 @@
16#include <linux/mtd/physmap.h> 16#include <linux/mtd/physmap.h>
17#include <linux/spi/spi.h> 17#include <linux/spi/spi.h>
18#include <linux/spi/flash.h> 18#include <linux/spi/flash.h>
19#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 19#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
20#include <linux/usb/isp1362.h> 20#include <linux/usb/isp1362.h>
21#endif 21#endif
22#include <linux/ata_platform.h> 22#include <linux/ata_platform.h>
@@ -32,10 +32,10 @@
32 */ 32 */
33const char bfin_board_name[] = "Bluetechnix CM BF537U"; 33const char bfin_board_name[] = "Bluetechnix CM BF537U";
34 34
35#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 35#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
36/* all SPI peripherals info goes here */ 36/* all SPI peripherals info goes here */
37 37
38#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 38#if IS_ENABLED(CONFIG_MTD_M25P80)
39static struct mtd_partition bfin_spi_flash_partitions[] = { 39static struct mtd_partition bfin_spi_flash_partitions[] = {
40 { 40 {
41 .name = "bootloader(spi)", 41 .name = "bootloader(spi)",
@@ -66,14 +66,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
66}; 66};
67#endif 67#endif
68 68
69#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 69#if IS_ENABLED(CONFIG_MMC_SPI)
70static struct bfin5xx_spi_chip mmc_spi_chip_info = { 70static struct bfin5xx_spi_chip mmc_spi_chip_info = {
71 .enable_dma = 0, 71 .enable_dma = 0,
72}; 72};
73#endif 73#endif
74 74
75static struct spi_board_info bfin_spi_board_info[] __initdata = { 75static struct spi_board_info bfin_spi_board_info[] __initdata = {
76#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 76#if IS_ENABLED(CONFIG_MTD_M25P80)
77 { 77 {
78 /* the modalias must be the same as spi device driver name */ 78 /* the modalias must be the same as spi device driver name */
79 .modalias = "m25p80", /* Name of spi_driver for this device */ 79 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -86,7 +86,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
86 }, 86 },
87#endif 87#endif
88 88
89#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 89#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
90 { 90 {
91 .modalias = "ad183x", 91 .modalias = "ad183x",
92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -95,7 +95,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
95 }, 95 },
96#endif 96#endif
97 97
98#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 98#if IS_ENABLED(CONFIG_MMC_SPI)
99 { 99 {
100 .modalias = "mmc_spi", 100 .modalias = "mmc_spi",
101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -144,20 +144,20 @@ static struct platform_device bfin_spi0_device = {
144}; 144};
145#endif /* spi master and devices */ 145#endif /* spi master and devices */
146 146
147#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 147#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
148static struct platform_device rtc_device = { 148static struct platform_device rtc_device = {
149 .name = "rtc-bfin", 149 .name = "rtc-bfin",
150 .id = -1, 150 .id = -1,
151}; 151};
152#endif 152#endif
153 153
154#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 154#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
155static struct platform_device hitachi_fb_device = { 155static struct platform_device hitachi_fb_device = {
156 .name = "hitachi-tx09", 156 .name = "hitachi-tx09",
157}; 157};
158#endif 158#endif
159 159
160#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 160#if IS_ENABLED(CONFIG_SMC91X)
161#include <linux/smc91x.h> 161#include <linux/smc91x.h>
162 162
163static struct smc91x_platdata smc91x_info = { 163static struct smc91x_platdata smc91x_info = {
@@ -189,7 +189,7 @@ static struct platform_device smc91x_device = {
189}; 189};
190#endif 190#endif
191 191
192#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 192#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
193static struct resource isp1362_hcd_resources[] = { 193static struct resource isp1362_hcd_resources[] = {
194 { 194 {
195 .start = 0x20308000, 195 .start = 0x20308000,
@@ -228,7 +228,7 @@ static struct platform_device isp1362_hcd_device = {
228}; 228};
229#endif 229#endif
230 230
231#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 231#if IS_ENABLED(CONFIG_USB_NET2272)
232static struct resource net2272_bfin_resources[] = { 232static struct resource net2272_bfin_resources[] = {
233 { 233 {
234 .start = 0x20200000, 234 .start = 0x20200000,
@@ -249,7 +249,7 @@ static struct platform_device net2272_bfin_device = {
249}; 249};
250#endif 250#endif
251 251
252#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 252#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
253static struct mtd_partition cm_partitions[] = { 253static struct mtd_partition cm_partitions[] = {
254 { 254 {
255 .name = "bootloader(nor)", 255 .name = "bootloader(nor)",
@@ -298,7 +298,7 @@ static struct platform_device cm_flash_device = {
298}; 298};
299#endif 299#endif
300 300
301#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 301#if IS_ENABLED(CONFIG_SERIAL_BFIN)
302#ifdef CONFIG_SERIAL_BFIN_UART0 302#ifdef CONFIG_SERIAL_BFIN_UART0
303static struct resource bfin_uart0_resources[] = { 303static struct resource bfin_uart0_resources[] = {
304 { 304 {
@@ -397,7 +397,7 @@ static struct platform_device bfin_uart1_device = {
397#endif 397#endif
398#endif 398#endif
399 399
400#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 400#if IS_ENABLED(CONFIG_BFIN_SIR)
401#ifdef CONFIG_BFIN_SIR0 401#ifdef CONFIG_BFIN_SIR0
402static struct resource bfin_sir0_resources[] = { 402static struct resource bfin_sir0_resources[] = {
403 { 403 {
@@ -450,7 +450,7 @@ static struct platform_device bfin_sir1_device = {
450#endif 450#endif
451#endif 451#endif
452 452
453#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 453#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
454static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 454static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
455 455
456static struct resource bfin_twi0_resource[] = { 456static struct resource bfin_twi0_resource[] = {
@@ -477,7 +477,7 @@ static struct platform_device i2c_bfin_twi_device = {
477}; 477};
478#endif 478#endif
479 479
480#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 480#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
481#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 481#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
482static struct resource bfin_sport0_uart_resources[] = { 482static struct resource bfin_sport0_uart_resources[] = {
483 { 483 {
@@ -548,7 +548,7 @@ static struct platform_device bfin_sport1_uart_device = {
548#endif 548#endif
549#endif 549#endif
550 550
551#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 551#if IS_ENABLED(CONFIG_BFIN_MAC)
552#include <linux/bfin_mac.h> 552#include <linux/bfin_mac.h>
553static const unsigned short bfin_mac_peripherals[] = P_MII0; 553static const unsigned short bfin_mac_peripherals[] = P_MII0;
554 554
@@ -581,7 +581,7 @@ static struct platform_device bfin_mac_device = {
581}; 581};
582#endif 582#endif
583 583
584#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 584#if IS_ENABLED(CONFIG_PATA_PLATFORM)
585#define PATA_INT IRQ_PF14 585#define PATA_INT IRQ_PF14
586 586
587static struct pata_platform_info bfin_pata_platform_data = { 587static struct pata_platform_info bfin_pata_platform_data = {
@@ -649,15 +649,15 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
649 649
650 &bfin_dpmc, 650 &bfin_dpmc,
651 651
652#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 652#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
653 &hitachi_fb_device, 653 &hitachi_fb_device,
654#endif 654#endif
655 655
656#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 656#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
657 &rtc_device, 657 &rtc_device,
658#endif 658#endif
659 659
660#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 660#if IS_ENABLED(CONFIG_SERIAL_BFIN)
661#ifdef CONFIG_SERIAL_BFIN_UART0 661#ifdef CONFIG_SERIAL_BFIN_UART0
662 &bfin_uart0_device, 662 &bfin_uart0_device,
663#endif 663#endif
@@ -666,7 +666,7 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
666#endif 666#endif
667#endif 667#endif
668 668
669#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 669#if IS_ENABLED(CONFIG_BFIN_SIR)
670#ifdef CONFIG_BFIN_SIR0 670#ifdef CONFIG_BFIN_SIR0
671 &bfin_sir0_device, 671 &bfin_sir0_device,
672#endif 672#endif
@@ -675,11 +675,11 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
675#endif 675#endif
676#endif 676#endif
677 677
678#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 678#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
679 &i2c_bfin_twi_device, 679 &i2c_bfin_twi_device,
680#endif 680#endif
681 681
682#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 682#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
683#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 683#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
684 &bfin_sport0_uart_device, 684 &bfin_sport0_uart_device,
685#endif 685#endif
@@ -688,39 +688,39 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
688#endif 688#endif
689#endif 689#endif
690 690
691#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 691#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
692 &isp1362_hcd_device, 692 &isp1362_hcd_device,
693#endif 693#endif
694 694
695#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 695#if IS_ENABLED(CONFIG_SMC91X)
696 &smc91x_device, 696 &smc91x_device,
697#endif 697#endif
698 698
699#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 699#if IS_ENABLED(CONFIG_BFIN_MAC)
700 &bfin_mii_bus, 700 &bfin_mii_bus,
701 &bfin_mac_device, 701 &bfin_mac_device,
702#endif 702#endif
703 703
704#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 704#if IS_ENABLED(CONFIG_USB_NET2272)
705 &net2272_bfin_device, 705 &net2272_bfin_device,
706#endif 706#endif
707 707
708#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 708#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
709 &bfin_spi0_device, 709 &bfin_spi0_device,
710#endif 710#endif
711 711
712#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 712#if IS_ENABLED(CONFIG_PATA_PLATFORM)
713 &bfin_pata_device, 713 &bfin_pata_device,
714#endif 714#endif
715 715
716#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 716#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
717 &cm_flash_device, 717 &cm_flash_device,
718#endif 718#endif
719}; 719};
720 720
721static int __init net2272_init(void) 721static int __init net2272_init(void)
722{ 722{
723#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 723#if IS_ENABLED(CONFIG_USB_NET2272)
724 int ret; 724 int ret;
725 725
726 ret = gpio_request(GPIO_PH15, driver_name); 726 ret = gpio_request(GPIO_PH15, driver_name);
@@ -752,11 +752,11 @@ static int __init cm_bf537u_init(void)
752{ 752{
753 printk(KERN_INFO "%s(): registering device resources\n", __func__); 753 printk(KERN_INFO "%s(): registering device resources\n", __func__);
754 platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices)); 754 platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices));
755#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 755#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
756 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 756 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
757#endif 757#endif
758 758
759#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 759#if IS_ENABLED(CONFIG_PATA_PLATFORM)
760 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 760 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
761#endif 761#endif
762 762
diff --git a/arch/blackfin/mach-bf537/boards/dnp5370.c b/arch/blackfin/mach-bf537/boards/dnp5370.c
index 8bbf0a23fd49..e79b3b810c39 100644
--- a/arch/blackfin/mach-bf537/boards/dnp5370.c
+++ b/arch/blackfin/mach-bf537/boards/dnp5370.c
@@ -41,14 +41,14 @@ const char bfin_board_name[] = "DNP/5370";
41#define FLASH_MAC 0x202f0000 41#define FLASH_MAC 0x202f0000
42#define CONFIG_MTD_PHYSMAP_LEN 0x300000 42#define CONFIG_MTD_PHYSMAP_LEN 0x300000
43 43
44#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 44#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
45static struct platform_device rtc_device = { 45static struct platform_device rtc_device = {
46 .name = "rtc-bfin", 46 .name = "rtc-bfin",
47 .id = -1, 47 .id = -1,
48}; 48};
49#endif 49#endif
50 50
51#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 51#if IS_ENABLED(CONFIG_BFIN_MAC)
52#include <linux/bfin_mac.h> 52#include <linux/bfin_mac.h>
53static const unsigned short bfin_mac_peripherals[] = P_RMII0; 53static const unsigned short bfin_mac_peripherals[] = P_RMII0;
54 54
@@ -81,7 +81,7 @@ static struct platform_device bfin_mac_device = {
81}; 81};
82#endif 82#endif
83 83
84#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 84#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
85static struct mtd_partition asmb_flash_partitions[] = { 85static struct mtd_partition asmb_flash_partitions[] = {
86 { 86 {
87 .name = "bootloader(nor)", 87 .name = "bootloader(nor)",
@@ -125,9 +125,9 @@ static struct platform_device asmb_flash_device = {
125}; 125};
126#endif 126#endif
127 127
128#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 128#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
129 129
130#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 130#if IS_ENABLED(CONFIG_MMC_SPI)
131 131
132static struct bfin5xx_spi_chip mmc_spi_chip_info = { 132static struct bfin5xx_spi_chip mmc_spi_chip_info = {
133 .enable_dma = 0, /* use no dma transfer with this chip*/ 133 .enable_dma = 0, /* use no dma transfer with this chip*/
@@ -135,7 +135,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
135 135
136#endif 136#endif
137 137
138#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 138#if IS_ENABLED(CONFIG_MTD_DATAFLASH)
139/* This mapping is for at45db642 it has 1056 page size, 139/* This mapping is for at45db642 it has 1056 page size,
140 * partition size and offset should be page aligned 140 * partition size and offset should be page aligned
141 */ 141 */
@@ -166,7 +166,7 @@ static struct bfin5xx_spi_chip spi_dataflash_chip_info = {
166 166
167static struct spi_board_info bfin_spi_board_info[] __initdata = { 167static struct spi_board_info bfin_spi_board_info[] __initdata = {
168/* SD/MMC card reader at SPI bus */ 168/* SD/MMC card reader at SPI bus */
169#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 169#if IS_ENABLED(CONFIG_MMC_SPI)
170 { 170 {
171 .modalias = "mmc_spi", 171 .modalias = "mmc_spi",
172 .max_speed_hz = 20000000, 172 .max_speed_hz = 20000000,
@@ -178,7 +178,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
178#endif 178#endif
179 179
180/* 8 Megabyte Atmel NOR flash chip at SPI bus */ 180/* 8 Megabyte Atmel NOR flash chip at SPI bus */
181#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 181#if IS_ENABLED(CONFIG_MTD_DATAFLASH)
182 { 182 {
183 .modalias = "mtd_dataflash", 183 .modalias = "mtd_dataflash",
184 .max_speed_hz = 16700000, 184 .max_speed_hz = 16700000,
@@ -228,7 +228,7 @@ static struct platform_device spi_bfin_master_device = {
228}; 228};
229#endif 229#endif
230 230
231#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 231#if IS_ENABLED(CONFIG_SERIAL_BFIN)
232#ifdef CONFIG_SERIAL_BFIN_UART0 232#ifdef CONFIG_SERIAL_BFIN_UART0
233static struct resource bfin_uart0_resources[] = { 233static struct resource bfin_uart0_resources[] = {
234 { 234 {
@@ -328,7 +328,7 @@ static struct platform_device bfin_uart1_device = {
328#endif 328#endif
329#endif 329#endif
330 330
331#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 331#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
332static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 332static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
333 333
334static struct resource bfin_twi0_resource[] = { 334static struct resource bfin_twi0_resource[] = {
@@ -357,7 +357,7 @@ static struct platform_device i2c_bfin_twi_device = {
357 357
358static struct platform_device *dnp5370_devices[] __initdata = { 358static struct platform_device *dnp5370_devices[] __initdata = {
359 359
360#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 360#if IS_ENABLED(CONFIG_SERIAL_BFIN)
361#ifdef CONFIG_SERIAL_BFIN_UART0 361#ifdef CONFIG_SERIAL_BFIN_UART0
362 &bfin_uart0_device, 362 &bfin_uart0_device,
363#endif 363#endif
@@ -366,24 +366,24 @@ static struct platform_device *dnp5370_devices[] __initdata = {
366#endif 366#endif
367#endif 367#endif
368 368
369#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 369#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
370 &asmb_flash_device, 370 &asmb_flash_device,
371#endif 371#endif
372 372
373#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 373#if IS_ENABLED(CONFIG_BFIN_MAC)
374 &bfin_mii_bus, 374 &bfin_mii_bus,
375 &bfin_mac_device, 375 &bfin_mac_device,
376#endif 376#endif
377 377
378#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 378#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
379 &spi_bfin_master_device, 379 &spi_bfin_master_device,
380#endif 380#endif
381 381
382#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 382#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
383 &i2c_bfin_twi_device, 383 &i2c_bfin_twi_device,
384#endif 384#endif
385 385
386#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 386#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
387 &rtc_device, 387 &rtc_device,
388#endif 388#endif
389 389
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index a10f90e444bc..dd7bda07bf90 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -13,7 +13,7 @@
13#include <linux/mtd/partitions.h> 13#include <linux/mtd/partitions.h>
14#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/spi/flash.h> 15#include <linux/spi/flash.h>
16#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 16#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
17#include <linux/usb/isp1362.h> 17#include <linux/usb/isp1362.h>
18#endif 18#endif
19#include <linux/ata_platform.h> 19#include <linux/ata_platform.h>
@@ -31,7 +31,7 @@
31 */ 31 */
32const char bfin_board_name[] = "CamSig Minotaur BF537"; 32const char bfin_board_name[] = "CamSig Minotaur BF537";
33 33
34#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 34#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
35static struct resource bfin_pcmcia_cf_resources[] = { 35static struct resource bfin_pcmcia_cf_resources[] = {
36 { 36 {
37 .start = 0x20310000, /* IO PORT */ 37 .start = 0x20310000, /* IO PORT */
@@ -60,14 +60,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
60}; 60};
61#endif 61#endif
62 62
63#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 63#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
64static struct platform_device rtc_device = { 64static struct platform_device rtc_device = {
65 .name = "rtc-bfin", 65 .name = "rtc-bfin",
66 .id = -1, 66 .id = -1,
67}; 67};
68#endif 68#endif
69 69
70#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 70#if IS_ENABLED(CONFIG_BFIN_MAC)
71#include <linux/bfin_mac.h> 71#include <linux/bfin_mac.h>
72static const unsigned short bfin_mac_peripherals[] = P_MII0; 72static const unsigned short bfin_mac_peripherals[] = P_MII0;
73 73
@@ -100,7 +100,7 @@ static struct platform_device bfin_mac_device = {
100}; 100};
101#endif 101#endif
102 102
103#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 103#if IS_ENABLED(CONFIG_USB_NET2272)
104static struct resource net2272_bfin_resources[] = { 104static struct resource net2272_bfin_resources[] = {
105 { 105 {
106 .start = 0x20300000, 106 .start = 0x20300000,
@@ -121,11 +121,10 @@ static struct platform_device net2272_bfin_device = {
121}; 121};
122#endif 122#endif
123 123
124#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 124#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
125/* all SPI peripherals info goes here */ 125/* all SPI peripherals info goes here */
126 126
127#if defined(CONFIG_MTD_M25P80) \ 127#if IS_ENABLED(CONFIG_MTD_M25P80)
128 || defined(CONFIG_MTD_M25P80_MODULE)
129 128
130/* Partition sizes */ 129/* Partition sizes */
131#define FLASH_SIZE 0x00400000 130#define FLASH_SIZE 0x00400000
@@ -162,15 +161,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
162}; 161};
163#endif 162#endif
164 163
165#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 164#if IS_ENABLED(CONFIG_MMC_SPI)
166static struct bfin5xx_spi_chip mmc_spi_chip_info = { 165static struct bfin5xx_spi_chip mmc_spi_chip_info = {
167 .enable_dma = 0, 166 .enable_dma = 0,
168}; 167};
169#endif 168#endif
170 169
171static struct spi_board_info bfin_spi_board_info[] __initdata = { 170static struct spi_board_info bfin_spi_board_info[] __initdata = {
172#if defined(CONFIG_MTD_M25P80) \ 171#if IS_ENABLED(CONFIG_MTD_M25P80)
173 || defined(CONFIG_MTD_M25P80_MODULE)
174 { 172 {
175 /* the modalias must be the same as spi device driver name */ 173 /* the modalias must be the same as spi device driver name */
176 .modalias = "m25p80", /* Name of spi_driver for this device */ 174 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -183,7 +181,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
183 }, 181 },
184#endif 182#endif
185 183
186#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 184#if IS_ENABLED(CONFIG_MMC_SPI)
187 { 185 {
188 .modalias = "mmc_spi", 186 .modalias = "mmc_spi",
189 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 187 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
@@ -231,7 +229,7 @@ static struct platform_device bfin_spi0_device = {
231}; 229};
232#endif /* spi master and devices */ 230#endif /* spi master and devices */
233 231
234#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 232#if IS_ENABLED(CONFIG_SERIAL_BFIN)
235#ifdef CONFIG_SERIAL_BFIN_UART0 233#ifdef CONFIG_SERIAL_BFIN_UART0
236static struct resource bfin_uart0_resources[] = { 234static struct resource bfin_uart0_resources[] = {
237 { 235 {
@@ -330,7 +328,7 @@ static struct platform_device bfin_uart1_device = {
330#endif 328#endif
331#endif 329#endif
332 330
333#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 331#if IS_ENABLED(CONFIG_BFIN_SIR)
334#ifdef CONFIG_BFIN_SIR0 332#ifdef CONFIG_BFIN_SIR0
335static struct resource bfin_sir0_resources[] = { 333static struct resource bfin_sir0_resources[] = {
336 { 334 {
@@ -385,7 +383,7 @@ static struct platform_device bfin_sir1_device = {
385#endif 383#endif
386#endif 384#endif
387 385
388#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 386#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
389static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 387static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
390 388
391static struct resource bfin_twi0_resource[] = { 389static struct resource bfin_twi0_resource[] = {
@@ -412,7 +410,7 @@ static struct platform_device i2c_bfin_twi_device = {
412}; 410};
413#endif 411#endif
414 412
415#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 413#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
416#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 414#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
417static struct resource bfin_sport0_uart_resources[] = { 415static struct resource bfin_sport0_uart_resources[] = {
418 { 416 {
@@ -484,28 +482,28 @@ static struct platform_device bfin_sport1_uart_device = {
484#endif 482#endif
485 483
486static struct platform_device *minotaur_devices[] __initdata = { 484static struct platform_device *minotaur_devices[] __initdata = {
487#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 485#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
488 &bfin_pcmcia_cf_device, 486 &bfin_pcmcia_cf_device,
489#endif 487#endif
490 488
491#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 489#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
492 &rtc_device, 490 &rtc_device,
493#endif 491#endif
494 492
495#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 493#if IS_ENABLED(CONFIG_BFIN_MAC)
496 &bfin_mii_bus, 494 &bfin_mii_bus,
497 &bfin_mac_device, 495 &bfin_mac_device,
498#endif 496#endif
499 497
500#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 498#if IS_ENABLED(CONFIG_USB_NET2272)
501 &net2272_bfin_device, 499 &net2272_bfin_device,
502#endif 500#endif
503 501
504#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 502#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
505 &bfin_spi0_device, 503 &bfin_spi0_device,
506#endif 504#endif
507 505
508#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 506#if IS_ENABLED(CONFIG_SERIAL_BFIN)
509#ifdef CONFIG_SERIAL_BFIN_UART0 507#ifdef CONFIG_SERIAL_BFIN_UART0
510 &bfin_uart0_device, 508 &bfin_uart0_device,
511#endif 509#endif
@@ -514,7 +512,7 @@ static struct platform_device *minotaur_devices[] __initdata = {
514#endif 512#endif
515#endif 513#endif
516 514
517#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 515#if IS_ENABLED(CONFIG_BFIN_SIR)
518#ifdef CONFIG_BFIN_SIR0 516#ifdef CONFIG_BFIN_SIR0
519 &bfin_sir0_device, 517 &bfin_sir0_device,
520#endif 518#endif
@@ -523,11 +521,11 @@ static struct platform_device *minotaur_devices[] __initdata = {
523#endif 521#endif
524#endif 522#endif
525 523
526#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 524#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
527 &i2c_bfin_twi_device, 525 &i2c_bfin_twi_device,
528#endif 526#endif
529 527
530#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 528#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
531#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 529#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
532 &bfin_sport0_uart_device, 530 &bfin_sport0_uart_device,
533#endif 531#endif
@@ -542,7 +540,7 @@ static int __init minotaur_init(void)
542{ 540{
543 printk(KERN_INFO "%s(): registering device resources\n", __func__); 541 printk(KERN_INFO "%s(): registering device resources\n", __func__);
544 platform_add_devices(minotaur_devices, ARRAY_SIZE(minotaur_devices)); 542 platform_add_devices(minotaur_devices, ARRAY_SIZE(minotaur_devices));
545#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 543#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
546 spi_register_board_info(bfin_spi_board_info, 544 spi_register_board_info(bfin_spi_board_info,
547 ARRAY_SIZE(bfin_spi_board_info)); 545 ARRAY_SIZE(bfin_spi_board_info));
548#endif 546#endif
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 6b395510405b..06a50ddb54c0 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -30,7 +30,7 @@ const char bfin_board_name[] = "ADI PNAV-1.0";
30 * Driver needs to know address, irq and flag pin. 30 * Driver needs to know address, irq and flag pin.
31 */ 31 */
32 32
33#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 33#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
34static struct resource bfin_pcmcia_cf_resources[] = { 34static struct resource bfin_pcmcia_cf_resources[] = {
35 { 35 {
36 .start = 0x20310000, /* IO PORT */ 36 .start = 0x20310000, /* IO PORT */
@@ -59,14 +59,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
59}; 59};
60#endif 60#endif
61 61
62#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 62#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
63static struct platform_device rtc_device = { 63static struct platform_device rtc_device = {
64 .name = "rtc-bfin", 64 .name = "rtc-bfin",
65 .id = -1, 65 .id = -1,
66}; 66};
67#endif 67#endif
68 68
69#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 69#if IS_ENABLED(CONFIG_SMC91X)
70#include <linux/smc91x.h> 70#include <linux/smc91x.h>
71 71
72static struct smc91x_platdata smc91x_info = { 72static struct smc91x_platdata smc91x_info = {
@@ -99,7 +99,7 @@ static struct platform_device smc91x_device = {
99}; 99};
100#endif 100#endif
101 101
102#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 102#if IS_ENABLED(CONFIG_BFIN_MAC)
103#include <linux/bfin_mac.h> 103#include <linux/bfin_mac.h>
104static const unsigned short bfin_mac_peripherals[] = P_RMII0; 104static const unsigned short bfin_mac_peripherals[] = P_RMII0;
105 105
@@ -132,7 +132,7 @@ static struct platform_device bfin_mac_device = {
132}; 132};
133#endif 133#endif
134 134
135#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 135#if IS_ENABLED(CONFIG_USB_NET2272)
136static struct resource net2272_bfin_resources[] = { 136static struct resource net2272_bfin_resources[] = {
137 { 137 {
138 .start = 0x20300000, 138 .start = 0x20300000,
@@ -153,11 +153,10 @@ static struct platform_device net2272_bfin_device = {
153}; 153};
154#endif 154#endif
155 155
156#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 156#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
157/* all SPI peripherals info goes here */ 157/* all SPI peripherals info goes here */
158 158
159#if defined(CONFIG_MTD_M25P80) \ 159#if IS_ENABLED(CONFIG_MTD_M25P80)
160 || defined(CONFIG_MTD_M25P80_MODULE)
161static struct mtd_partition bfin_spi_flash_partitions[] = { 160static struct mtd_partition bfin_spi_flash_partitions[] = {
162 { 161 {
163 .name = "bootloader(spi)", 162 .name = "bootloader(spi)",
@@ -188,13 +187,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
188}; 187};
189#endif 188#endif
190 189
191#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 190#if IS_ENABLED(CONFIG_MMC_SPI)
192static struct bfin5xx_spi_chip mmc_spi_chip_info = { 191static struct bfin5xx_spi_chip mmc_spi_chip_info = {
193 .enable_dma = 0, 192 .enable_dma = 0,
194}; 193};
195#endif 194#endif
196 195
197#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 196#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
198static const struct ad7877_platform_data bfin_ad7877_ts_info = { 197static const struct ad7877_platform_data bfin_ad7877_ts_info = {
199 .model = 7877, 198 .model = 7877,
200 .vref_delay_usecs = 50, /* internal, no capacitor */ 199 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -211,8 +210,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
211#endif 210#endif
212 211
213static struct spi_board_info bfin_spi_board_info[] __initdata = { 212static struct spi_board_info bfin_spi_board_info[] __initdata = {
214#if defined(CONFIG_MTD_M25P80) \ 213#if IS_ENABLED(CONFIG_MTD_M25P80)
215 || defined(CONFIG_MTD_M25P80_MODULE)
216 { 214 {
217 /* the modalias must be the same as spi device driver name */ 215 /* the modalias must be the same as spi device driver name */
218 .modalias = "m25p80", /* Name of spi_driver for this device */ 216 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -225,8 +223,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
225 }, 223 },
226#endif 224#endif
227 225
228#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 226#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
229 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
230 { 227 {
231 .modalias = "ad183x", 228 .modalias = "ad183x",
232 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 229 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -234,7 +231,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
234 .chip_select = 4, 231 .chip_select = 4,
235 }, 232 },
236#endif 233#endif
237#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 234#if IS_ENABLED(CONFIG_MMC_SPI)
238 { 235 {
239 .modalias = "mmc_spi", 236 .modalias = "mmc_spi",
240 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 237 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
@@ -244,7 +241,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
244 .mode = SPI_MODE_3, 241 .mode = SPI_MODE_3,
245 }, 242 },
246#endif 243#endif
247#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 244#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
248{ 245{
249 .modalias = "ad7877", 246 .modalias = "ad7877",
250 .platform_data = &bfin_ad7877_ts_info, 247 .platform_data = &bfin_ad7877_ts_info,
@@ -294,13 +291,13 @@ static struct platform_device bfin_spi0_device = {
294}; 291};
295#endif /* spi master and devices */ 292#endif /* spi master and devices */
296 293
297#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 294#if IS_ENABLED(CONFIG_FB_BF537_LQ035)
298static struct platform_device bfin_fb_device = { 295static struct platform_device bfin_fb_device = {
299 .name = "bf537-lq035", 296 .name = "bf537-lq035",
300}; 297};
301#endif 298#endif
302 299
303#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 300#if IS_ENABLED(CONFIG_SERIAL_BFIN)
304#ifdef CONFIG_SERIAL_BFIN_UART0 301#ifdef CONFIG_SERIAL_BFIN_UART0
305static struct resource bfin_uart0_resources[] = { 302static struct resource bfin_uart0_resources[] = {
306 { 303 {
@@ -399,7 +396,7 @@ static struct platform_device bfin_uart1_device = {
399#endif 396#endif
400#endif 397#endif
401 398
402#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 399#if IS_ENABLED(CONFIG_BFIN_SIR)
403#ifdef CONFIG_BFIN_SIR0 400#ifdef CONFIG_BFIN_SIR0
404static struct resource bfin_sir0_resources[] = { 401static struct resource bfin_sir0_resources[] = {
405 { 402 {
@@ -455,36 +452,36 @@ static struct platform_device bfin_sir1_device = {
455#endif 452#endif
456 453
457static struct platform_device *stamp_devices[] __initdata = { 454static struct platform_device *stamp_devices[] __initdata = {
458#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 455#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
459 &bfin_pcmcia_cf_device, 456 &bfin_pcmcia_cf_device,
460#endif 457#endif
461 458
462#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 459#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
463 &rtc_device, 460 &rtc_device,
464#endif 461#endif
465 462
466#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 463#if IS_ENABLED(CONFIG_SMC91X)
467 &smc91x_device, 464 &smc91x_device,
468#endif 465#endif
469 466
470#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 467#if IS_ENABLED(CONFIG_BFIN_MAC)
471 &bfin_mii_bus, 468 &bfin_mii_bus,
472 &bfin_mac_device, 469 &bfin_mac_device,
473#endif 470#endif
474 471
475#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 472#if IS_ENABLED(CONFIG_USB_NET2272)
476 &net2272_bfin_device, 473 &net2272_bfin_device,
477#endif 474#endif
478 475
479#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 476#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
480 &bfin_spi0_device, 477 &bfin_spi0_device,
481#endif 478#endif
482 479
483#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 480#if IS_ENABLED(CONFIG_FB_BF537_LQ035)
484 &bfin_fb_device, 481 &bfin_fb_device,
485#endif 482#endif
486 483
487#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 484#if IS_ENABLED(CONFIG_SERIAL_BFIN)
488#ifdef CONFIG_SERIAL_BFIN_UART0 485#ifdef CONFIG_SERIAL_BFIN_UART0
489 &bfin_uart0_device, 486 &bfin_uart0_device,
490#endif 487#endif
@@ -493,7 +490,7 @@ static struct platform_device *stamp_devices[] __initdata = {
493#endif 490#endif
494#endif 491#endif
495 492
496#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 493#if IS_ENABLED(CONFIG_BFIN_SIR)
497#ifdef CONFIG_BFIN_SIR0 494#ifdef CONFIG_BFIN_SIR0
498 &bfin_sir0_device, 495 &bfin_sir0_device,
499#endif 496#endif
@@ -507,7 +504,7 @@ static int __init pnav_init(void)
507{ 504{
508 printk(KERN_INFO "%s(): registering device resources\n", __func__); 505 printk(KERN_INFO "%s(): registering device resources\n", __func__);
509 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 506 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
510#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 507#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
511 spi_register_board_info(bfin_spi_board_info, 508 spi_register_board_info(bfin_spi_board_info,
512 ARRAY_SIZE(bfin_spi_board_info)); 509 ARRAY_SIZE(bfin_spi_board_info));
513#endif 510#endif
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 44fd1d4682ac..de19b8a56007 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -18,7 +18,7 @@
18#include <linux/mtd/physmap.h> 18#include <linux/mtd/physmap.h>
19#include <linux/spi/spi.h> 19#include <linux/spi/spi.h>
20#include <linux/spi/flash.h> 20#include <linux/spi/flash.h>
21#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 21#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
22#include <linux/usb/isp1362.h> 22#include <linux/usb/isp1362.h>
23#endif 23#endif
24#include <linux/i2c.h> 24#include <linux/i2c.h>
@@ -53,7 +53,7 @@ const char bfin_board_name[] = "ADI BF537-STAMP";
53 * Driver needs to know address, irq and flag pin. 53 * Driver needs to know address, irq and flag pin.
54 */ 54 */
55 55
56#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 56#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
57#include <linux/usb/isp1760.h> 57#include <linux/usb/isp1760.h>
58static struct resource bfin_isp1760_resources[] = { 58static struct resource bfin_isp1760_resources[] = {
59 [0] = { 59 [0] = {
@@ -88,7 +88,7 @@ static struct platform_device bfin_isp1760_device = {
88}; 88};
89#endif 89#endif
90 90
91#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 91#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
92#include <linux/gpio_keys.h> 92#include <linux/gpio_keys.h>
93 93
94static struct gpio_keys_button bfin_gpio_keys_table[] = { 94static struct gpio_keys_button bfin_gpio_keys_table[] = {
@@ -111,7 +111,7 @@ static struct platform_device bfin_device_gpiokeys = {
111}; 111};
112#endif 112#endif
113 113
114#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 114#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
115static struct resource bfin_pcmcia_cf_resources[] = { 115static struct resource bfin_pcmcia_cf_resources[] = {
116 { 116 {
117 .start = 0x20310000, /* IO PORT */ 117 .start = 0x20310000, /* IO PORT */
@@ -140,14 +140,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
140}; 140};
141#endif 141#endif
142 142
143#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 143#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
144static struct platform_device rtc_device = { 144static struct platform_device rtc_device = {
145 .name = "rtc-bfin", 145 .name = "rtc-bfin",
146 .id = -1, 146 .id = -1,
147}; 147};
148#endif 148#endif
149 149
150#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 150#if IS_ENABLED(CONFIG_SMC91X)
151#include <linux/smc91x.h> 151#include <linux/smc91x.h>
152 152
153static struct smc91x_platdata smc91x_info = { 153static struct smc91x_platdata smc91x_info = {
@@ -180,7 +180,7 @@ static struct platform_device smc91x_device = {
180}; 180};
181#endif 181#endif
182 182
183#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 183#if IS_ENABLED(CONFIG_DM9000)
184static struct resource dm9000_resources[] = { 184static struct resource dm9000_resources[] = {
185 [0] = { 185 [0] = {
186 .start = 0x203FB800, 186 .start = 0x203FB800,
@@ -207,7 +207,7 @@ static struct platform_device dm9000_device = {
207}; 207};
208#endif 208#endif
209 209
210#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) 210#if IS_ENABLED(CONFIG_USB_SL811_HCD)
211static struct resource sl811_hcd_resources[] = { 211static struct resource sl811_hcd_resources[] = {
212 { 212 {
213 .start = 0x20340000, 213 .start = 0x20340000,
@@ -251,7 +251,7 @@ static struct platform_device sl811_hcd_device = {
251}; 251};
252#endif 252#endif
253 253
254#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 254#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
255static struct resource isp1362_hcd_resources[] = { 255static struct resource isp1362_hcd_resources[] = {
256 { 256 {
257 .start = 0x20360000, 257 .start = 0x20360000,
@@ -290,7 +290,7 @@ static struct platform_device isp1362_hcd_device = {
290}; 290};
291#endif 291#endif
292 292
293#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 293#if IS_ENABLED(CONFIG_CAN_BFIN)
294static unsigned short bfin_can_peripherals[] = { 294static unsigned short bfin_can_peripherals[] = {
295 P_CAN0_RX, P_CAN0_TX, 0 295 P_CAN0_RX, P_CAN0_TX, 0
296}; 296};
@@ -328,7 +328,7 @@ static struct platform_device bfin_can_device = {
328}; 328};
329#endif 329#endif
330 330
331#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 331#if IS_ENABLED(CONFIG_BFIN_MAC)
332#include <linux/bfin_mac.h> 332#include <linux/bfin_mac.h>
333static const unsigned short bfin_mac_peripherals[] = P_MII0; 333static const unsigned short bfin_mac_peripherals[] = P_MII0;
334 334
@@ -361,7 +361,7 @@ static struct platform_device bfin_mac_device = {
361}; 361};
362#endif 362#endif
363 363
364#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 364#if IS_ENABLED(CONFIG_USB_NET2272)
365static struct resource net2272_bfin_resources[] = { 365static struct resource net2272_bfin_resources[] = {
366 { 366 {
367 .start = 0x20300000, 367 .start = 0x20300000,
@@ -385,7 +385,7 @@ static struct platform_device net2272_bfin_device = {
385}; 385};
386#endif 386#endif
387 387
388#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 388#if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
389const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; 389const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
390 390
391static struct mtd_partition bfin_plat_nand_partitions[] = { 391static struct mtd_partition bfin_plat_nand_partitions[] = {
@@ -461,7 +461,7 @@ static void bfin_plat_nand_init(void)
461static void bfin_plat_nand_init(void) {} 461static void bfin_plat_nand_init(void) {}
462#endif 462#endif
463 463
464#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 464#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
465static struct mtd_partition stamp_partitions[] = { 465static struct mtd_partition stamp_partitions[] = {
466 { 466 {
467 .name = "bootloader(nor)", 467 .name = "bootloader(nor)",
@@ -509,8 +509,7 @@ static struct platform_device stamp_flash_device = {
509}; 509};
510#endif 510#endif
511 511
512#if defined(CONFIG_MTD_M25P80) \ 512#if IS_ENABLED(CONFIG_MTD_M25P80)
513 || defined(CONFIG_MTD_M25P80_MODULE)
514static struct mtd_partition bfin_spi_flash_partitions[] = { 513static struct mtd_partition bfin_spi_flash_partitions[] = {
515 { 514 {
516 .name = "bootloader(spi)", 515 .name = "bootloader(spi)",
@@ -541,7 +540,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
541}; 540};
542#endif 541#endif
543 542
544#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 543#if IS_ENABLED(CONFIG_INPUT_AD714X_SPI)
545#include <linux/input/ad714x.h> 544#include <linux/input/ad714x.h>
546 545
547static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { 546static struct ad714x_slider_plat ad7147_spi_slider_plat[] = {
@@ -602,7 +601,7 @@ static struct ad714x_platform_data ad7147_spi_platform_data = {
602}; 601};
603#endif 602#endif
604 603
605#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) 604#if IS_ENABLED(CONFIG_INPUT_AD714X_I2C)
606#include <linux/input/ad714x.h> 605#include <linux/input/ad714x.h>
607static struct ad714x_button_plat ad7142_i2c_button_plat[] = { 606static struct ad714x_button_plat ad7142_i2c_button_plat[] = {
608 { 607 {
@@ -649,24 +648,24 @@ static struct ad714x_platform_data ad7142_i2c_platform_data = {
649}; 648};
650#endif 649#endif
651 650
652#if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) 651#if IS_ENABLED(CONFIG_AD2S90)
653static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { 652static struct bfin5xx_spi_chip ad2s90_spi_chip_info = {
654 .enable_dma = 0, 653 .enable_dma = 0,
655}; 654};
656#endif 655#endif
657 656
658#if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) 657#if IS_ENABLED(CONFIG_AD2S1200)
659static unsigned short ad2s120x_platform_data[] = { 658static unsigned short ad2s1200_platform_data[] = {
660 /* used as SAMPLE and RDVEL */ 659 /* used as SAMPLE and RDVEL */
661 GPIO_PF5, GPIO_PF6, 0 660 GPIO_PF5, GPIO_PF6, 0
662}; 661};
663 662
664static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = { 663static struct bfin5xx_spi_chip ad2s1200_spi_chip_info = {
665 .enable_dma = 0, 664 .enable_dma = 0,
666}; 665};
667#endif 666#endif
668 667
669#if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) 668#if IS_ENABLED(CONFIG_AD2S1210)
670static unsigned short ad2s1210_platform_data[] = { 669static unsigned short ad2s1210_platform_data[] = {
671 /* use as SAMPLE, A0, A1 */ 670 /* use as SAMPLE, A0, A1 */
672 GPIO_PF7, GPIO_PF8, GPIO_PF9, 671 GPIO_PF7, GPIO_PF8, GPIO_PF9,
@@ -682,13 +681,13 @@ static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = {
682}; 681};
683#endif 682#endif
684 683
685#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) 684#if IS_ENABLED(CONFIG_SENSORS_AD7314)
686static struct bfin5xx_spi_chip ad7314_spi_chip_info = { 685static struct bfin5xx_spi_chip ad7314_spi_chip_info = {
687 .enable_dma = 0, 686 .enable_dma = 0,
688}; 687};
689#endif 688#endif
690 689
691#if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE) 690#if IS_ENABLED(CONFIG_AD7816)
692static unsigned short ad7816_platform_data[] = { 691static unsigned short ad7816_platform_data[] = {
693 GPIO_PF4, /* rdwr_pin */ 692 GPIO_PF4, /* rdwr_pin */
694 GPIO_PF5, /* convert_pin */ 693 GPIO_PF5, /* convert_pin */
@@ -701,7 +700,7 @@ static struct bfin5xx_spi_chip ad7816_spi_chip_info = {
701}; 700};
702#endif 701#endif
703 702
704#if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE) 703#if IS_ENABLED(CONFIG_ADT7310)
705static unsigned long adt7310_platform_data[3] = { 704static unsigned long adt7310_platform_data[3] = {
706/* INT bound temperature alarm event. line 1 */ 705/* INT bound temperature alarm event. line 1 */
707 IRQ_PG4, IRQF_TRIGGER_LOW, 706 IRQ_PG4, IRQF_TRIGGER_LOW,
@@ -714,14 +713,14 @@ static struct bfin5xx_spi_chip adt7310_spi_chip_info = {
714}; 713};
715#endif 714#endif
716 715
717#if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE) 716#if IS_ENABLED(CONFIG_AD7298)
718static unsigned short ad7298_platform_data[] = { 717static unsigned short ad7298_platform_data[] = {
719 GPIO_PF7, /* busy_pin */ 718 GPIO_PF7, /* busy_pin */
720 0, 719 0,
721}; 720};
722#endif 721#endif
723 722
724#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) 723#if IS_ENABLED(CONFIG_ADT7316_SPI)
725static unsigned long adt7316_spi_data[2] = { 724static unsigned long adt7316_spi_data[2] = {
726 IRQF_TRIGGER_LOW, /* interrupt flags */ 725 IRQF_TRIGGER_LOW, /* interrupt flags */
727 GPIO_PF7, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */ 726 GPIO_PF7, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */
@@ -732,7 +731,7 @@ static struct bfin5xx_spi_chip adt7316_spi_chip_info = {
732}; 731};
733#endif 732#endif
734 733
735#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 734#if IS_ENABLED(CONFIG_MMC_SPI)
736#define MMC_SPI_CARD_DETECT_INT IRQ_PF5 735#define MMC_SPI_CARD_DETECT_INT IRQ_PF5
737 736
738static int bfin_mmc_spi_init(struct device *dev, 737static int bfin_mmc_spi_init(struct device *dev,
@@ -759,7 +758,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
759}; 758};
760#endif 759#endif
761 760
762#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 761#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
763#include <linux/spi/ad7877.h> 762#include <linux/spi/ad7877.h>
764static const struct ad7877_platform_data bfin_ad7877_ts_info = { 763static const struct ad7877_platform_data bfin_ad7877_ts_info = {
765 .model = 7877, 764 .model = 7877,
@@ -776,7 +775,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
776}; 775};
777#endif 776#endif
778 777
779#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 778#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
780#include <linux/spi/ad7879.h> 779#include <linux/spi/ad7879.h>
781static const struct ad7879_platform_data bfin_ad7879_ts_info = { 780static const struct ad7879_platform_data bfin_ad7879_ts_info = {
782 .model = 7879, /* Model = AD7879 */ 781 .model = 7879, /* Model = AD7879 */
@@ -793,7 +792,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
793}; 792};
794#endif 793#endif
795 794
796#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 795#if IS_ENABLED(CONFIG_INPUT_ADXL34X)
797#include <linux/input/adxl34x.h> 796#include <linux/input/adxl34x.h>
798static const struct adxl34x_platform_data adxl34x_info = { 797static const struct adxl34x_platform_data adxl34x_info = {
799 .x_axis_offset = 0, 798 .x_axis_offset = 0,
@@ -832,13 +831,13 @@ static const struct adxl34x_platform_data adxl34x_info = {
832}; 831};
833#endif 832#endif
834 833
835#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) 834#if IS_ENABLED(CONFIG_ENC28J60)
836static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { 835static struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
837 .enable_dma = 1, 836 .enable_dma = 1,
838}; 837};
839#endif 838#endif
840 839
841#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) 840#if IS_ENABLED(CONFIG_ADF702X)
842#include <linux/spi/adf702x.h> 841#include <linux/spi/adf702x.h>
843#define TXREG 0x0160A470 842#define TXREG 0x0160A470
844static const u32 adf7021_regs[] = { 843static const u32 adf7021_regs[] = {
@@ -880,7 +879,7 @@ static inline void adf702x_mac_init(void)
880static inline void adf702x_mac_init(void) {} 879static inline void adf702x_mac_init(void) {}
881#endif 880#endif
882 881
883#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 882#if IS_ENABLED(CONFIG_TOUCHSCREEN_ADS7846)
884#include <linux/spi/ads7846.h> 883#include <linux/spi/ads7846.h>
885static int ads7873_get_pendown_state(void) 884static int ads7873_get_pendown_state(void)
886{ 885{
@@ -899,8 +898,7 @@ static struct ads7846_platform_data __initdata ad7873_pdata = {
899}; 898};
900#endif 899#endif
901 900
902#if defined(CONFIG_MTD_DATAFLASH) \ 901#if IS_ENABLED(CONFIG_MTD_DATAFLASH)
903 || defined(CONFIG_MTD_DATAFLASH_MODULE)
904 902
905static struct mtd_partition bfin_spi_dataflash_partitions[] = { 903static struct mtd_partition bfin_spi_dataflash_partitions[] = {
906 { 904 {
@@ -931,15 +929,14 @@ static struct bfin5xx_spi_chip data_flash_chip_info = {
931}; 929};
932#endif 930#endif
933 931
934#if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE) 932#if IS_ENABLED(CONFIG_AD7476)
935static struct bfin5xx_spi_chip spi_ad7476_chip_info = { 933static struct bfin5xx_spi_chip spi_ad7476_chip_info = {
936 .enable_dma = 0, /* use dma transfer with this chip*/ 934 .enable_dma = 0, /* use dma transfer with this chip*/
937}; 935};
938#endif 936#endif
939 937
940static struct spi_board_info bfin_spi_board_info[] __initdata = { 938static struct spi_board_info bfin_spi_board_info[] __initdata = {
941#if defined(CONFIG_MTD_M25P80) \ 939#if IS_ENABLED(CONFIG_MTD_M25P80)
942 || defined(CONFIG_MTD_M25P80_MODULE)
943 { 940 {
944 /* the modalias must be the same as spi device driver name */ 941 /* the modalias must be the same as spi device driver name */
945 .modalias = "m25p80", /* Name of spi_driver for this device */ 942 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -951,8 +948,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
951 .mode = SPI_MODE_3, 948 .mode = SPI_MODE_3,
952 }, 949 },
953#endif 950#endif
954#if defined(CONFIG_MTD_DATAFLASH) \ 951#if IS_ENABLED(CONFIG_MTD_DATAFLASH)
955 || defined(CONFIG_MTD_DATAFLASH_MODULE)
956 { /* DataFlash chip */ 952 { /* DataFlash chip */
957 .modalias = "mtd_dataflash", 953 .modalias = "mtd_dataflash",
958 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ 954 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */
@@ -964,8 +960,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
964 }, 960 },
965#endif 961#endif
966 962
967#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 963#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
968 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
969 { 964 {
970 .modalias = "ad1836", 965 .modalias = "ad1836",
971 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 966 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -986,7 +981,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
986 }, 981 },
987#endif 982#endif
988 983
989#if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADV80X_MODULE) 984#if IS_ENABLED(CONFIG_SND_SOC_ADAV80X)
990 { 985 {
991 .modalias = "adav801", 986 .modalias = "adav801",
992 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 987 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -996,7 +991,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
996 }, 991 },
997#endif 992#endif
998 993
999#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 994#if IS_ENABLED(CONFIG_INPUT_AD714X_SPI)
1000 { 995 {
1001 .modalias = "ad714x_captouch", 996 .modalias = "ad714x_captouch",
1002 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 997 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1008,7 +1003,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1008 }, 1003 },
1009#endif 1004#endif
1010 1005
1011#if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) 1006#if IS_ENABLED(CONFIG_AD2S90)
1012 { 1007 {
1013 .modalias = "ad2s90", 1008 .modalias = "ad2s90",
1014 .bus_num = 0, 1009 .bus_num = 0,
@@ -1019,17 +1014,17 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1019 }, 1014 },
1020#endif 1015#endif
1021 1016
1022#if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE) 1017#if IS_ENABLED(CONFIG_AD2S1200)
1023 { 1018 {
1024 .modalias = "ad2s120x", 1019 .modalias = "ad2s1200",
1025 .bus_num = 0, 1020 .bus_num = 0,
1026 .chip_select = 4, /* CS, change it for your board */ 1021 .chip_select = 4, /* CS, change it for your board */
1027 .platform_data = ad2s120x_platform_data, 1022 .platform_data = ad2s1200_platform_data,
1028 .controller_data = &ad2s120x_spi_chip_info, 1023 .controller_data = &ad2s1200_spi_chip_info,
1029 }, 1024 },
1030#endif 1025#endif
1031 1026
1032#if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) 1027#if IS_ENABLED(CONFIG_AD2S1210)
1033 { 1028 {
1034 .modalias = "ad2s1210", 1029 .modalias = "ad2s1210",
1035 .max_speed_hz = 8192000, 1030 .max_speed_hz = 8192000,
@@ -1040,7 +1035,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1040 }, 1035 },
1041#endif 1036#endif
1042 1037
1043#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) 1038#if IS_ENABLED(CONFIG_SENSORS_AD7314)
1044 { 1039 {
1045 .modalias = "ad7314", 1040 .modalias = "ad7314",
1046 .max_speed_hz = 1000000, 1041 .max_speed_hz = 1000000,
@@ -1051,7 +1046,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1051 }, 1046 },
1052#endif 1047#endif
1053 1048
1054#if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE) 1049#if IS_ENABLED(CONFIG_AD7816)
1055 { 1050 {
1056 .modalias = "ad7818", 1051 .modalias = "ad7818",
1057 .max_speed_hz = 1000000, 1052 .max_speed_hz = 1000000,
@@ -1063,7 +1058,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1063 }, 1058 },
1064#endif 1059#endif
1065 1060
1066#if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE) 1061#if IS_ENABLED(CONFIG_ADT7310)
1067 { 1062 {
1068 .modalias = "adt7310", 1063 .modalias = "adt7310",
1069 .max_speed_hz = 1000000, 1064 .max_speed_hz = 1000000,
@@ -1076,7 +1071,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1076 }, 1071 },
1077#endif 1072#endif
1078 1073
1079#if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE) 1074#if IS_ENABLED(CONFIG_AD7298)
1080 { 1075 {
1081 .modalias = "ad7298", 1076 .modalias = "ad7298",
1082 .max_speed_hz = 1000000, 1077 .max_speed_hz = 1000000,
@@ -1087,7 +1082,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1087 }, 1082 },
1088#endif 1083#endif
1089 1084
1090#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) 1085#if IS_ENABLED(CONFIG_ADT7316_SPI)
1091 { 1086 {
1092 .modalias = "adt7316", 1087 .modalias = "adt7316",
1093 .max_speed_hz = 1000000, 1088 .max_speed_hz = 1000000,
@@ -1100,7 +1095,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1100 }, 1095 },
1101#endif 1096#endif
1102 1097
1103#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 1098#if IS_ENABLED(CONFIG_MMC_SPI)
1104 { 1099 {
1105 .modalias = "mmc_spi", 1100 .modalias = "mmc_spi",
1106 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 1101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -1111,7 +1106,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1111 .mode = SPI_MODE_3, 1106 .mode = SPI_MODE_3,
1112 }, 1107 },
1113#endif 1108#endif
1114#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1109#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
1115 { 1110 {
1116 .modalias = "ad7877", 1111 .modalias = "ad7877",
1117 .platform_data = &bfin_ad7877_ts_info, 1112 .platform_data = &bfin_ad7877_ts_info,
@@ -1121,7 +1116,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1121 .chip_select = 1, 1116 .chip_select = 1,
1122 }, 1117 },
1123#endif 1118#endif
1124#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 1119#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
1125 { 1120 {
1126 .modalias = "ad7879", 1121 .modalias = "ad7879",
1127 .platform_data = &bfin_ad7879_ts_info, 1122 .platform_data = &bfin_ad7879_ts_info,
@@ -1132,7 +1127,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1132 .mode = SPI_CPHA | SPI_CPOL, 1127 .mode = SPI_CPHA | SPI_CPOL,
1133 }, 1128 },
1134#endif 1129#endif
1135#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 1130#if IS_ENABLED(CONFIG_SPI_SPIDEV)
1136 { 1131 {
1137 .modalias = "spidev", 1132 .modalias = "spidev",
1138 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1133 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -1140,7 +1135,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1140 .chip_select = 1, 1135 .chip_select = 1,
1141 }, 1136 },
1142#endif 1137#endif
1143#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 1138#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
1144 { 1139 {
1145 .modalias = "bfin-lq035q1-spi", 1140 .modalias = "bfin-lq035q1-spi",
1146 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 1141 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -1149,7 +1144,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1149 .mode = SPI_CPHA | SPI_CPOL, 1144 .mode = SPI_CPHA | SPI_CPOL,
1150 }, 1145 },
1151#endif 1146#endif
1152#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) 1147#if IS_ENABLED(CONFIG_ENC28J60)
1153 { 1148 {
1154 .modalias = "enc28j60", 1149 .modalias = "enc28j60",
1155 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 1150 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -1160,7 +1155,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1160 .mode = SPI_MODE_0, 1155 .mode = SPI_MODE_0,
1161 }, 1156 },
1162#endif 1157#endif
1163#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) 1158#if IS_ENABLED(CONFIG_INPUT_ADXL34X_SPI)
1164 { 1159 {
1165 .modalias = "adxl34x", 1160 .modalias = "adxl34x",
1166 .platform_data = &adxl34x_info, 1161 .platform_data = &adxl34x_info,
@@ -1171,7 +1166,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1171 .mode = SPI_MODE_3, 1166 .mode = SPI_MODE_3,
1172 }, 1167 },
1173#endif 1168#endif
1174#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) 1169#if IS_ENABLED(CONFIG_ADF702X)
1175 { 1170 {
1176 .modalias = "adf702x", 1171 .modalias = "adf702x",
1177 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ 1172 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */
@@ -1181,7 +1176,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1181 .mode = SPI_MODE_0, 1176 .mode = SPI_MODE_0,
1182 }, 1177 },
1183#endif 1178#endif
1184#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 1179#if IS_ENABLED(CONFIG_TOUCHSCREEN_ADS7846)
1185 { 1180 {
1186 .modalias = "ads7846", 1181 .modalias = "ads7846",
1187 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ 1182 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */
@@ -1192,8 +1187,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1192 .mode = SPI_MODE_0, 1187 .mode = SPI_MODE_0,
1193 }, 1188 },
1194#endif 1189#endif
1195#if defined(CONFIG_AD7476) \ 1190#if IS_ENABLED(CONFIG_AD7476)
1196 || defined(CONFIG_AD7476_MODULE)
1197 { 1191 {
1198 .modalias = "ad7476", /* Name of spi_driver for this device */ 1192 .modalias = "ad7476", /* Name of spi_driver for this device */
1199 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 1193 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
@@ -1204,8 +1198,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1204 .mode = SPI_MODE_3, 1198 .mode = SPI_MODE_3,
1205 }, 1199 },
1206#endif 1200#endif
1207#if defined(CONFIG_ADE7753) \ 1201#if IS_ENABLED(CONFIG_ADE7753)
1208 || defined(CONFIG_ADE7753_MODULE)
1209 { 1202 {
1210 .modalias = "ade7753", 1203 .modalias = "ade7753",
1211 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1204 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1215,8 +1208,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1215 .mode = SPI_MODE_1, 1208 .mode = SPI_MODE_1,
1216 }, 1209 },
1217#endif 1210#endif
1218#if defined(CONFIG_ADE7754) \ 1211#if IS_ENABLED(CONFIG_ADE7754)
1219 || defined(CONFIG_ADE7754_MODULE)
1220 { 1212 {
1221 .modalias = "ade7754", 1213 .modalias = "ade7754",
1222 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1214 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1226,8 +1218,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1226 .mode = SPI_MODE_1, 1218 .mode = SPI_MODE_1,
1227 }, 1219 },
1228#endif 1220#endif
1229#if defined(CONFIG_ADE7758) \ 1221#if IS_ENABLED(CONFIG_ADE7758)
1230 || defined(CONFIG_ADE7758_MODULE)
1231 { 1222 {
1232 .modalias = "ade7758", 1223 .modalias = "ade7758",
1233 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1224 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1237,8 +1228,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1237 .mode = SPI_MODE_1, 1228 .mode = SPI_MODE_1,
1238 }, 1229 },
1239#endif 1230#endif
1240#if defined(CONFIG_ADE7759) \ 1231#if IS_ENABLED(CONFIG_ADE7759)
1241 || defined(CONFIG_ADE7759_MODULE)
1242 { 1232 {
1243 .modalias = "ade7759", 1233 .modalias = "ade7759",
1244 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1234 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1248,8 +1238,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1248 .mode = SPI_MODE_1, 1238 .mode = SPI_MODE_1,
1249 }, 1239 },
1250#endif 1240#endif
1251#if defined(CONFIG_ADE7854_SPI) \ 1241#if IS_ENABLED(CONFIG_ADE7854_SPI)
1252 || defined(CONFIG_ADE7854_SPI_MODULE)
1253 { 1242 {
1254 .modalias = "ade7854", 1243 .modalias = "ade7854",
1255 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1244 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1259,8 +1248,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1259 .mode = SPI_MODE_3, 1248 .mode = SPI_MODE_3,
1260 }, 1249 },
1261#endif 1250#endif
1262#if defined(CONFIG_ADIS16060) \ 1251#if IS_ENABLED(CONFIG_ADIS16060)
1263 || defined(CONFIG_ADIS16060_MODULE)
1264 { 1252 {
1265 .modalias = "adis16060_r", 1253 .modalias = "adis16060_r",
1266 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */ 1254 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */
@@ -1278,8 +1266,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1278 .mode = SPI_MODE_1, 1266 .mode = SPI_MODE_1,
1279 }, 1267 },
1280#endif 1268#endif
1281#if defined(CONFIG_ADIS16130) \ 1269#if IS_ENABLED(CONFIG_ADIS16130)
1282 || defined(CONFIG_ADIS16130_MODULE)
1283 { 1270 {
1284 .modalias = "adis16130", 1271 .modalias = "adis16130",
1285 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1272 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1289,8 +1276,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1289 .mode = SPI_MODE_3, 1276 .mode = SPI_MODE_3,
1290 }, 1277 },
1291#endif 1278#endif
1292#if defined(CONFIG_ADIS16201) \ 1279#if IS_ENABLED(CONFIG_ADIS16201)
1293 || defined(CONFIG_ADIS16201_MODULE)
1294 { 1280 {
1295 .modalias = "adis16201", 1281 .modalias = "adis16201",
1296 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1282 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1301,8 +1287,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1301 .irq = IRQ_PF4, 1287 .irq = IRQ_PF4,
1302 }, 1288 },
1303#endif 1289#endif
1304#if defined(CONFIG_ADIS16203) \ 1290#if IS_ENABLED(CONFIG_ADIS16203)
1305 || defined(CONFIG_ADIS16203_MODULE)
1306 { 1291 {
1307 .modalias = "adis16203", 1292 .modalias = "adis16203",
1308 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1293 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1313,8 +1298,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1313 .irq = IRQ_PF4, 1298 .irq = IRQ_PF4,
1314 }, 1299 },
1315#endif 1300#endif
1316#if defined(CONFIG_ADIS16204) \ 1301#if IS_ENABLED(CONFIG_ADIS16204)
1317 || defined(CONFIG_ADIS16204_MODULE)
1318 { 1302 {
1319 .modalias = "adis16204", 1303 .modalias = "adis16204",
1320 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1304 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1325,8 +1309,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1325 .irq = IRQ_PF4, 1309 .irq = IRQ_PF4,
1326 }, 1310 },
1327#endif 1311#endif
1328#if defined(CONFIG_ADIS16209) \ 1312#if IS_ENABLED(CONFIG_ADIS16209)
1329 || defined(CONFIG_ADIS16209_MODULE)
1330 { 1313 {
1331 .modalias = "adis16209", 1314 .modalias = "adis16209",
1332 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1315 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1337,8 +1320,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1337 .irq = IRQ_PF4, 1320 .irq = IRQ_PF4,
1338 }, 1321 },
1339#endif 1322#endif
1340#if defined(CONFIG_ADIS16220) \ 1323#if IS_ENABLED(CONFIG_ADIS16220)
1341 || defined(CONFIG_ADIS16220_MODULE)
1342 { 1324 {
1343 .modalias = "adis16220", 1325 .modalias = "adis16220",
1344 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ 1326 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */
@@ -1349,8 +1331,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1349 .irq = IRQ_PF4, 1331 .irq = IRQ_PF4,
1350 }, 1332 },
1351#endif 1333#endif
1352#if defined(CONFIG_ADIS16240) \ 1334#if IS_ENABLED(CONFIG_ADIS16240)
1353 || defined(CONFIG_ADIS16240_MODULE)
1354 { 1335 {
1355 .modalias = "adis16240", 1336 .modalias = "adis16240",
1356 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ 1337 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */
@@ -1361,8 +1342,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1361 .irq = IRQ_PF4, 1342 .irq = IRQ_PF4,
1362 }, 1343 },
1363#endif 1344#endif
1364#if defined(CONFIG_ADIS16260) \ 1345#if IS_ENABLED(CONFIG_ADIS16260)
1365 || defined(CONFIG_ADIS16260_MODULE)
1366 { 1346 {
1367 .modalias = "adis16260", 1347 .modalias = "adis16260",
1368 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ 1348 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */
@@ -1373,8 +1353,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1373 .irq = IRQ_PF4, 1353 .irq = IRQ_PF4,
1374 }, 1354 },
1375#endif 1355#endif
1376#if defined(CONFIG_ADIS16261) \ 1356#if IS_ENABLED(CONFIG_ADIS16261)
1377 || defined(CONFIG_ADIS16261_MODULE)
1378 { 1357 {
1379 .modalias = "adis16261", 1358 .modalias = "adis16261",
1380 .max_speed_hz = 2500000, /* max spi clock (SCK) speed in HZ */ 1359 .max_speed_hz = 2500000, /* max spi clock (SCK) speed in HZ */
@@ -1384,8 +1363,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1384 .mode = SPI_MODE_3, 1363 .mode = SPI_MODE_3,
1385 }, 1364 },
1386#endif 1365#endif
1387#if defined(CONFIG_ADIS16300) \ 1366#if IS_ENABLED(CONFIG_ADIS16300)
1388 || defined(CONFIG_ADIS16300_MODULE)
1389 { 1367 {
1390 .modalias = "adis16300", 1368 .modalias = "adis16300",
1391 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1369 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1396,8 +1374,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1396 .irq = IRQ_PF4, 1374 .irq = IRQ_PF4,
1397 }, 1375 },
1398#endif 1376#endif
1399#if defined(CONFIG_ADIS16350) \ 1377#if IS_ENABLED(CONFIG_ADIS16350)
1400 || defined(CONFIG_ADIS16350_MODULE)
1401 { 1378 {
1402 .modalias = "adis16364", 1379 .modalias = "adis16364",
1403 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1380 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1408,8 +1385,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1408 .irq = IRQ_PF4, 1385 .irq = IRQ_PF4,
1409 }, 1386 },
1410#endif 1387#endif
1411#if defined(CONFIG_ADIS16400) \ 1388#if IS_ENABLED(CONFIG_ADIS16400)
1412 || defined(CONFIG_ADIS16400_MODULE)
1413 { 1389 {
1414 .modalias = "adis16400", 1390 .modalias = "adis16400",
1415 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ 1391 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
@@ -1421,7 +1397,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1421#endif 1397#endif
1422}; 1398};
1423 1399
1424#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1400#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
1425/* SPI controller data */ 1401/* SPI controller data */
1426static struct bfin5xx_spi_master bfin_spi0_info = { 1402static struct bfin5xx_spi_master bfin_spi0_info = {
1427 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, 1403 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
@@ -1459,7 +1435,7 @@ static struct platform_device bfin_spi0_device = {
1459}; 1435};
1460#endif /* spi master and devices */ 1436#endif /* spi master and devices */
1461 1437
1462#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) 1438#if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
1463 1439
1464/* SPORT SPI controller data */ 1440/* SPORT SPI controller data */
1465static struct bfin5xx_spi_master bfin_sport_spi0_info = { 1441static struct bfin5xx_spi_master bfin_sport_spi0_info = {
@@ -1524,13 +1500,13 @@ static struct platform_device bfin_sport_spi1_device = {
1524 1500
1525#endif /* sport spi master and devices */ 1501#endif /* sport spi master and devices */
1526 1502
1527#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 1503#if IS_ENABLED(CONFIG_FB_BF537_LQ035)
1528static struct platform_device bfin_fb_device = { 1504static struct platform_device bfin_fb_device = {
1529 .name = "bf537_lq035", 1505 .name = "bf537_lq035",
1530}; 1506};
1531#endif 1507#endif
1532 1508
1533#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 1509#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
1534#include <asm/bfin-lq035q1.h> 1510#include <asm/bfin-lq035q1.h>
1535 1511
1536static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { 1512static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
@@ -1559,8 +1535,7 @@ static struct platform_device bfin_lq035q1_device = {
1559}; 1535};
1560#endif 1536#endif
1561 1537
1562#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 1538#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
1563 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
1564#include <linux/videodev2.h> 1539#include <linux/videodev2.h>
1565#include <media/blackfin/bfin_capture.h> 1540#include <media/blackfin/bfin_capture.h>
1566#include <media/blackfin/ppi.h> 1541#include <media/blackfin/ppi.h>
@@ -1580,8 +1555,7 @@ static const struct ppi_info ppi_info = {
1580 .pin_req = ppi_req, 1555 .pin_req = ppi_req,
1581}; 1556};
1582 1557
1583#if defined(CONFIG_VIDEO_VS6624) \ 1558#if IS_ENABLED(CONFIG_VIDEO_VS6624)
1584 || defined(CONFIG_VIDEO_VS6624_MODULE)
1585static struct v4l2_input vs6624_inputs[] = { 1559static struct v4l2_input vs6624_inputs[] = {
1586 { 1560 {
1587 .index = 0, 1561 .index = 0,
@@ -1624,7 +1598,7 @@ static struct platform_device bfin_capture_device = {
1624}; 1598};
1625#endif 1599#endif
1626 1600
1627#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1601#if IS_ENABLED(CONFIG_SERIAL_BFIN)
1628#ifdef CONFIG_SERIAL_BFIN_UART0 1602#ifdef CONFIG_SERIAL_BFIN_UART0
1629static struct resource bfin_uart0_resources[] = { 1603static struct resource bfin_uart0_resources[] = {
1630 { 1604 {
@@ -1735,7 +1709,7 @@ static struct platform_device bfin_uart1_device = {
1735#endif 1709#endif
1736#endif 1710#endif
1737 1711
1738#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1712#if IS_ENABLED(CONFIG_BFIN_SIR)
1739#ifdef CONFIG_BFIN_SIR0 1713#ifdef CONFIG_BFIN_SIR0
1740static struct resource bfin_sir0_resources[] = { 1714static struct resource bfin_sir0_resources[] = {
1741 { 1715 {
@@ -1790,7 +1764,7 @@ static struct platform_device bfin_sir1_device = {
1790#endif 1764#endif
1791#endif 1765#endif
1792 1766
1793#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1767#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
1794static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1768static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
1795 1769
1796static struct resource bfin_twi0_resource[] = { 1770static struct resource bfin_twi0_resource[] = {
@@ -1817,7 +1791,7 @@ static struct platform_device i2c_bfin_twi_device = {
1817}; 1791};
1818#endif 1792#endif
1819 1793
1820#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) 1794#if IS_ENABLED(CONFIG_KEYBOARD_ADP5588)
1821static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { 1795static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
1822 [0] = KEY_GRAVE, 1796 [0] = KEY_GRAVE,
1823 [1] = KEY_1, 1797 [1] = KEY_1,
@@ -1902,7 +1876,7 @@ static struct adp5588_kpad_platform_data adp5588_kpad_data = {
1902}; 1876};
1903#endif 1877#endif
1904 1878
1905#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 1879#if IS_ENABLED(CONFIG_PMIC_ADP5520)
1906#include <linux/mfd/adp5520.h> 1880#include <linux/mfd/adp5520.h>
1907 1881
1908 /* 1882 /*
@@ -2013,14 +1987,14 @@ static struct adp5520_platform_data adp5520_pdev_data = {
2013 1987
2014#endif 1988#endif
2015 1989
2016#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) 1990#if IS_ENABLED(CONFIG_GPIO_ADP5588)
2017static struct adp5588_gpio_platform_data adp5588_gpio_data = { 1991static struct adp5588_gpio_platform_data adp5588_gpio_data = {
2018 .gpio_start = 50, 1992 .gpio_start = 50,
2019 .pullup_dis_mask = 0, 1993 .pullup_dis_mask = 0,
2020}; 1994};
2021#endif 1995#endif
2022 1996
2023#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) 1997#if IS_ENABLED(CONFIG_BACKLIGHT_ADP8870)
2024#include <linux/i2c/adp8870.h> 1998#include <linux/i2c/adp8870.h>
2025static struct led_info adp8870_leds[] = { 1999static struct led_info adp8870_leds[] = {
2026 { 2000 {
@@ -2072,7 +2046,7 @@ static struct adp8870_backlight_platform_data adp8870_pdata = {
2072}; 2046};
2073#endif 2047#endif
2074 2048
2075#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) 2049#if IS_ENABLED(CONFIG_BACKLIGHT_ADP8860)
2076#include <linux/i2c/adp8860.h> 2050#include <linux/i2c/adp8860.h>
2077static struct led_info adp8860_leds[] = { 2051static struct led_info adp8860_leds[] = {
2078 { 2052 {
@@ -2114,7 +2088,7 @@ static struct adp8860_backlight_platform_data adp8860_pdata = {
2114}; 2088};
2115#endif 2089#endif
2116 2090
2117#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) 2091#if IS_ENABLED(CONFIG_REGULATOR_AD5398)
2118static struct regulator_consumer_supply ad5398_consumer = { 2092static struct regulator_consumer_supply ad5398_consumer = {
2119 .supply = "current", 2093 .supply = "current",
2120}; 2094};
@@ -2129,8 +2103,7 @@ static struct regulator_init_data ad5398_regulator_data = {
2129 .consumer_supplies = &ad5398_consumer, 2103 .consumer_supplies = &ad5398_consumer,
2130}; 2104};
2131 2105
2132#if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ 2106#if IS_ENABLED(CONFIG_REGULATOR_VIRTUAL_CONSUMER)
2133 defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
2134static struct platform_device ad5398_virt_consumer_device = { 2107static struct platform_device ad5398_virt_consumer_device = {
2135 .name = "reg-virt-consumer", 2108 .name = "reg-virt-consumer",
2136 .id = 0, 2109 .id = 0,
@@ -2139,8 +2112,7 @@ static struct platform_device ad5398_virt_consumer_device = {
2139 }, 2112 },
2140}; 2113};
2141#endif 2114#endif
2142#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2115#if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER)
2143 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2144static struct regulator_bulk_data ad5398_bulk_data = { 2116static struct regulator_bulk_data ad5398_bulk_data = {
2145 .supply = "current", 2117 .supply = "current",
2146}; 2118};
@@ -2161,14 +2133,14 @@ static struct platform_device ad5398_userspace_consumer_device = {
2161#endif 2133#endif
2162#endif 2134#endif
2163 2135
2164#if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE) 2136#if IS_ENABLED(CONFIG_ADT7410)
2165/* INT bound temperature alarm event. line 1 */ 2137/* INT bound temperature alarm event. line 1 */
2166static unsigned long adt7410_platform_data[2] = { 2138static unsigned long adt7410_platform_data[2] = {
2167 IRQ_PG4, IRQF_TRIGGER_LOW, 2139 IRQ_PG4, IRQF_TRIGGER_LOW,
2168}; 2140};
2169#endif 2141#endif
2170 2142
2171#if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE) 2143#if IS_ENABLED(CONFIG_ADT7316_I2C)
2172/* INT bound temperature alarm event. line 1 */ 2144/* INT bound temperature alarm event. line 1 */
2173static unsigned long adt7316_i2c_data[2] = { 2145static unsigned long adt7316_i2c_data[2] = {
2174 IRQF_TRIGGER_LOW, /* interrupt flags */ 2146 IRQF_TRIGGER_LOW, /* interrupt flags */
@@ -2183,13 +2155,13 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
2183 }, 2155 },
2184#endif 2156#endif
2185 2157
2186#if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADAV80X_MODULE) 2158#if IS_ENABLED(CONFIG_SND_SOC_ADAV80X)
2187 { 2159 {
2188 I2C_BOARD_INFO("adav803", 0x10), 2160 I2C_BOARD_INFO("adav803", 0x10),
2189 }, 2161 },
2190#endif 2162#endif
2191 2163
2192#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) 2164#if IS_ENABLED(CONFIG_INPUT_AD714X_I2C)
2193 { 2165 {
2194 I2C_BOARD_INFO("ad7142_captouch", 0x2C), 2166 I2C_BOARD_INFO("ad7142_captouch", 0x2C),
2195 .irq = IRQ_PG5, 2167 .irq = IRQ_PG5,
@@ -2197,39 +2169,39 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
2197 }, 2169 },
2198#endif 2170#endif
2199 2171
2200#if defined(CONFIG_AD7150) || defined(CONFIG_AD7150_MODULE) 2172#if IS_ENABLED(CONFIG_AD7150)
2201 { 2173 {
2202 I2C_BOARD_INFO("ad7150", 0x48), 2174 I2C_BOARD_INFO("ad7150", 0x48),
2203 .irq = IRQ_PG5, /* fixme: use real interrupt number */ 2175 .irq = IRQ_PG5, /* fixme: use real interrupt number */
2204 }, 2176 },
2205#endif 2177#endif
2206 2178
2207#if defined(CONFIG_AD7152) || defined(CONFIG_AD7152_MODULE) 2179#if IS_ENABLED(CONFIG_AD7152)
2208 { 2180 {
2209 I2C_BOARD_INFO("ad7152", 0x48), 2181 I2C_BOARD_INFO("ad7152", 0x48),
2210 }, 2182 },
2211#endif 2183#endif
2212 2184
2213#if defined(CONFIG_AD774X) || defined(CONFIG_AD774X_MODULE) 2185#if IS_ENABLED(CONFIG_AD774X)
2214 { 2186 {
2215 I2C_BOARD_INFO("ad774x", 0x48), 2187 I2C_BOARD_INFO("ad774x", 0x48),
2216 }, 2188 },
2217#endif 2189#endif
2218 2190
2219#if defined(CONFIG_ADE7854_I2C) || defined(CONFIG_ADE7854_I2C_MODULE) 2191#if IS_ENABLED(CONFIG_ADE7854_I2C)
2220 { 2192 {
2221 I2C_BOARD_INFO("ade7854", 0x38), 2193 I2C_BOARD_INFO("ade7854", 0x38),
2222 }, 2194 },
2223#endif 2195#endif
2224 2196
2225#if defined(CONFIG_ADT75) || defined(CONFIG_ADT75_MODULE) 2197#if IS_ENABLED(CONFIG_SENSORS_LM75)
2226 { 2198 {
2227 I2C_BOARD_INFO("adt75", 0x9), 2199 I2C_BOARD_INFO("adt75", 0x9),
2228 .irq = IRQ_PG5, 2200 .irq = IRQ_PG5,
2229 }, 2201 },
2230#endif 2202#endif
2231 2203
2232#if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE) 2204#if IS_ENABLED(CONFIG_ADT7410)
2233 { 2205 {
2234 I2C_BOARD_INFO("adt7410", 0x48), 2206 I2C_BOARD_INFO("adt7410", 0x48),
2235 /* CT critical temperature event. line 0 */ 2207 /* CT critical temperature event. line 0 */
@@ -2238,14 +2210,14 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
2238 }, 2210 },
2239#endif 2211#endif
2240 2212
2241#if defined(CONFIG_AD7291) || defined(CONFIG_AD7291_MODULE) 2213#if IS_ENABLED(CONFIG_AD7291)
2242 { 2214 {
2243 I2C_BOARD_INFO("ad7291", 0x20), 2215 I2C_BOARD_INFO("ad7291", 0x20),
2244 .irq = IRQ_PG5, 2216 .irq = IRQ_PG5,
2245 }, 2217 },
2246#endif 2218#endif
2247 2219
2248#if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE) 2220#if IS_ENABLED(CONFIG_ADT7316_I2C)
2249 { 2221 {
2250 I2C_BOARD_INFO("adt7316", 0x48), 2222 I2C_BOARD_INFO("adt7316", 0x48),
2251 .irq = IRQ_PG6, 2223 .irq = IRQ_PG6,
@@ -2253,128 +2225,128 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
2253 }, 2225 },
2254#endif 2226#endif
2255 2227
2256#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 2228#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
2257 { 2229 {
2258 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 2230 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
2259 }, 2231 },
2260#endif 2232#endif
2261#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 2233#if IS_ENABLED(CONFIG_INPUT_PCF8574)
2262 { 2234 {
2263 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 2235 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
2264 .irq = IRQ_PG6, 2236 .irq = IRQ_PG6,
2265 }, 2237 },
2266#endif 2238#endif
2267#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) 2239#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C)
2268 { 2240 {
2269 I2C_BOARD_INFO("ad7879", 0x2F), 2241 I2C_BOARD_INFO("ad7879", 0x2F),
2270 .irq = IRQ_PG5, 2242 .irq = IRQ_PG5,
2271 .platform_data = (void *)&bfin_ad7879_ts_info, 2243 .platform_data = (void *)&bfin_ad7879_ts_info,
2272 }, 2244 },
2273#endif 2245#endif
2274#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) 2246#if IS_ENABLED(CONFIG_KEYBOARD_ADP5588)
2275 { 2247 {
2276 I2C_BOARD_INFO("adp5588-keys", 0x34), 2248 I2C_BOARD_INFO("adp5588-keys", 0x34),
2277 .irq = IRQ_PG0, 2249 .irq = IRQ_PG0,
2278 .platform_data = (void *)&adp5588_kpad_data, 2250 .platform_data = (void *)&adp5588_kpad_data,
2279 }, 2251 },
2280#endif 2252#endif
2281#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) 2253#if IS_ENABLED(CONFIG_PMIC_ADP5520)
2282 { 2254 {
2283 I2C_BOARD_INFO("pmic-adp5520", 0x32), 2255 I2C_BOARD_INFO("pmic-adp5520", 0x32),
2284 .irq = IRQ_PG0, 2256 .irq = IRQ_PG0,
2285 .platform_data = (void *)&adp5520_pdev_data, 2257 .platform_data = (void *)&adp5520_pdev_data,
2286 }, 2258 },
2287#endif 2259#endif
2288#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) 2260#if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
2289 { 2261 {
2290 I2C_BOARD_INFO("adxl34x", 0x53), 2262 I2C_BOARD_INFO("adxl34x", 0x53),
2291 .irq = IRQ_PG3, 2263 .irq = IRQ_PG3,
2292 .platform_data = (void *)&adxl34x_info, 2264 .platform_data = (void *)&adxl34x_info,
2293 }, 2265 },
2294#endif 2266#endif
2295#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) 2267#if IS_ENABLED(CONFIG_GPIO_ADP5588)
2296 { 2268 {
2297 I2C_BOARD_INFO("adp5588-gpio", 0x34), 2269 I2C_BOARD_INFO("adp5588-gpio", 0x34),
2298 .platform_data = (void *)&adp5588_gpio_data, 2270 .platform_data = (void *)&adp5588_gpio_data,
2299 }, 2271 },
2300#endif 2272#endif
2301#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) 2273#if IS_ENABLED(CONFIG_FB_BFIN_7393)
2302 { 2274 {
2303 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 2275 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
2304 }, 2276 },
2305#endif 2277#endif
2306#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 2278#if IS_ENABLED(CONFIG_FB_BF537_LQ035)
2307 { 2279 {
2308 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F), 2280 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F),
2309 }, 2281 },
2310#endif 2282#endif
2311#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) 2283#if IS_ENABLED(CONFIG_BACKLIGHT_ADP8870)
2312 { 2284 {
2313 I2C_BOARD_INFO("adp8870", 0x2B), 2285 I2C_BOARD_INFO("adp8870", 0x2B),
2314 .platform_data = (void *)&adp8870_pdata, 2286 .platform_data = (void *)&adp8870_pdata,
2315 }, 2287 },
2316#endif 2288#endif
2317#if defined(CONFIG_SND_SOC_ADAU1371) || defined(CONFIG_SND_SOC_ADAU1371_MODULE) 2289#if IS_ENABLED(CONFIG_SND_SOC_ADAU1371)
2318 { 2290 {
2319 I2C_BOARD_INFO("adau1371", 0x1A), 2291 I2C_BOARD_INFO("adau1371", 0x1A),
2320 }, 2292 },
2321#endif 2293#endif
2322#if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) 2294#if IS_ENABLED(CONFIG_SND_SOC_ADAU1761)
2323 { 2295 {
2324 I2C_BOARD_INFO("adau1761", 0x38), 2296 I2C_BOARD_INFO("adau1761", 0x38),
2325 }, 2297 },
2326#endif 2298#endif
2327#if defined(CONFIG_SND_SOC_ADAU1361) || defined(CONFIG_SND_SOC_ADAU1361_MODULE) 2299#if IS_ENABLED(CONFIG_SND_SOC_ADAU1361)
2328 { 2300 {
2329 I2C_BOARD_INFO("adau1361", 0x38), 2301 I2C_BOARD_INFO("adau1361", 0x38),
2330 }, 2302 },
2331#endif 2303#endif
2332#if defined(CONFIG_SND_SOC_ADAU1701) || defined(CONFIG_SND_SOC_ADAU1701_MODULE) 2304#if IS_ENABLED(CONFIG_SND_SOC_ADAU1701)
2333 { 2305 {
2334 I2C_BOARD_INFO("adau1701", 0x34), 2306 I2C_BOARD_INFO("adau1701", 0x34),
2335 }, 2307 },
2336#endif 2308#endif
2337#if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE) 2309#if IS_ENABLED(CONFIG_AD525X_DPOT)
2338 { 2310 {
2339 I2C_BOARD_INFO("ad5258", 0x18), 2311 I2C_BOARD_INFO("ad5258", 0x18),
2340 }, 2312 },
2341#endif 2313#endif
2342#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 2314#if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
2343 { 2315 {
2344 I2C_BOARD_INFO("ssm2602", 0x1b), 2316 I2C_BOARD_INFO("ssm2602", 0x1b),
2345 }, 2317 },
2346#endif 2318#endif
2347#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) 2319#if IS_ENABLED(CONFIG_REGULATOR_AD5398)
2348 { 2320 {
2349 I2C_BOARD_INFO("ad5398", 0xC), 2321 I2C_BOARD_INFO("ad5398", 0xC),
2350 .platform_data = (void *)&ad5398_regulator_data, 2322 .platform_data = (void *)&ad5398_regulator_data,
2351 }, 2323 },
2352#endif 2324#endif
2353#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) 2325#if IS_ENABLED(CONFIG_BACKLIGHT_ADP8860)
2354 { 2326 {
2355 I2C_BOARD_INFO("adp8860", 0x2A), 2327 I2C_BOARD_INFO("adp8860", 0x2A),
2356 .platform_data = (void *)&adp8860_pdata, 2328 .platform_data = (void *)&adp8860_pdata,
2357 }, 2329 },
2358#endif 2330#endif
2359#if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE) 2331#if IS_ENABLED(CONFIG_SND_SOC_ADAU1373)
2360 { 2332 {
2361 I2C_BOARD_INFO("adau1373", 0x1A), 2333 I2C_BOARD_INFO("adau1373", 0x1A),
2362 }, 2334 },
2363#endif 2335#endif
2364#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 2336#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
2365 { 2337 {
2366 I2C_BOARD_INFO("ad5252", 0x2e), 2338 I2C_BOARD_INFO("ad5252", 0x2e),
2367 }, 2339 },
2368#endif 2340#endif
2369}; 2341};
2370#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) \ 2342#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) \
2371|| defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 2343|| IS_ENABLED(CONFIG_BFIN_SPORT)
2372unsigned short bfin_sport0_peripherals[] = { 2344unsigned short bfin_sport0_peripherals[] = {
2373 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 2345 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
2374 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 2346 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
2375}; 2347};
2376#endif 2348#endif
2377#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 2349#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
2378#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 2350#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
2379static struct resource bfin_sport0_uart_resources[] = { 2351static struct resource bfin_sport0_uart_resources[] = {
2380 { 2352 {
@@ -2439,7 +2411,7 @@ static struct platform_device bfin_sport1_uart_device = {
2439}; 2411};
2440#endif 2412#endif
2441#endif 2413#endif
2442#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 2414#if IS_ENABLED(CONFIG_BFIN_SPORT)
2443static struct resource bfin_sport0_resources[] = { 2415static struct resource bfin_sport0_resources[] = {
2444 { 2416 {
2445 .start = SPORT0_TCR1, 2417 .start = SPORT0_TCR1,
@@ -2482,7 +2454,7 @@ static struct platform_device bfin_sport0_device = {
2482 }, 2454 },
2483}; 2455};
2484#endif 2456#endif
2485#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 2457#if IS_ENABLED(CONFIG_PATA_PLATFORM)
2486#define CF_IDE_NAND_CARD_USE_HDD_INTERFACE 2458#define CF_IDE_NAND_CARD_USE_HDD_INTERFACE
2487/* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */ 2459/* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */
2488 2460
@@ -2569,8 +2541,8 @@ static struct platform_device bfin_dpmc = {
2569 }, 2541 },
2570}; 2542};
2571 2543
2572#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ 2544#if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \
2573 defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2545 IS_ENABLED(CONFIG_SND_BF5XX_AC97)
2574 2546
2575#define SPORT_REQ(x) \ 2547#define SPORT_REQ(x) \
2576 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ 2548 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
@@ -2620,22 +2592,21 @@ static struct resource bfin_snd_resources[][4] = {
2620}; 2592};
2621#endif 2593#endif
2622 2594
2623#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2595#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
2624static struct platform_device bfin_i2s_pcm = { 2596static struct platform_device bfin_i2s_pcm = {
2625 .name = "bfin-i2s-pcm-audio", 2597 .name = "bfin-i2s-pcm-audio",
2626 .id = -1, 2598 .id = -1,
2627}; 2599};
2628#endif 2600#endif
2629 2601
2630#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2602#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
2631static struct platform_device bfin_ac97_pcm = { 2603static struct platform_device bfin_ac97_pcm = {
2632 .name = "bfin-ac97-pcm-audio", 2604 .name = "bfin-ac97-pcm-audio",
2633 .id = -1, 2605 .id = -1,
2634}; 2606};
2635#endif 2607#endif
2636 2608
2637#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 2609#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
2638 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
2639static const char * const ad1836_link[] = { 2610static const char * const ad1836_link[] = {
2640 "bfin-i2s.0", 2611 "bfin-i2s.0",
2641 "spi0.4", 2612 "spi0.4",
@@ -2649,8 +2620,7 @@ static struct platform_device bfin_ad1836_machine = {
2649}; 2620};
2650#endif 2621#endif
2651 2622
2652#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 2623#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
2653 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
2654static const unsigned ad73311_gpio[] = { 2624static const unsigned ad73311_gpio[] = {
2655 GPIO_PF4, 2625 GPIO_PF4,
2656}; 2626};
@@ -2664,22 +2634,21 @@ static struct platform_device bfin_ad73311_machine = {
2664}; 2634};
2665#endif 2635#endif
2666 2636
2667#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) 2637#if IS_ENABLED(CONFIG_SND_SOC_AD73311)
2668static struct platform_device bfin_ad73311_codec_device = { 2638static struct platform_device bfin_ad73311_codec_device = {
2669 .name = "ad73311", 2639 .name = "ad73311",
2670 .id = -1, 2640 .id = -1,
2671}; 2641};
2672#endif 2642#endif
2673 2643
2674#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ 2644#if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X)
2675 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE)
2676static struct platform_device bfin_eval_adav801_device = { 2645static struct platform_device bfin_eval_adav801_device = {
2677 .name = "bfin-eval-adav801", 2646 .name = "bfin-eval-adav801",
2678 .id = -1, 2647 .id = -1,
2679}; 2648};
2680#endif 2649#endif
2681 2650
2682#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) 2651#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
2683static struct platform_device bfin_i2s = { 2652static struct platform_device bfin_i2s = {
2684 .name = "bfin-i2s", 2653 .name = "bfin-i2s",
2685 .id = CONFIG_SND_BF5XX_SPORT_NUM, 2654 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -2691,7 +2660,7 @@ static struct platform_device bfin_i2s = {
2691}; 2660};
2692#endif 2661#endif
2693 2662
2694#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) 2663#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
2695static struct platform_device bfin_ac97 = { 2664static struct platform_device bfin_ac97 = {
2696 .name = "bfin-ac97", 2665 .name = "bfin-ac97",
2697 .id = CONFIG_SND_BF5XX_SPORT_NUM, 2666 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -2703,7 +2672,7 @@ static struct platform_device bfin_ac97 = {
2703}; 2672};
2704#endif 2673#endif
2705 2674
2706#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) 2675#if IS_ENABLED(CONFIG_REGULATOR_FIXED_VOLTAGE)
2707#define REGULATOR_ADP122 "adp122" 2676#define REGULATOR_ADP122 "adp122"
2708#define REGULATOR_ADP122_UV 2500000 2677#define REGULATOR_ADP122_UV 2500000
2709 2678
@@ -2741,8 +2710,7 @@ static struct platform_device adp_switch_device = {
2741 }, 2710 },
2742}; 2711};
2743 2712
2744#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2713#if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER)
2745 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2746static struct regulator_bulk_data adp122_bulk_data = { 2714static struct regulator_bulk_data adp122_bulk_data = {
2747 .supply = REGULATOR_ADP122, 2715 .supply = REGULATOR_ADP122,
2748}; 2716};
@@ -2763,8 +2731,7 @@ static struct platform_device adp122_userspace_consumer_device = {
2763#endif 2731#endif
2764#endif 2732#endif
2765 2733
2766#if defined(CONFIG_IIO_GPIO_TRIGGER) || \ 2734#if IS_ENABLED(CONFIG_IIO_GPIO_TRIGGER)
2767 defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
2768 2735
2769static struct resource iio_gpio_trigger_resources[] = { 2736static struct resource iio_gpio_trigger_resources[] = {
2770 [0] = { 2737 [0] = {
@@ -2781,15 +2748,13 @@ static struct platform_device iio_gpio_trigger = {
2781}; 2748};
2782#endif 2749#endif
2783 2750
2784#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ 2751#if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373)
2785 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE)
2786static struct platform_device bf5xx_adau1373_device = { 2752static struct platform_device bf5xx_adau1373_device = {
2787 .name = "bfin-eval-adau1373", 2753 .name = "bfin-eval-adau1373",
2788}; 2754};
2789#endif 2755#endif
2790 2756
2791#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ 2757#if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701)
2792 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE)
2793static struct platform_device bf5xx_adau1701_device = { 2758static struct platform_device bf5xx_adau1701_device = {
2794 .name = "bfin-eval-adau1701", 2759 .name = "bfin-eval-adau1701",
2795}; 2760};
@@ -2798,73 +2763,72 @@ static struct platform_device bf5xx_adau1701_device = {
2798static struct platform_device *stamp_devices[] __initdata = { 2763static struct platform_device *stamp_devices[] __initdata = {
2799 2764
2800 &bfin_dpmc, 2765 &bfin_dpmc,
2801#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) 2766#if IS_ENABLED(CONFIG_BFIN_SPORT)
2802 &bfin_sport0_device, 2767 &bfin_sport0_device,
2803#endif 2768#endif
2804#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 2769#if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
2805 &bfin_pcmcia_cf_device, 2770 &bfin_pcmcia_cf_device,
2806#endif 2771#endif
2807 2772
2808#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 2773#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
2809 &rtc_device, 2774 &rtc_device,
2810#endif 2775#endif
2811 2776
2812#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) 2777#if IS_ENABLED(CONFIG_USB_SL811_HCD)
2813 &sl811_hcd_device, 2778 &sl811_hcd_device,
2814#endif 2779#endif
2815 2780
2816#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 2781#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
2817 &isp1362_hcd_device, 2782 &isp1362_hcd_device,
2818#endif 2783#endif
2819 2784
2820#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 2785#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
2821 &bfin_isp1760_device, 2786 &bfin_isp1760_device,
2822#endif 2787#endif
2823 2788
2824#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 2789#if IS_ENABLED(CONFIG_SMC91X)
2825 &smc91x_device, 2790 &smc91x_device,
2826#endif 2791#endif
2827 2792
2828#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 2793#if IS_ENABLED(CONFIG_DM9000)
2829 &dm9000_device, 2794 &dm9000_device,
2830#endif 2795#endif
2831 2796
2832#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 2797#if IS_ENABLED(CONFIG_CAN_BFIN)
2833 &bfin_can_device, 2798 &bfin_can_device,
2834#endif 2799#endif
2835 2800
2836#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 2801#if IS_ENABLED(CONFIG_BFIN_MAC)
2837 &bfin_mii_bus, 2802 &bfin_mii_bus,
2838 &bfin_mac_device, 2803 &bfin_mac_device,
2839#endif 2804#endif
2840 2805
2841#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 2806#if IS_ENABLED(CONFIG_USB_NET2272)
2842 &net2272_bfin_device, 2807 &net2272_bfin_device,
2843#endif 2808#endif
2844 2809
2845#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 2810#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
2846 &bfin_spi0_device, 2811 &bfin_spi0_device,
2847#endif 2812#endif
2848 2813
2849#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) 2814#if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
2850 &bfin_sport_spi0_device, 2815 &bfin_sport_spi0_device,
2851 &bfin_sport_spi1_device, 2816 &bfin_sport_spi1_device,
2852#endif 2817#endif
2853 2818
2854#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 2819#if IS_ENABLED(CONFIG_FB_BF537_LQ035)
2855 &bfin_fb_device, 2820 &bfin_fb_device,
2856#endif 2821#endif
2857 2822
2858#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 2823#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
2859 &bfin_lq035q1_device, 2824 &bfin_lq035q1_device,
2860#endif 2825#endif
2861 2826
2862#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 2827#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
2863 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
2864 &bfin_capture_device, 2828 &bfin_capture_device,
2865#endif 2829#endif
2866 2830
2867#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 2831#if IS_ENABLED(CONFIG_SERIAL_BFIN)
2868#ifdef CONFIG_SERIAL_BFIN_UART0 2832#ifdef CONFIG_SERIAL_BFIN_UART0
2869 &bfin_uart0_device, 2833 &bfin_uart0_device,
2870#endif 2834#endif
@@ -2873,7 +2837,7 @@ static struct platform_device *stamp_devices[] __initdata = {
2873#endif 2837#endif
2874#endif 2838#endif
2875 2839
2876#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 2840#if IS_ENABLED(CONFIG_BFIN_SIR)
2877#ifdef CONFIG_BFIN_SIR0 2841#ifdef CONFIG_BFIN_SIR0
2878 &bfin_sir0_device, 2842 &bfin_sir0_device,
2879#endif 2843#endif
@@ -2882,11 +2846,11 @@ static struct platform_device *stamp_devices[] __initdata = {
2882#endif 2846#endif
2883#endif 2847#endif
2884 2848
2885#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 2849#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
2886 &i2c_bfin_twi_device, 2850 &i2c_bfin_twi_device,
2887#endif 2851#endif
2888 2852
2889#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 2853#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
2890#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 2854#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
2891 &bfin_sport0_uart_device, 2855 &bfin_sport0_uart_device,
2892#endif 2856#endif
@@ -2895,95 +2859,86 @@ static struct platform_device *stamp_devices[] __initdata = {
2895#endif 2859#endif
2896#endif 2860#endif
2897 2861
2898#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 2862#if IS_ENABLED(CONFIG_PATA_PLATFORM)
2899 &bfin_pata_device, 2863 &bfin_pata_device,
2900#endif 2864#endif
2901 2865
2902#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 2866#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
2903 &bfin_device_gpiokeys, 2867 &bfin_device_gpiokeys,
2904#endif 2868#endif
2905 2869
2906#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 2870#if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
2907 &bfin_async_nand_device, 2871 &bfin_async_nand_device,
2908#endif 2872#endif
2909 2873
2910#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 2874#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
2911 &stamp_flash_device, 2875 &stamp_flash_device,
2912#endif 2876#endif
2913 2877
2914#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2878#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
2915 &bfin_i2s_pcm, 2879 &bfin_i2s_pcm,
2916#endif 2880#endif
2917 2881
2918#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2882#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
2919 &bfin_ac97_pcm, 2883 &bfin_ac97_pcm,
2920#endif 2884#endif
2921 2885
2922#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 2886#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
2923 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
2924 &bfin_ad1836_machine, 2887 &bfin_ad1836_machine,
2925#endif 2888#endif
2926 2889
2927#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 2890#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
2928 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
2929 &bfin_ad73311_machine, 2891 &bfin_ad73311_machine,
2930#endif 2892#endif
2931 2893
2932#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) 2894#if IS_ENABLED(CONFIG_SND_SOC_AD73311)
2933 &bfin_ad73311_codec_device, 2895 &bfin_ad73311_codec_device,
2934#endif 2896#endif
2935 2897
2936#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) 2898#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
2937 &bfin_i2s, 2899 &bfin_i2s,
2938#endif 2900#endif
2939 2901
2940#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) 2902#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
2941 &bfin_ac97, 2903 &bfin_ac97,
2942#endif 2904#endif
2943 2905
2944#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) 2906#if IS_ENABLED(CONFIG_REGULATOR_AD5398)
2945#if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ 2907#if IS_ENABLED(CONFIG_REGULATOR_VIRTUAL_CONSUMER)
2946 defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
2947 &ad5398_virt_consumer_device, 2908 &ad5398_virt_consumer_device,
2948#endif 2909#endif
2949#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2910#if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER)
2950 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2951 &ad5398_userspace_consumer_device, 2911 &ad5398_userspace_consumer_device,
2952#endif 2912#endif
2953#endif 2913#endif
2954 2914
2955#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) 2915#if IS_ENABLED(CONFIG_REGULATOR_FIXED_VOLTAGE)
2956 &adp_switch_device, 2916 &adp_switch_device,
2957#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2917#if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER)
2958 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2959 &adp122_userspace_consumer_device, 2918 &adp122_userspace_consumer_device,
2960#endif 2919#endif
2961#endif 2920#endif
2962 2921
2963#if defined(CONFIG_IIO_GPIO_TRIGGER) || \ 2922#if IS_ENABLED(CONFIG_IIO_GPIO_TRIGGER)
2964 defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
2965 &iio_gpio_trigger, 2923 &iio_gpio_trigger,
2966#endif 2924#endif
2967 2925
2968#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ 2926#if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373)
2969 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE)
2970 &bf5xx_adau1373_device, 2927 &bf5xx_adau1373_device,
2971#endif 2928#endif
2972 2929
2973#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ 2930#if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701)
2974 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE)
2975 &bf5xx_adau1701_device, 2931 &bf5xx_adau1701_device,
2976#endif 2932#endif
2977 2933
2978#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ 2934#if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X)
2979 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE)
2980 &bfin_eval_adav801_device, 2935 &bfin_eval_adav801_device,
2981#endif 2936#endif
2982}; 2937};
2983 2938
2984static int __init net2272_init(void) 2939static int __init net2272_init(void)
2985{ 2940{
2986#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 2941#if IS_ENABLED(CONFIG_USB_NET2272)
2987 int ret; 2942 int ret;
2988 2943
2989 ret = gpio_request(GPIO_PF6, "net2272"); 2944 ret = gpio_request(GPIO_PF6, "net2272");
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index e285c3675286..a0211225748d 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -16,7 +16,7 @@
16#include <linux/mtd/physmap.h> 16#include <linux/mtd/physmap.h>
17#include <linux/spi/spi.h> 17#include <linux/spi/spi.h>
18#include <linux/spi/flash.h> 18#include <linux/spi/flash.h>
19#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 19#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
20#include <linux/usb/isp1362.h> 20#include <linux/usb/isp1362.h>
21#endif 21#endif
22#include <linux/ata_platform.h> 22#include <linux/ata_platform.h>
@@ -32,10 +32,10 @@
32 */ 32 */
33const char bfin_board_name[] = "Bluetechnix TCM BF537"; 33const char bfin_board_name[] = "Bluetechnix TCM BF537";
34 34
35#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 35#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
36/* all SPI peripherals info goes here */ 36/* all SPI peripherals info goes here */
37 37
38#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 38#if IS_ENABLED(CONFIG_MTD_M25P80)
39static struct mtd_partition bfin_spi_flash_partitions[] = { 39static struct mtd_partition bfin_spi_flash_partitions[] = {
40 { 40 {
41 .name = "bootloader(spi)", 41 .name = "bootloader(spi)",
@@ -66,14 +66,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
66}; 66};
67#endif 67#endif
68 68
69#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 69#if IS_ENABLED(CONFIG_MMC_SPI)
70static struct bfin5xx_spi_chip mmc_spi_chip_info = { 70static struct bfin5xx_spi_chip mmc_spi_chip_info = {
71 .enable_dma = 0, 71 .enable_dma = 0,
72}; 72};
73#endif 73#endif
74 74
75static struct spi_board_info bfin_spi_board_info[] __initdata = { 75static struct spi_board_info bfin_spi_board_info[] __initdata = {
76#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 76#if IS_ENABLED(CONFIG_MTD_M25P80)
77 { 77 {
78 /* the modalias must be the same as spi device driver name */ 78 /* the modalias must be the same as spi device driver name */
79 .modalias = "m25p80", /* Name of spi_driver for this device */ 79 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -86,7 +86,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
86 }, 86 },
87#endif 87#endif
88 88
89#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 89#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
90 { 90 {
91 .modalias = "ad183x", 91 .modalias = "ad183x",
92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -95,7 +95,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
95 }, 95 },
96#endif 96#endif
97 97
98#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 98#if IS_ENABLED(CONFIG_MMC_SPI)
99 { 99 {
100 .modalias = "mmc_spi", 100 .modalias = "mmc_spi",
101 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 101 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
@@ -144,20 +144,20 @@ static struct platform_device bfin_spi0_device = {
144}; 144};
145#endif /* spi master and devices */ 145#endif /* spi master and devices */
146 146
147#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 147#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
148static struct platform_device rtc_device = { 148static struct platform_device rtc_device = {
149 .name = "rtc-bfin", 149 .name = "rtc-bfin",
150 .id = -1, 150 .id = -1,
151}; 151};
152#endif 152#endif
153 153
154#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 154#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
155static struct platform_device hitachi_fb_device = { 155static struct platform_device hitachi_fb_device = {
156 .name = "hitachi-tx09", 156 .name = "hitachi-tx09",
157}; 157};
158#endif 158#endif
159 159
160#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 160#if IS_ENABLED(CONFIG_SMC91X)
161#include <linux/smc91x.h> 161#include <linux/smc91x.h>
162 162
163static struct smc91x_platdata smc91x_info = { 163static struct smc91x_platdata smc91x_info = {
@@ -189,7 +189,7 @@ static struct platform_device smc91x_device = {
189}; 189};
190#endif 190#endif
191 191
192#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 192#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
193static struct resource isp1362_hcd_resources[] = { 193static struct resource isp1362_hcd_resources[] = {
194 { 194 {
195 .start = 0x20308000, 195 .start = 0x20308000,
@@ -228,7 +228,7 @@ static struct platform_device isp1362_hcd_device = {
228}; 228};
229#endif 229#endif
230 230
231#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 231#if IS_ENABLED(CONFIG_USB_NET2272)
232static struct resource net2272_bfin_resources[] = { 232static struct resource net2272_bfin_resources[] = {
233 { 233 {
234 .start = 0x20300000, 234 .start = 0x20300000,
@@ -249,7 +249,7 @@ static struct platform_device net2272_bfin_device = {
249}; 249};
250#endif 250#endif
251 251
252#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 252#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
253static struct mtd_partition cm_partitions[] = { 253static struct mtd_partition cm_partitions[] = {
254 { 254 {
255 .name = "bootloader(nor)", 255 .name = "bootloader(nor)",
@@ -298,7 +298,7 @@ static struct platform_device cm_flash_device = {
298}; 298};
299#endif 299#endif
300 300
301#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 301#if IS_ENABLED(CONFIG_SERIAL_BFIN)
302#ifdef CONFIG_SERIAL_BFIN_UART0 302#ifdef CONFIG_SERIAL_BFIN_UART0
303static struct resource bfin_uart0_resources[] = { 303static struct resource bfin_uart0_resources[] = {
304 { 304 {
@@ -397,7 +397,7 @@ static struct platform_device bfin_uart1_device = {
397#endif 397#endif
398#endif 398#endif
399 399
400#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 400#if IS_ENABLED(CONFIG_BFIN_SIR)
401#ifdef CONFIG_BFIN_SIR0 401#ifdef CONFIG_BFIN_SIR0
402static struct resource bfin_sir0_resources[] = { 402static struct resource bfin_sir0_resources[] = {
403 { 403 {
@@ -452,7 +452,7 @@ static struct platform_device bfin_sir1_device = {
452#endif 452#endif
453#endif 453#endif
454 454
455#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 455#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
456static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 456static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
457 457
458static struct resource bfin_twi0_resource[] = { 458static struct resource bfin_twi0_resource[] = {
@@ -479,7 +479,7 @@ static struct platform_device i2c_bfin_twi_device = {
479}; 479};
480#endif 480#endif
481 481
482#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 482#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
483#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 483#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
484static struct resource bfin_sport0_uart_resources[] = { 484static struct resource bfin_sport0_uart_resources[] = {
485 { 485 {
@@ -550,7 +550,7 @@ static struct platform_device bfin_sport1_uart_device = {
550#endif 550#endif
551#endif 551#endif
552 552
553#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 553#if IS_ENABLED(CONFIG_BFIN_MAC)
554#include <linux/bfin_mac.h> 554#include <linux/bfin_mac.h>
555static const unsigned short bfin_mac_peripherals[] = P_MII0; 555static const unsigned short bfin_mac_peripherals[] = P_MII0;
556 556
@@ -583,7 +583,7 @@ static struct platform_device bfin_mac_device = {
583}; 583};
584#endif 584#endif
585 585
586#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 586#if IS_ENABLED(CONFIG_PATA_PLATFORM)
587#define PATA_INT IRQ_PF14 587#define PATA_INT IRQ_PF14
588 588
589static struct pata_platform_info bfin_pata_platform_data = { 589static struct pata_platform_info bfin_pata_platform_data = {
@@ -651,15 +651,15 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
651 651
652 &bfin_dpmc, 652 &bfin_dpmc,
653 653
654#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 654#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
655 &hitachi_fb_device, 655 &hitachi_fb_device,
656#endif 656#endif
657 657
658#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 658#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
659 &rtc_device, 659 &rtc_device,
660#endif 660#endif
661 661
662#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 662#if IS_ENABLED(CONFIG_SERIAL_BFIN)
663#ifdef CONFIG_SERIAL_BFIN_UART0 663#ifdef CONFIG_SERIAL_BFIN_UART0
664 &bfin_uart0_device, 664 &bfin_uart0_device,
665#endif 665#endif
@@ -668,7 +668,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
668#endif 668#endif
669#endif 669#endif
670 670
671#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 671#if IS_ENABLED(CONFIG_BFIN_SIR)
672#ifdef CONFIG_BFIN_SIR0 672#ifdef CONFIG_BFIN_SIR0
673 &bfin_sir0_device, 673 &bfin_sir0_device,
674#endif 674#endif
@@ -677,11 +677,11 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
677#endif 677#endif
678#endif 678#endif
679 679
680#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 680#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
681 &i2c_bfin_twi_device, 681 &i2c_bfin_twi_device,
682#endif 682#endif
683 683
684#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 684#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
685#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 685#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
686 &bfin_sport0_uart_device, 686 &bfin_sport0_uart_device,
687#endif 687#endif
@@ -690,39 +690,39 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
690#endif 690#endif
691#endif 691#endif
692 692
693#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 693#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
694 &isp1362_hcd_device, 694 &isp1362_hcd_device,
695#endif 695#endif
696 696
697#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 697#if IS_ENABLED(CONFIG_SMC91X)
698 &smc91x_device, 698 &smc91x_device,
699#endif 699#endif
700 700
701#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 701#if IS_ENABLED(CONFIG_BFIN_MAC)
702 &bfin_mii_bus, 702 &bfin_mii_bus,
703 &bfin_mac_device, 703 &bfin_mac_device,
704#endif 704#endif
705 705
706#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 706#if IS_ENABLED(CONFIG_USB_NET2272)
707 &net2272_bfin_device, 707 &net2272_bfin_device,
708#endif 708#endif
709 709
710#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 710#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
711 &bfin_spi0_device, 711 &bfin_spi0_device,
712#endif 712#endif
713 713
714#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 714#if IS_ENABLED(CONFIG_PATA_PLATFORM)
715 &bfin_pata_device, 715 &bfin_pata_device,
716#endif 716#endif
717 717
718#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) 718#if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
719 &cm_flash_device, 719 &cm_flash_device,
720#endif 720#endif
721}; 721};
722 722
723static int __init net2272_init(void) 723static int __init net2272_init(void)
724{ 724{
725#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 725#if IS_ENABLED(CONFIG_USB_NET2272)
726 int ret; 726 int ret;
727 727
728 ret = gpio_request(GPIO_PG14, "net2272"); 728 ret = gpio_request(GPIO_PG14, "net2272");
@@ -742,11 +742,11 @@ static int __init tcm_bf537_init(void)
742{ 742{
743 printk(KERN_INFO "%s(): registering device resources\n", __func__); 743 printk(KERN_INFO "%s(): registering device resources\n", __func__);
744 platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); 744 platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices));
745#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 745#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
746 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 746 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
747#endif 747#endif
748 748
749#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 749#if IS_ENABLED(CONFIG_PATA_PLATFORM)
750 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 750 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
751#endif 751#endif
752 752
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index 755f0dc12010..ae2fcbb00119 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -33,14 +33,14 @@ const char bfin_board_name[] = "ADI BF538-EZKIT";
33 */ 33 */
34 34
35 35
36#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 36#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
37static struct platform_device rtc_device = { 37static struct platform_device rtc_device = {
38 .name = "rtc-bfin", 38 .name = "rtc-bfin",
39 .id = -1, 39 .id = -1,
40}; 40};
41#endif /* CONFIG_RTC_DRV_BFIN */ 41#endif /* CONFIG_RTC_DRV_BFIN */
42 42
43#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 43#if IS_ENABLED(CONFIG_SERIAL_BFIN)
44#ifdef CONFIG_SERIAL_BFIN_UART0 44#ifdef CONFIG_SERIAL_BFIN_UART0
45static struct resource bfin_uart0_resources[] = { 45static struct resource bfin_uart0_resources[] = {
46 { 46 {
@@ -199,7 +199,7 @@ static struct platform_device bfin_uart2_device = {
199#endif /* CONFIG_SERIAL_BFIN_UART2 */ 199#endif /* CONFIG_SERIAL_BFIN_UART2 */
200#endif /* CONFIG_SERIAL_BFIN */ 200#endif /* CONFIG_SERIAL_BFIN */
201 201
202#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 202#if IS_ENABLED(CONFIG_BFIN_SIR)
203#ifdef CONFIG_BFIN_SIR0 203#ifdef CONFIG_BFIN_SIR0
204static struct resource bfin_sir0_resources[] = { 204static struct resource bfin_sir0_resources[] = {
205 { 205 {
@@ -277,7 +277,7 @@ static struct platform_device bfin_sir2_device = {
277#endif /* CONFIG_BFIN_SIR2 */ 277#endif /* CONFIG_BFIN_SIR2 */
278#endif /* CONFIG_BFIN_SIR */ 278#endif /* CONFIG_BFIN_SIR */
279 279
280#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 280#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
281#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 281#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
282static struct resource bfin_sport0_uart_resources[] = { 282static struct resource bfin_sport0_uart_resources[] = {
283 { 283 {
@@ -416,7 +416,7 @@ static struct platform_device bfin_sport3_uart_device = {
416#endif /* CONFIG_SERIAL_BFIN_SPORT3_UART */ 416#endif /* CONFIG_SERIAL_BFIN_SPORT3_UART */
417#endif /* CONFIG_SERIAL_BFIN_SPORT */ 417#endif /* CONFIG_SERIAL_BFIN_SPORT */
418 418
419#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 419#if IS_ENABLED(CONFIG_CAN_BFIN)
420static unsigned short bfin_can_peripherals[] = { 420static unsigned short bfin_can_peripherals[] = {
421 P_CAN0_RX, P_CAN0_TX, 0 421 P_CAN0_RX, P_CAN0_TX, 0
422}; 422};
@@ -458,7 +458,7 @@ static struct platform_device bfin_can_device = {
458 * USB-LAN EzExtender board 458 * USB-LAN EzExtender board
459 * Driver needs to know address, irq and flag pin. 459 * Driver needs to know address, irq and flag pin.
460 */ 460 */
461#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 461#if IS_ENABLED(CONFIG_SMC91X)
462#include <linux/smc91x.h> 462#include <linux/smc91x.h>
463 463
464static struct smc91x_platdata smc91x_info = { 464static struct smc91x_platdata smc91x_info = {
@@ -490,10 +490,9 @@ static struct platform_device smc91x_device = {
490}; 490};
491#endif /* CONFIG_SMC91X */ 491#endif /* CONFIG_SMC91X */
492 492
493#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 493#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
494/* all SPI peripherals info goes here */ 494/* all SPI peripherals info goes here */
495#if defined(CONFIG_MTD_M25P80) \ 495#if IS_ENABLED(CONFIG_MTD_M25P80)
496 || defined(CONFIG_MTD_M25P80_MODULE)
497/* SPI flash chip (m25p16) */ 496/* SPI flash chip (m25p16) */
498static struct mtd_partition bfin_spi_flash_partitions[] = { 497static struct mtd_partition bfin_spi_flash_partitions[] = {
499 { 498 {
@@ -521,7 +520,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
521#endif /* CONFIG_MTD_M25P80 */ 520#endif /* CONFIG_MTD_M25P80 */
522#endif /* CONFIG_SPI_BFIN5XX */ 521#endif /* CONFIG_SPI_BFIN5XX */
523 522
524#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) 523#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
525#include <linux/spi/ad7879.h> 524#include <linux/spi/ad7879.h>
526static const struct ad7879_platform_data bfin_ad7879_ts_info = { 525static const struct ad7879_platform_data bfin_ad7879_ts_info = {
527 .model = 7879, /* Model = AD7879 */ 526 .model = 7879, /* Model = AD7879 */
@@ -538,7 +537,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
538}; 537};
539#endif /* CONFIG_TOUCHSCREEN_AD7879 */ 538#endif /* CONFIG_TOUCHSCREEN_AD7879 */
540 539
541#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 540#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
542#include <asm/bfin-lq035q1.h> 541#include <asm/bfin-lq035q1.h>
543 542
544static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { 543static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
@@ -568,8 +567,7 @@ static struct platform_device bfin_lq035q1_device = {
568#endif /* CONFIG_FB_BFIN_LQ035Q1 */ 567#endif /* CONFIG_FB_BFIN_LQ035Q1 */
569 568
570static struct spi_board_info bf538_spi_board_info[] __initdata = { 569static struct spi_board_info bf538_spi_board_info[] __initdata = {
571#if defined(CONFIG_MTD_M25P80) \ 570#if IS_ENABLED(CONFIG_MTD_M25P80)
572 || defined(CONFIG_MTD_M25P80_MODULE)
573 { 571 {
574 /* the modalias must be the same as spi device driver name */ 572 /* the modalias must be the same as spi device driver name */
575 .modalias = "m25p80", /* Name of spi_driver for this device */ 573 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -581,7 +579,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = {
581 .mode = SPI_MODE_3, 579 .mode = SPI_MODE_3,
582 }, 580 },
583#endif /* CONFIG_MTD_M25P80 */ 581#endif /* CONFIG_MTD_M25P80 */
584#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 582#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
585 { 583 {
586 .modalias = "ad7879", 584 .modalias = "ad7879",
587 .platform_data = &bfin_ad7879_ts_info, 585 .platform_data = &bfin_ad7879_ts_info,
@@ -592,7 +590,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = {
592 .mode = SPI_CPHA | SPI_CPOL, 590 .mode = SPI_CPHA | SPI_CPOL,
593 }, 591 },
594#endif /* CONFIG_TOUCHSCREEN_AD7879_SPI */ 592#endif /* CONFIG_TOUCHSCREEN_AD7879_SPI */
595#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 593#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
596 { 594 {
597 .modalias = "bfin-lq035q1-spi", 595 .modalias = "bfin-lq035q1-spi",
598 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 596 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -601,7 +599,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = {
601 .mode = SPI_CPHA | SPI_CPOL, 599 .mode = SPI_CPHA | SPI_CPOL,
602 }, 600 },
603#endif /* CONFIG_FB_BFIN_LQ035Q1 */ 601#endif /* CONFIG_FB_BFIN_LQ035Q1 */
604#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 602#if IS_ENABLED(CONFIG_SPI_SPIDEV)
605 { 603 {
606 .modalias = "spidev", 604 .modalias = "spidev",
607 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 605 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -717,7 +715,7 @@ static struct platform_device bf538_spi_master2 = {
717 }, 715 },
718}; 716};
719 717
720#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 718#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
721static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 719static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
722 720
723static struct resource bfin_twi0_resource[] = { 721static struct resource bfin_twi0_resource[] = {
@@ -766,7 +764,7 @@ static struct platform_device i2c_bfin_twi1_device = {
766}; 764};
767#endif /* CONFIG_I2C_BLACKFIN_TWI */ 765#endif /* CONFIG_I2C_BLACKFIN_TWI */
768 766
769#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 767#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
770#include <linux/gpio_keys.h> 768#include <linux/gpio_keys.h>
771 769
772static struct gpio_keys_button bfin_gpio_keys_table[] = { 770static struct gpio_keys_button bfin_gpio_keys_table[] = {
@@ -814,7 +812,7 @@ static struct platform_device bfin_dpmc = {
814 }, 812 },
815}; 813};
816 814
817#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 815#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
818static struct mtd_partition ezkit_partitions[] = { 816static struct mtd_partition ezkit_partitions[] = {
819 { 817 {
820 .name = "bootloader(nor)", 818 .name = "bootloader(nor)",
@@ -839,7 +837,7 @@ static struct physmap_flash_data ezkit_flash_data = {
839 837
840static struct resource ezkit_flash_resource = { 838static struct resource ezkit_flash_resource = {
841 .start = 0x20000000, 839 .start = 0x20000000,
842#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 840#if IS_ENABLED(CONFIG_SMC91X)
843 .end = 0x202fffff, 841 .end = 0x202fffff,
844#else 842#else
845 .end = 0x203fffff, 843 .end = 0x203fffff,
@@ -862,11 +860,11 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
862 860
863 &bfin_dpmc, 861 &bfin_dpmc,
864 862
865#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 863#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
866 &rtc_device, 864 &rtc_device,
867#endif 865#endif
868 866
869#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 867#if IS_ENABLED(CONFIG_SERIAL_BFIN)
870#ifdef CONFIG_SERIAL_BFIN_UART0 868#ifdef CONFIG_SERIAL_BFIN_UART0
871 &bfin_uart0_device, 869 &bfin_uart0_device,
872#endif 870#endif
@@ -878,18 +876,18 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
878#endif 876#endif
879#endif 877#endif
880 878
881#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 879#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
882 &bf538_spi_master0, 880 &bf538_spi_master0,
883 &bf538_spi_master1, 881 &bf538_spi_master1,
884 &bf538_spi_master2, 882 &bf538_spi_master2,
885#endif 883#endif
886 884
887#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 885#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
888 &i2c_bfin_twi0_device, 886 &i2c_bfin_twi0_device,
889 &i2c_bfin_twi1_device, 887 &i2c_bfin_twi1_device,
890#endif 888#endif
891 889
892#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 890#if IS_ENABLED(CONFIG_BFIN_SIR)
893#ifdef CONFIG_BFIN_SIR0 891#ifdef CONFIG_BFIN_SIR0
894 &bfin_sir0_device, 892 &bfin_sir0_device,
895#endif 893#endif
@@ -901,7 +899,7 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
901#endif 899#endif
902#endif 900#endif
903 901
904#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 902#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
905#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 903#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
906 &bfin_sport0_uart_device, 904 &bfin_sport0_uart_device,
907#endif 905#endif
@@ -916,23 +914,23 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
916#endif 914#endif
917#endif 915#endif
918 916
919#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 917#if IS_ENABLED(CONFIG_CAN_BFIN)
920 &bfin_can_device, 918 &bfin_can_device,
921#endif 919#endif
922 920
923#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 921#if IS_ENABLED(CONFIG_SMC91X)
924 &smc91x_device, 922 &smc91x_device,
925#endif 923#endif
926 924
927#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 925#if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
928 &bfin_lq035q1_device, 926 &bfin_lq035q1_device,
929#endif 927#endif
930 928
931#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 929#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
932 &bfin_device_gpiokeys, 930 &bfin_device_gpiokeys,
933#endif 931#endif
934 932
935#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 933#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
936 &ezkit_flash_device, 934 &ezkit_flash_device,
937#endif 935#endif
938}; 936};
@@ -942,7 +940,7 @@ static int __init ezkit_init(void)
942 printk(KERN_INFO "%s(): registering device resources\n", __func__); 940 printk(KERN_INFO "%s(): registering device resources\n", __func__);
943 platform_add_devices(cm_bf538_devices, ARRAY_SIZE(cm_bf538_devices)); 941 platform_add_devices(cm_bf538_devices, ARRAY_SIZE(cm_bf538_devices));
944 942
945#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 943#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
946 spi_register_board_info(bf538_spi_board_info, 944 spi_register_board_info(bf538_spi_board_info,
947 ARRAY_SIZE(bf538_spi_board_info)); 945 ARRAY_SIZE(bf538_spi_board_info));
948#endif 946#endif
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index e92543362f35..6d5ffdead067 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -37,7 +37,7 @@ const char bfin_board_name[] = "Bluetechnix CM-BF548";
37 * Driver needs to know address, irq and flag pin. 37 * Driver needs to know address, irq and flag pin.
38 */ 38 */
39 39
40#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 40#if IS_ENABLED(CONFIG_FB_BF54X_LQ043)
41 41
42#include <mach/bf54x-lq043.h> 42#include <mach/bf54x-lq043.h>
43 43
@@ -69,7 +69,7 @@ static struct platform_device bf54x_lq043_device = {
69}; 69};
70#endif 70#endif
71 71
72#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) 72#if IS_ENABLED(CONFIG_KEYBOARD_BFIN)
73static unsigned int bf548_keymap[] = { 73static unsigned int bf548_keymap[] = {
74 KEYVAL(0, 0, KEY_ENTER), 74 KEYVAL(0, 0, KEY_ENTER),
75 KEYVAL(0, 1, KEY_HELP), 75 KEYVAL(0, 1, KEY_HELP),
@@ -119,14 +119,14 @@ static struct platform_device bf54x_kpad_device = {
119}; 119};
120#endif 120#endif
121 121
122#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 122#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
123static struct platform_device rtc_device = { 123static struct platform_device rtc_device = {
124 .name = "rtc-bfin", 124 .name = "rtc-bfin",
125 .id = -1, 125 .id = -1,
126}; 126};
127#endif 127#endif
128 128
129#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 129#if IS_ENABLED(CONFIG_SERIAL_BFIN)
130#ifdef CONFIG_SERIAL_BFIN_UART0 130#ifdef CONFIG_SERIAL_BFIN_UART0
131static struct resource bfin_uart0_resources[] = { 131static struct resource bfin_uart0_resources[] = {
132 { 132 {
@@ -353,7 +353,7 @@ static struct platform_device bfin_uart3_device = {
353#endif 353#endif
354#endif 354#endif
355 355
356#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 356#if IS_ENABLED(CONFIG_BFIN_SIR)
357#ifdef CONFIG_BFIN_SIR0 357#ifdef CONFIG_BFIN_SIR0
358static struct resource bfin_sir0_resources[] = { 358static struct resource bfin_sir0_resources[] = {
359 { 359 {
@@ -456,7 +456,7 @@ static struct platform_device bfin_sir3_device = {
456#endif 456#endif
457#endif 457#endif
458 458
459#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 459#if IS_ENABLED(CONFIG_SMSC911X)
460#include <linux/smsc911x.h> 460#include <linux/smsc911x.h>
461 461
462static struct resource smsc911x_resources[] = { 462static struct resource smsc911x_resources[] = {
@@ -491,7 +491,7 @@ static struct platform_device smsc911x_device = {
491}; 491};
492#endif 492#endif
493 493
494#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 494#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
495static struct resource musb_resources[] = { 495static struct resource musb_resources[] = {
496 [0] = { 496 [0] = {
497 .start = 0xFFC03C00, 497 .start = 0xFFC03C00,
@@ -553,7 +553,7 @@ static struct platform_device musb_device = {
553}; 553};
554#endif 554#endif
555 555
556#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 556#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
557#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 557#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
558static struct resource bfin_sport0_uart_resources[] = { 558static struct resource bfin_sport0_uart_resources[] = {
559 { 559 {
@@ -692,7 +692,7 @@ static struct platform_device bfin_sport3_uart_device = {
692#endif 692#endif
693#endif 693#endif
694 694
695#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 695#if IS_ENABLED(CONFIG_PATA_BF54X)
696static struct resource bfin_atapi_resources[] = { 696static struct resource bfin_atapi_resources[] = {
697 { 697 {
698 .start = 0xFFC03800, 698 .start = 0xFFC03800,
@@ -714,7 +714,7 @@ static struct platform_device bfin_atapi_device = {
714}; 714};
715#endif 715#endif
716 716
717#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 717#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
718static struct mtd_partition partition_info[] = { 718static struct mtd_partition partition_info[] = {
719 { 719 {
720 .name = "linux kernel(nand)", 720 .name = "linux kernel(nand)",
@@ -760,7 +760,7 @@ static struct platform_device bf5xx_nand_device = {
760}; 760};
761#endif 761#endif
762 762
763#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 763#if IS_ENABLED(CONFIG_SDH_BFIN)
764static struct bfin_sd_host bfin_sdh_data = { 764static struct bfin_sd_host bfin_sdh_data = {
765 .dma_chan = CH_SDH, 765 .dma_chan = CH_SDH,
766 .irq_int0 = IRQ_SDH_MASK0, 766 .irq_int0 = IRQ_SDH_MASK0,
@@ -776,7 +776,7 @@ static struct platform_device bf54x_sdh_device = {
776}; 776};
777#endif 777#endif
778 778
779#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 779#if IS_ENABLED(CONFIG_CAN_BFIN)
780static unsigned short bfin_can_peripherals[] = { 780static unsigned short bfin_can_peripherals[] = {
781 P_CAN0_RX, P_CAN0_TX, 0 781 P_CAN0_RX, P_CAN0_TX, 0
782}; 782};
@@ -814,7 +814,7 @@ static struct platform_device bfin_can_device = {
814}; 814};
815#endif 815#endif
816 816
817#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 817#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
818static struct mtd_partition para_partitions[] = { 818static struct mtd_partition para_partitions[] = {
819 { 819 {
820 .name = "bootloader(nor)", 820 .name = "bootloader(nor)",
@@ -854,10 +854,9 @@ static struct platform_device para_flash_device = {
854}; 854};
855#endif 855#endif
856 856
857#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 857#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
858/* all SPI peripherals info goes here */ 858/* all SPI peripherals info goes here */
859#if defined(CONFIG_MTD_M25P80) \ 859#if IS_ENABLED(CONFIG_MTD_M25P80)
860 || defined(CONFIG_MTD_M25P80_MODULE)
861/* SPI flash chip (m25p16) */ 860/* SPI flash chip (m25p16) */
862static struct mtd_partition bfin_spi_flash_partitions[] = { 861static struct mtd_partition bfin_spi_flash_partitions[] = {
863 { 862 {
@@ -884,7 +883,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
884}; 883};
885#endif 884#endif
886 885
887#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 886#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
888static const struct ad7877_platform_data bfin_ad7877_ts_info = { 887static const struct ad7877_platform_data bfin_ad7877_ts_info = {
889 .model = 7877, 888 .model = 7877,
890 .vref_delay_usecs = 50, /* internal, no capacitor */ 889 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -901,8 +900,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
901#endif 900#endif
902 901
903static struct spi_board_info bf54x_spi_board_info[] __initdata = { 902static struct spi_board_info bf54x_spi_board_info[] __initdata = {
904#if defined(CONFIG_MTD_M25P80) \ 903#if IS_ENABLED(CONFIG_MTD_M25P80)
905 || defined(CONFIG_MTD_M25P80_MODULE)
906 { 904 {
907 /* the modalias must be the same as spi device driver name */ 905 /* the modalias must be the same as spi device driver name */
908 .modalias = "m25p80", /* Name of spi_driver for this device */ 906 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -914,7 +912,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = {
914 .mode = SPI_MODE_3, 912 .mode = SPI_MODE_3,
915 }, 913 },
916#endif 914#endif
917#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 915#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
918{ 916{
919 .modalias = "ad7877", 917 .modalias = "ad7877",
920 .platform_data = &bfin_ad7877_ts_info, 918 .platform_data = &bfin_ad7877_ts_info,
@@ -924,7 +922,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = {
924 .chip_select = 2, 922 .chip_select = 2,
925}, 923},
926#endif 924#endif
927#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 925#if IS_ENABLED(CONFIG_SPI_SPIDEV)
928 { 926 {
929 .modalias = "spidev", 927 .modalias = "spidev",
930 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 928 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -1006,7 +1004,7 @@ static struct platform_device bf54x_spi_master1 = {
1006}; 1004};
1007#endif /* spi master and devices */ 1005#endif /* spi master and devices */
1008 1006
1009#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1007#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
1010static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1008static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
1011 1009
1012static struct resource bfin_twi0_resource[] = { 1010static struct resource bfin_twi0_resource[] = {
@@ -1060,7 +1058,7 @@ static struct platform_device i2c_bfin_twi1_device = {
1060#endif 1058#endif
1061#endif 1059#endif
1062 1060
1063#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1061#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
1064#include <linux/gpio_keys.h> 1062#include <linux/gpio_keys.h>
1065 1063
1066static struct gpio_keys_button bfin_gpio_keys_table[] = { 1064static struct gpio_keys_button bfin_gpio_keys_table[] = {
@@ -1112,11 +1110,11 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
1112 1110
1113 &bfin_dpmc, 1111 &bfin_dpmc,
1114 1112
1115#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 1113#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
1116 &rtc_device, 1114 &rtc_device,
1117#endif 1115#endif
1118 1116
1119#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1117#if IS_ENABLED(CONFIG_SERIAL_BFIN)
1120#ifdef CONFIG_SERIAL_BFIN_UART0 1118#ifdef CONFIG_SERIAL_BFIN_UART0
1121 &bfin_uart0_device, 1119 &bfin_uart0_device,
1122#endif 1120#endif
@@ -1131,7 +1129,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
1131#endif 1129#endif
1132#endif 1130#endif
1133 1131
1134#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1132#if IS_ENABLED(CONFIG_BFIN_SIR)
1135#ifdef CONFIG_BFIN_SIR0 1133#ifdef CONFIG_BFIN_SIR0
1136 &bfin_sir0_device, 1134 &bfin_sir0_device,
1137#endif 1135#endif
@@ -1146,19 +1144,19 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
1146#endif 1144#endif
1147#endif 1145#endif
1148 1146
1149#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 1147#if IS_ENABLED(CONFIG_FB_BF54X_LQ043)
1150 &bf54x_lq043_device, 1148 &bf54x_lq043_device,
1151#endif 1149#endif
1152 1150
1153#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 1151#if IS_ENABLED(CONFIG_SMSC911X)
1154 &smsc911x_device, 1152 &smsc911x_device,
1155#endif 1153#endif
1156 1154
1157#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 1155#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
1158 &musb_device, 1156 &musb_device,
1159#endif 1157#endif
1160 1158
1161#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1159#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
1162#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1160#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1163 &bfin_sport0_uart_device, 1161 &bfin_sport0_uart_device,
1164#endif 1162#endif
@@ -1173,43 +1171,43 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
1173#endif 1171#endif
1174#endif 1172#endif
1175 1173
1176#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 1174#if IS_ENABLED(CONFIG_PATA_BF54X)
1177 &bfin_atapi_device, 1175 &bfin_atapi_device,
1178#endif 1176#endif
1179 1177
1180#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 1178#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
1181 &bf5xx_nand_device, 1179 &bf5xx_nand_device,
1182#endif 1180#endif
1183 1181
1184#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 1182#if IS_ENABLED(CONFIG_SDH_BFIN)
1185 &bf54x_sdh_device, 1183 &bf54x_sdh_device,
1186#endif 1184#endif
1187 1185
1188#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1186#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
1189 &bf54x_spi_master0, 1187 &bf54x_spi_master0,
1190 &bf54x_spi_master1, 1188 &bf54x_spi_master1,
1191#endif 1189#endif
1192 1190
1193#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) 1191#if IS_ENABLED(CONFIG_KEYBOARD_BFIN)
1194 &bf54x_kpad_device, 1192 &bf54x_kpad_device,
1195#endif 1193#endif
1196 1194
1197#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1195#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
1198 &i2c_bfin_twi0_device, 1196 &i2c_bfin_twi0_device,
1199#if !defined(CONFIG_BF542) 1197#if !defined(CONFIG_BF542)
1200 &i2c_bfin_twi1_device, 1198 &i2c_bfin_twi1_device,
1201#endif 1199#endif
1202#endif 1200#endif
1203 1201
1204#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1202#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
1205 &bfin_device_gpiokeys, 1203 &bfin_device_gpiokeys,
1206#endif 1204#endif
1207 1205
1208#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1206#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
1209 &para_flash_device, 1207 &para_flash_device,
1210#endif 1208#endif
1211 1209
1212#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 1210#if IS_ENABLED(CONFIG_CAN_BFIN)
1213 &bfin_can_device, 1211 &bfin_can_device,
1214#endif 1212#endif
1215 1213
@@ -1220,7 +1218,7 @@ static int __init cm_bf548_init(void)
1220 printk(KERN_INFO "%s(): registering device resources\n", __func__); 1218 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1221 platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); 1219 platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices));
1222 1220
1223#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1221#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
1224 spi_register_board_info(bf54x_spi_board_info, 1222 spi_register_board_info(bf54x_spi_board_info,
1225 ARRAY_SIZE(bf54x_spi_board_info)); 1223 ARRAY_SIZE(bf54x_spi_board_info));
1226#endif 1224#endif
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index d495000b81a0..90138e6112c1 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -41,7 +41,7 @@ const char bfin_board_name[] = "ADI BF548-EZKIT";
41 * Driver needs to know address, irq and flag pin. 41 * Driver needs to know address, irq and flag pin.
42 */ 42 */
43 43
44#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 44#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
45#include <linux/usb/isp1760.h> 45#include <linux/usb/isp1760.h>
46static struct resource bfin_isp1760_resources[] = { 46static struct resource bfin_isp1760_resources[] = {
47 [0] = { 47 [0] = {
@@ -76,7 +76,7 @@ static struct platform_device bfin_isp1760_device = {
76}; 76};
77#endif 77#endif
78 78
79#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 79#if IS_ENABLED(CONFIG_FB_BF54X_LQ043)
80 80
81#include <mach/bf54x-lq043.h> 81#include <mach/bf54x-lq043.h>
82 82
@@ -108,7 +108,7 @@ static struct platform_device bf54x_lq043_device = {
108}; 108};
109#endif 109#endif
110 110
111#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) 111#if IS_ENABLED(CONFIG_KEYBOARD_BFIN)
112static const unsigned int bf548_keymap[] = { 112static const unsigned int bf548_keymap[] = {
113 KEYVAL(0, 0, KEY_ENTER), 113 KEYVAL(0, 0, KEY_ENTER),
114 KEYVAL(0, 1, KEY_HELP), 114 KEYVAL(0, 1, KEY_HELP),
@@ -158,7 +158,7 @@ static struct platform_device bf54x_kpad_device = {
158}; 158};
159#endif 159#endif
160 160
161#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 161#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
162#include <asm/bfin_rotary.h> 162#include <asm/bfin_rotary.h>
163 163
164static struct bfin_rotary_platform_data bfin_rotary_data = { 164static struct bfin_rotary_platform_data bfin_rotary_data = {
@@ -190,7 +190,7 @@ static struct platform_device bfin_rotary_device = {
190}; 190};
191#endif 191#endif
192 192
193#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 193#if IS_ENABLED(CONFIG_INPUT_ADXL34X)
194#include <linux/input/adxl34x.h> 194#include <linux/input/adxl34x.h>
195static const struct adxl34x_platform_data adxl34x_info = { 195static const struct adxl34x_platform_data adxl34x_info = {
196 .x_axis_offset = 0, 196 .x_axis_offset = 0,
@@ -229,14 +229,14 @@ static const struct adxl34x_platform_data adxl34x_info = {
229}; 229};
230#endif 230#endif
231 231
232#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 232#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
233static struct platform_device rtc_device = { 233static struct platform_device rtc_device = {
234 .name = "rtc-bfin", 234 .name = "rtc-bfin",
235 .id = -1, 235 .id = -1,
236}; 236};
237#endif 237#endif
238 238
239#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 239#if IS_ENABLED(CONFIG_SERIAL_BFIN)
240#ifdef CONFIG_SERIAL_BFIN_UART0 240#ifdef CONFIG_SERIAL_BFIN_UART0
241static struct resource bfin_uart0_resources[] = { 241static struct resource bfin_uart0_resources[] = {
242 { 242 {
@@ -491,7 +491,7 @@ static struct platform_device bfin_uart3_device = {
491#endif 491#endif
492#endif 492#endif
493 493
494#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 494#if IS_ENABLED(CONFIG_BFIN_SIR)
495#ifdef CONFIG_BFIN_SIR0 495#ifdef CONFIG_BFIN_SIR0
496static struct resource bfin_sir0_resources[] = { 496static struct resource bfin_sir0_resources[] = {
497 { 497 {
@@ -594,7 +594,7 @@ static struct platform_device bfin_sir3_device = {
594#endif 594#endif
595#endif 595#endif
596 596
597#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 597#if IS_ENABLED(CONFIG_SMSC911X)
598#include <linux/smsc911x.h> 598#include <linux/smsc911x.h>
599 599
600static struct resource smsc911x_resources[] = { 600static struct resource smsc911x_resources[] = {
@@ -629,7 +629,7 @@ static struct platform_device smsc911x_device = {
629}; 629};
630#endif 630#endif
631 631
632#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 632#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
633static struct resource musb_resources[] = { 633static struct resource musb_resources[] = {
634 [0] = { 634 [0] = {
635 .start = 0xFFC03C00, 635 .start = 0xFFC03C00,
@@ -691,7 +691,7 @@ static struct platform_device musb_device = {
691}; 691};
692#endif 692#endif
693 693
694#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 694#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
695#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 695#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
696static struct resource bfin_sport0_uart_resources[] = { 696static struct resource bfin_sport0_uart_resources[] = {
697 { 697 {
@@ -830,7 +830,7 @@ static struct platform_device bfin_sport3_uart_device = {
830#endif 830#endif
831#endif 831#endif
832 832
833#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 833#if IS_ENABLED(CONFIG_CAN_BFIN)
834 834
835static unsigned short bfin_can0_peripherals[] = { 835static unsigned short bfin_can0_peripherals[] = {
836 P_CAN0_RX, P_CAN0_TX, 0 836 P_CAN0_RX, P_CAN0_TX, 0
@@ -908,7 +908,7 @@ static struct platform_device bfin_can1_device = {
908 908
909#endif 909#endif
910 910
911#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 911#if IS_ENABLED(CONFIG_PATA_BF54X)
912static struct resource bfin_atapi_resources[] = { 912static struct resource bfin_atapi_resources[] = {
913 { 913 {
914 .start = 0xFFC03800, 914 .start = 0xFFC03800,
@@ -930,7 +930,7 @@ static struct platform_device bfin_atapi_device = {
930}; 930};
931#endif 931#endif
932 932
933#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 933#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
934static struct mtd_partition partition_info[] = { 934static struct mtd_partition partition_info[] = {
935 { 935 {
936 .name = "bootloader(nand)", 936 .name = "bootloader(nand)",
@@ -980,7 +980,7 @@ static struct platform_device bf5xx_nand_device = {
980}; 980};
981#endif 981#endif
982 982
983#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 983#if IS_ENABLED(CONFIG_SDH_BFIN)
984 984
985static struct bfin_sd_host bfin_sdh_data = { 985static struct bfin_sd_host bfin_sdh_data = {
986 .dma_chan = CH_SDH, 986 .dma_chan = CH_SDH,
@@ -997,7 +997,7 @@ static struct platform_device bf54x_sdh_device = {
997}; 997};
998#endif 998#endif
999 999
1000#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1000#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
1001static struct mtd_partition ezkit_partitions[] = { 1001static struct mtd_partition ezkit_partitions[] = {
1002 { 1002 {
1003 .name = "bootloader(nor)", 1003 .name = "bootloader(nor)",
@@ -1045,8 +1045,7 @@ static struct platform_device ezkit_flash_device = {
1045}; 1045};
1046#endif 1046#endif
1047 1047
1048#if defined(CONFIG_MTD_M25P80) \ 1048#if IS_ENABLED(CONFIG_MTD_M25P80)
1049 || defined(CONFIG_MTD_M25P80_MODULE)
1050/* SPI flash chip (m25p16) */ 1049/* SPI flash chip (m25p16) */
1051static struct mtd_partition bfin_spi_flash_partitions[] = { 1050static struct mtd_partition bfin_spi_flash_partitions[] = {
1052 { 1051 {
@@ -1073,7 +1072,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
1073}; 1072};
1074#endif 1073#endif
1075 1074
1076#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1075#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
1077static const struct ad7877_platform_data bfin_ad7877_ts_info = { 1076static const struct ad7877_platform_data bfin_ad7877_ts_info = {
1078 .model = 7877, 1077 .model = 7877,
1079 .vref_delay_usecs = 50, /* internal, no capacitor */ 1078 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -1495,8 +1494,7 @@ static struct platform_device bfin_gpj_device = {
1495#endif 1494#endif
1496 1495
1497static struct spi_board_info bfin_spi_board_info[] __initdata = { 1496static struct spi_board_info bfin_spi_board_info[] __initdata = {
1498#if defined(CONFIG_MTD_M25P80) \ 1497#if IS_ENABLED(CONFIG_MTD_M25P80)
1499 || defined(CONFIG_MTD_M25P80_MODULE)
1500 { 1498 {
1501 /* the modalias must be the same as spi device driver name */ 1499 /* the modalias must be the same as spi device driver name */
1502 .modalias = "m25p80", /* Name of spi_driver for this device */ 1500 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -1508,8 +1506,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1508 .mode = SPI_MODE_3, 1506 .mode = SPI_MODE_3,
1509 }, 1507 },
1510#endif 1508#endif
1511#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 1509#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
1512 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
1513 { 1510 {
1514 .modalias = "ad183x", 1511 .modalias = "ad183x",
1515 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1512 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -1517,7 +1514,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1517 .chip_select = MAX_CTRL_CS + GPIO_PG6, /* SPI_SSEL2 */ 1514 .chip_select = MAX_CTRL_CS + GPIO_PG6, /* SPI_SSEL2 */
1518 }, 1515 },
1519#endif 1516#endif
1520#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1517#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
1521 { 1518 {
1522 .modalias = "ad7877", 1519 .modalias = "ad7877",
1523 .platform_data = &bfin_ad7877_ts_info, 1520 .platform_data = &bfin_ad7877_ts_info,
@@ -1527,7 +1524,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1527 .chip_select = MAX_CTRL_CS + GPIO_PE5, /* SPI_SSEL2 */ 1524 .chip_select = MAX_CTRL_CS + GPIO_PE5, /* SPI_SSEL2 */
1528 }, 1525 },
1529#endif 1526#endif
1530#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 1527#if IS_ENABLED(CONFIG_SPI_SPIDEV)
1531 { 1528 {
1532 .modalias = "spidev", 1529 .modalias = "spidev",
1533 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1530 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -1535,7 +1532,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1535 .chip_select = MAX_CTRL_CS + GPIO_PE4, /* SPI_SSEL1 */ 1532 .chip_select = MAX_CTRL_CS + GPIO_PE4, /* SPI_SSEL1 */
1536 }, 1533 },
1537#endif 1534#endif
1538#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) 1535#if IS_ENABLED(CONFIG_INPUT_ADXL34X_SPI)
1539 { 1536 {
1540 .modalias = "adxl34x", 1537 .modalias = "adxl34x",
1541 .platform_data = &adxl34x_info, 1538 .platform_data = &adxl34x_info,
@@ -1547,7 +1544,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1547 }, 1544 },
1548#endif 1545#endif
1549}; 1546};
1550#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 1547#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
1551/* SPI (0) */ 1548/* SPI (0) */
1552static struct resource bfin_spi0_resource[] = { 1549static struct resource bfin_spi0_resource[] = {
1553 [0] = { 1550 [0] = {
@@ -1620,8 +1617,7 @@ static struct platform_device bf54x_spi_master1 = {
1620}; 1617};
1621#endif /* spi master and devices */ 1618#endif /* spi master and devices */
1622 1619
1623#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 1620#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
1624 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
1625#include <linux/videodev2.h> 1621#include <linux/videodev2.h>
1626#include <media/blackfin/bfin_capture.h> 1622#include <media/blackfin/bfin_capture.h>
1627#include <media/blackfin/ppi.h> 1623#include <media/blackfin/ppi.h>
@@ -1641,8 +1637,7 @@ static const struct ppi_info ppi_info = {
1641 .pin_req = ppi_req, 1637 .pin_req = ppi_req,
1642}; 1638};
1643 1639
1644#if defined(CONFIG_VIDEO_VS6624) \ 1640#if IS_ENABLED(CONFIG_VIDEO_VS6624)
1645 || defined(CONFIG_VIDEO_VS6624_MODULE)
1646static struct v4l2_input vs6624_inputs[] = { 1641static struct v4l2_input vs6624_inputs[] = {
1647 { 1642 {
1648 .index = 0, 1643 .index = 0,
@@ -1687,7 +1682,7 @@ static struct platform_device bfin_capture_device = {
1687}; 1682};
1688#endif 1683#endif
1689 1684
1690#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1685#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
1691static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1686static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
1692 1687
1693static struct resource bfin_twi0_resource[] = { 1688static struct resource bfin_twi0_resource[] = {
@@ -1742,7 +1737,7 @@ static struct platform_device i2c_bfin_twi1_device = {
1742#endif 1737#endif
1743 1738
1744static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { 1739static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
1745#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 1740#if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
1746 { 1741 {
1747 I2C_BOARD_INFO("ssm2602", 0x1b), 1742 I2C_BOARD_INFO("ssm2602", 0x1b),
1748 }, 1743 },
@@ -1751,25 +1746,25 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
1751 1746
1752#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ 1747#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
1753static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { 1748static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
1754#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 1749#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
1755 { 1750 {
1756 I2C_BOARD_INFO("pcf8574_lcd", 0x22), 1751 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
1757 }, 1752 },
1758#endif 1753#endif
1759#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) 1754#if IS_ENABLED(CONFIG_INPUT_PCF8574)
1760 { 1755 {
1761 I2C_BOARD_INFO("pcf8574_keypad", 0x27), 1756 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
1762 .irq = 212, 1757 .irq = 212,
1763 }, 1758 },
1764#endif 1759#endif
1765#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) 1760#if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
1766 { 1761 {
1767 I2C_BOARD_INFO("adxl34x", 0x53), 1762 I2C_BOARD_INFO("adxl34x", 0x53),
1768 .irq = IRQ_PC5, 1763 .irq = IRQ_PC5,
1769 .platform_data = (void *)&adxl34x_info, 1764 .platform_data = (void *)&adxl34x_info,
1770 }, 1765 },
1771#endif 1766#endif
1772#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) 1767#if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
1773 { 1768 {
1774 I2C_BOARD_INFO("ad5252", 0x2f), 1769 I2C_BOARD_INFO("ad5252", 0x2f),
1775 }, 1770 },
@@ -1777,7 +1772,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
1777}; 1772};
1778#endif 1773#endif
1779 1774
1780#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1775#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
1781#include <linux/gpio_keys.h> 1776#include <linux/gpio_keys.h>
1782 1777
1783static struct gpio_keys_button bfin_gpio_keys_table[] = { 1778static struct gpio_keys_button bfin_gpio_keys_table[] = {
@@ -1828,8 +1823,8 @@ static struct platform_device bfin_dpmc = {
1828 }, 1823 },
1829}; 1824};
1830 1825
1831#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ 1826#if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \
1832 defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 1827 IS_ENABLED(CONFIG_SND_BF5XX_AC97)
1833 1828
1834#define SPORT_REQ(x) \ 1829#define SPORT_REQ(x) \
1835 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ 1830 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
@@ -1889,35 +1884,35 @@ static struct resource bfin_snd_resources[][4] = {
1889}; 1884};
1890#endif 1885#endif
1891 1886
1892#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1887#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
1893static struct platform_device bfin_i2s_pcm = { 1888static struct platform_device bfin_i2s_pcm = {
1894 .name = "bfin-i2s-pcm-audio", 1889 .name = "bfin-i2s-pcm-audio",
1895 .id = -1, 1890 .id = -1,
1896}; 1891};
1897#endif 1892#endif
1898 1893
1899#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 1894#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
1900static struct platform_device bfin_ac97_pcm = { 1895static struct platform_device bfin_ac97_pcm = {
1901 .name = "bfin-ac97-pcm-audio", 1896 .name = "bfin-ac97-pcm-audio",
1902 .id = -1, 1897 .id = -1,
1903}; 1898};
1904#endif 1899#endif
1905 1900
1906#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 1901#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
1907static struct platform_device bfin_ad73311_codec_device = { 1902static struct platform_device bfin_ad73311_codec_device = {
1908 .name = "ad73311", 1903 .name = "ad73311",
1909 .id = -1, 1904 .id = -1,
1910}; 1905};
1911#endif 1906#endif
1912 1907
1913#if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE) 1908#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1980)
1914static struct platform_device bfin_ad1980_codec_device = { 1909static struct platform_device bfin_ad1980_codec_device = {
1915 .name = "ad1980", 1910 .name = "ad1980",
1916 .id = -1, 1911 .id = -1,
1917}; 1912};
1918#endif 1913#endif
1919 1914
1920#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) 1915#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
1921static struct platform_device bfin_i2s = { 1916static struct platform_device bfin_i2s = {
1922 .name = "bfin-i2s", 1917 .name = "bfin-i2s",
1923 .id = CONFIG_SND_BF5XX_SPORT_NUM, 1918 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -1929,7 +1924,7 @@ static struct platform_device bfin_i2s = {
1929}; 1924};
1930#endif 1925#endif
1931 1926
1932#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) 1927#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
1933static struct platform_device bfin_ac97 = { 1928static struct platform_device bfin_ac97 = {
1934 .name = "bfin-ac97", 1929 .name = "bfin-ac97",
1935 .id = CONFIG_SND_BF5XX_SPORT_NUM, 1930 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -1962,11 +1957,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
1962 &bfin_gpj_device, 1957 &bfin_gpj_device,
1963#endif 1958#endif
1964 1959
1965#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 1960#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
1966 &rtc_device, 1961 &rtc_device,
1967#endif 1962#endif
1968 1963
1969#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1964#if IS_ENABLED(CONFIG_SERIAL_BFIN)
1970#ifdef CONFIG_SERIAL_BFIN_UART0 1965#ifdef CONFIG_SERIAL_BFIN_UART0
1971 &bfin_uart0_device, 1966 &bfin_uart0_device,
1972#endif 1967#endif
@@ -1981,7 +1976,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
1981#endif 1976#endif
1982#endif 1977#endif
1983 1978
1984#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1979#if IS_ENABLED(CONFIG_BFIN_SIR)
1985#ifdef CONFIG_BFIN_SIR0 1980#ifdef CONFIG_BFIN_SIR0
1986 &bfin_sir0_device, 1981 &bfin_sir0_device,
1987#endif 1982#endif
@@ -1996,23 +1991,23 @@ static struct platform_device *ezkit_devices[] __initdata = {
1996#endif 1991#endif
1997#endif 1992#endif
1998 1993
1999#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 1994#if IS_ENABLED(CONFIG_FB_BF54X_LQ043)
2000 &bf54x_lq043_device, 1995 &bf54x_lq043_device,
2001#endif 1996#endif
2002 1997
2003#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 1998#if IS_ENABLED(CONFIG_SMSC911X)
2004 &smsc911x_device, 1999 &smsc911x_device,
2005#endif 2000#endif
2006 2001
2007#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 2002#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
2008 &musb_device, 2003 &musb_device,
2009#endif 2004#endif
2010 2005
2011#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 2006#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
2012 &bfin_isp1760_device, 2007 &bfin_isp1760_device,
2013#endif 2008#endif
2014 2009
2015#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 2010#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
2016#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 2011#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
2017 &bfin_sport0_uart_device, 2012 &bfin_sport0_uart_device,
2018#endif 2013#endif
@@ -2027,72 +2022,71 @@ static struct platform_device *ezkit_devices[] __initdata = {
2027#endif 2022#endif
2028#endif 2023#endif
2029 2024
2030#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 2025#if IS_ENABLED(CONFIG_CAN_BFIN)
2031 &bfin_can0_device, 2026 &bfin_can0_device,
2032 &bfin_can1_device, 2027 &bfin_can1_device,
2033#endif 2028#endif
2034 2029
2035#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 2030#if IS_ENABLED(CONFIG_PATA_BF54X)
2036 &bfin_atapi_device, 2031 &bfin_atapi_device,
2037#endif 2032#endif
2038 2033
2039#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 2034#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
2040 &bf5xx_nand_device, 2035 &bf5xx_nand_device,
2041#endif 2036#endif
2042 2037
2043#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 2038#if IS_ENABLED(CONFIG_SDH_BFIN)
2044 &bf54x_sdh_device, 2039 &bf54x_sdh_device,
2045#endif 2040#endif
2046 2041
2047#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 2042#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
2048 &bf54x_spi_master0, 2043 &bf54x_spi_master0,
2049 &bf54x_spi_master1, 2044 &bf54x_spi_master1,
2050#endif 2045#endif
2051#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 2046#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
2052 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
2053 &bfin_capture_device, 2047 &bfin_capture_device,
2054#endif 2048#endif
2055 2049
2056#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) 2050#if IS_ENABLED(CONFIG_KEYBOARD_BFIN)
2057 &bf54x_kpad_device, 2051 &bf54x_kpad_device,
2058#endif 2052#endif
2059 2053
2060#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 2054#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
2061 &bfin_rotary_device, 2055 &bfin_rotary_device,
2062#endif 2056#endif
2063 2057
2064#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 2058#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
2065 &i2c_bfin_twi0_device, 2059 &i2c_bfin_twi0_device,
2066#if !defined(CONFIG_BF542) 2060#if !defined(CONFIG_BF542)
2067 &i2c_bfin_twi1_device, 2061 &i2c_bfin_twi1_device,
2068#endif 2062#endif
2069#endif 2063#endif
2070 2064
2071#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 2065#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
2072 &bfin_device_gpiokeys, 2066 &bfin_device_gpiokeys,
2073#endif 2067#endif
2074 2068
2075#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 2069#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
2076 &ezkit_flash_device, 2070 &ezkit_flash_device,
2077#endif 2071#endif
2078 2072
2079#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2073#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
2080 &bfin_i2s_pcm, 2074 &bfin_i2s_pcm,
2081#endif 2075#endif
2082 2076
2083#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2077#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
2084 &bfin_ac97_pcm, 2078 &bfin_ac97_pcm,
2085#endif 2079#endif
2086 2080
2087#if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE) 2081#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1980)
2088 &bfin_ad1980_codec_device, 2082 &bfin_ad1980_codec_device,
2089#endif 2083#endif
2090 2084
2091#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2085#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
2092 &bfin_i2s, 2086 &bfin_i2s,
2093#endif 2087#endif
2094 2088
2095#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2089#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
2096 &bfin_ac97, 2090 &bfin_ac97,
2097#endif 2091#endif
2098}; 2092};
diff --git a/arch/blackfin/mach-bf548/include/mach/defBF544.h b/arch/blackfin/mach-bf548/include/mach/defBF544.h
index 329b2c58228b..018ebfc27f5a 100644
--- a/arch/blackfin/mach-bf548/include/mach/defBF544.h
+++ b/arch/blackfin/mach-bf548/include/mach/defBF544.h
@@ -601,36 +601,6 @@
601#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */ 601#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */
602#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */ 602#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */
603 603
604/* Bit masks for HOST_CONTROL */
605
606#define HOST_EN 0x1 /* Host Enable */
607#define HOST_END 0x2 /* Host Endianess */
608#define DATA_SIZE 0x4 /* Data Size */
609#define HOST_RST 0x8 /* Host Reset */
610#define HRDY_OVR 0x20 /* Host Ready Override */
611#define INT_MODE 0x40 /* Interrupt Mode */
612#define BT_EN 0x80 /* Bus Timeout Enable */
613#define EHW 0x100 /* Enable Host Write */
614#define EHR 0x200 /* Enable Host Read */
615#define BDR 0x400 /* Burst DMA Requests */
616
617/* Bit masks for HOST_STATUS */
618
619#define DMA_READY 0x1 /* DMA Ready */
620#define FIFOFULL 0x2 /* FIFO Full */
621#define FIFOEMPTY 0x4 /* FIFO Empty */
622#define DMA_COMPLETE 0x8 /* DMA Complete */
623#define HSHK 0x10 /* Host Handshake */
624#define HSTIMEOUT 0x20 /* Host Timeout */
625#define HIRQ 0x40 /* Host Interrupt Request */
626#define ALLOW_CNFG 0x80 /* Allow New Configuration */
627#define DMA_DIR 0x100 /* DMA Direction */
628#define BTE 0x200 /* Bus Timeout Enabled */
629
630/* Bit masks for HOST_TIMEOUT */
631
632#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */
633
634/* Bit masks for TIMER_ENABLE1 */ 604/* Bit masks for TIMER_ENABLE1 */
635 605
636#define TIMEN8 0x1 /* Timer 8 Enable */ 606#define TIMEN8 0x1 /* Timer 8 Enable */
diff --git a/arch/blackfin/mach-bf548/include/mach/defBF547.h b/arch/blackfin/mach-bf548/include/mach/defBF547.h
index e18de212ba1a..d55dcc0f5324 100644
--- a/arch/blackfin/mach-bf548/include/mach/defBF547.h
+++ b/arch/blackfin/mach-bf548/include/mach/defBF547.h
@@ -581,36 +581,6 @@
581#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */ 581#define GU_TRANS 0xff00 /* Transparent Color - G/U Component */
582#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */ 582#define BV_TRANS 0xff0000 /* Transparent Color - B/V Component */
583 583
584/* Bit masks for HOST_CONTROL */
585
586#define HOST_EN 0x1 /* Host Enable */
587#define HOST_END 0x2 /* Host Endianess */
588#define DATA_SIZE 0x4 /* Data Size */
589#define HOST_RST 0x8 /* Host Reset */
590#define HRDY_OVR 0x20 /* Host Ready Override */
591#define INT_MODE 0x40 /* Interrupt Mode */
592#define BT_EN 0x80 /* Bus Timeout Enable */
593#define EHW 0x100 /* Enable Host Write */
594#define EHR 0x200 /* Enable Host Read */
595#define BDR 0x400 /* Burst DMA Requests */
596
597/* Bit masks for HOST_STATUS */
598
599#define DMA_READY 0x1 /* DMA Ready */
600#define FIFOFULL 0x2 /* FIFO Full */
601#define FIFOEMPTY 0x4 /* FIFO Empty */
602#define DMA_COMPLETE 0x8 /* DMA Complete */
603#define HSHK 0x10 /* Host Handshake */
604#define HSTIMEOUT 0x20 /* Host Timeout */
605#define HIRQ 0x40 /* Host Interrupt Request */
606#define ALLOW_CNFG 0x80 /* Allow New Configuration */
607#define DMA_DIR 0x100 /* DMA Direction */
608#define BTE 0x200 /* Bus Timeout Enabled */
609
610/* Bit masks for HOST_TIMEOUT */
611
612#define COUNT_TIMEOUT 0x7ff /* Host Timeout count */
613
614/* Bit masks for KPAD_CTL */ 584/* Bit masks for KPAD_CTL */
615 585
616#define KPAD_EN 0x1 /* Keypad Enable */ 586#define KPAD_EN 0x1 /* Keypad Enable */
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b74218fdd3a..430b16d5ccb1 100644
--- a/arch/blackfin/mach-bf561/boards/acvilon.c
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -60,7 +60,7 @@
60 */ 60 */
61const char bfin_board_name[] = "Acvilon board"; 61const char bfin_board_name[] = "Acvilon board";
62 62
63#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 63#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
64#include <linux/usb/isp1760.h> 64#include <linux/usb/isp1760.h>
65static struct resource bfin_isp1760_resources[] = { 65static struct resource bfin_isp1760_resources[] = {
66 [0] = { 66 [0] = {
@@ -137,7 +137,7 @@ static struct i2c_board_info acvilon_i2c_devs[] __initdata = {
137 }, 137 },
138}; 138};
139 139
140#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 140#if IS_ENABLED(CONFIG_MTD_PLATRAM)
141static struct platdata_mtd_ram mtd_ram_data = { 141static struct platdata_mtd_ram mtd_ram_data = {
142 .mapname = "rootfs(RAM)", 142 .mapname = "rootfs(RAM)",
143 .bankwidth = 4, 143 .bankwidth = 4,
@@ -160,7 +160,7 @@ static struct platform_device mtd_ram_device = {
160}; 160};
161#endif 161#endif
162 162
163#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 163#if IS_ENABLED(CONFIG_SMSC911X)
164#include <linux/smsc911x.h> 164#include <linux/smsc911x.h>
165static struct resource smsc911x_resources[] = { 165static struct resource smsc911x_resources[] = {
166 { 166 {
@@ -194,7 +194,7 @@ static struct platform_device smsc911x_device = {
194}; 194};
195#endif 195#endif
196 196
197#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 197#if IS_ENABLED(CONFIG_SERIAL_BFIN)
198#ifdef CONFIG_SERIAL_BFIN_UART0 198#ifdef CONFIG_SERIAL_BFIN_UART0
199static struct resource bfin_uart0_resources[] = { 199static struct resource bfin_uart0_resources[] = {
200 { 200 {
@@ -246,7 +246,7 @@ static struct platform_device bfin_uart0_device = {
246#endif 246#endif
247#endif 247#endif
248 248
249#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 249#if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
250 250
251static struct mtd_partition bfin_plat_nand_partitions[] = { 251static struct mtd_partition bfin_plat_nand_partitions[] = {
252 { 252 {
@@ -323,7 +323,7 @@ static void bfin_plat_nand_init(void)
323} 323}
324#endif 324#endif
325 325
326#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 326#if IS_ENABLED(CONFIG_MTD_DATAFLASH)
327static struct mtd_partition bfin_spi_dataflash_partitions[] = { 327static struct mtd_partition bfin_spi_dataflash_partitions[] = {
328 { 328 {
329 .name = "bootloader", 329 .name = "bootloader",
@@ -369,7 +369,7 @@ static struct bfin5xx_spi_chip data_flash_chip_info = {
369}; 369};
370#endif 370#endif
371 371
372#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 372#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
373/* SPI (0) */ 373/* SPI (0) */
374static struct resource bfin_spi0_resource[] = { 374static struct resource bfin_spi0_resource[] = {
375 [0] = { 375 [0] = {
@@ -408,7 +408,7 @@ static struct platform_device bfin_spi0_device = {
408#endif 408#endif
409 409
410static struct spi_board_info bfin_spi_board_info[] __initdata = { 410static struct spi_board_info bfin_spi_board_info[] __initdata = {
411#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 411#if IS_ENABLED(CONFIG_SPI_SPIDEV)
412 { 412 {
413 .modalias = "spidev", 413 .modalias = "spidev",
414 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 414 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -416,7 +416,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
416 .chip_select = 3, 416 .chip_select = 3,
417 }, 417 },
418#endif 418#endif
419#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) 419#if IS_ENABLED(CONFIG_MTD_DATAFLASH)
420 { /* DataFlash chip */ 420 { /* DataFlash chip */
421 .modalias = "mtd_dataflash", 421 .modalias = "mtd_dataflash",
422 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ 422 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */
@@ -472,11 +472,11 @@ static struct platform_device bfin_dpmc = {
472static struct platform_device *acvilon_devices[] __initdata = { 472static struct platform_device *acvilon_devices[] __initdata = {
473 &bfin_dpmc, 473 &bfin_dpmc,
474 474
475#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 475#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
476 &bfin_spi0_device, 476 &bfin_spi0_device,
477#endif 477#endif
478 478
479#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 479#if IS_ENABLED(CONFIG_SERIAL_BFIN)
480#ifdef CONFIG_SERIAL_BFIN_UART0 480#ifdef CONFIG_SERIAL_BFIN_UART0
481 &bfin_uart0_device, 481 &bfin_uart0_device,
482#endif 482#endif
@@ -484,17 +484,17 @@ static struct platform_device *acvilon_devices[] __initdata = {
484 484
485 &bfin_gpios_device, 485 &bfin_gpios_device,
486 486
487#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 487#if IS_ENABLED(CONFIG_SMSC911X)
488 &smsc911x_device, 488 &smsc911x_device,
489#endif 489#endif
490 490
491 &bfin_i2c_pca_device, 491 &bfin_i2c_pca_device,
492 492
493#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) 493#if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
494 &bfin_async_nand_device, 494 &bfin_async_nand_device,
495#endif 495#endif
496 496
497#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) 497#if IS_ENABLED(CONFIG_MTD_PLATRAM)
498 &mtd_ram_device, 498 &mtd_ram_device,
499#endif 499#endif
500 500
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index d81450f635df..9f777df4cacc 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -13,7 +13,7 @@
13#include <linux/mtd/partitions.h> 13#include <linux/mtd/partitions.h>
14#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/spi/flash.h> 15#include <linux/spi/flash.h>
16#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 16#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
17#include <linux/usb/isp1362.h> 17#include <linux/usb/isp1362.h>
18#endif 18#endif
19#include <linux/ata_platform.h> 19#include <linux/ata_platform.h>
@@ -29,10 +29,10 @@
29 */ 29 */
30const char bfin_board_name[] = "Bluetechnix CM BF561"; 30const char bfin_board_name[] = "Bluetechnix CM BF561";
31 31
32#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 32#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
33/* all SPI peripherals info goes here */ 33/* all SPI peripherals info goes here */
34 34
35#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 35#if IS_ENABLED(CONFIG_MTD_M25P80)
36static struct mtd_partition bfin_spi_flash_partitions[] = { 36static struct mtd_partition bfin_spi_flash_partitions[] = {
37 { 37 {
38 .name = "bootloader(spi)", 38 .name = "bootloader(spi)",
@@ -64,7 +64,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
64#endif 64#endif
65 65
66static struct spi_board_info bfin_spi_board_info[] __initdata = { 66static struct spi_board_info bfin_spi_board_info[] __initdata = {
67#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 67#if IS_ENABLED(CONFIG_MTD_M25P80)
68 { 68 {
69 /* the modalias must be the same as spi device driver name */ 69 /* the modalias must be the same as spi device driver name */
70 .modalias = "m25p80", /* Name of spi_driver for this device */ 70 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -77,7 +77,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
77 }, 77 },
78#endif 78#endif
79 79
80#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 80#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
81 { 81 {
82 .modalias = "ad183x", 82 .modalias = "ad183x",
83 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 83 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -85,7 +85,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
85 .chip_select = 4, 85 .chip_select = 4,
86 }, 86 },
87#endif 87#endif
88#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 88#if IS_ENABLED(CONFIG_MMC_SPI)
89 { 89 {
90 .modalias = "mmc_spi", 90 .modalias = "mmc_spi",
91 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 91 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
@@ -134,14 +134,14 @@ static struct platform_device bfin_spi0_device = {
134#endif /* spi master and devices */ 134#endif /* spi master and devices */
135 135
136 136
137#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 137#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
138static struct platform_device hitachi_fb_device = { 138static struct platform_device hitachi_fb_device = {
139 .name = "hitachi-tx09", 139 .name = "hitachi-tx09",
140}; 140};
141#endif 141#endif
142 142
143 143
144#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 144#if IS_ENABLED(CONFIG_SMC91X)
145#include <linux/smc91x.h> 145#include <linux/smc91x.h>
146 146
147static struct smc91x_platdata smc91x_info = { 147static struct smc91x_platdata smc91x_info = {
@@ -173,7 +173,7 @@ static struct platform_device smc91x_device = {
173}; 173};
174#endif 174#endif
175 175
176#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 176#if IS_ENABLED(CONFIG_SMSC911X)
177#include <linux/smsc911x.h> 177#include <linux/smsc911x.h>
178 178
179static struct resource smsc911x_resources[] = { 179static struct resource smsc911x_resources[] = {
@@ -208,7 +208,7 @@ static struct platform_device smsc911x_device = {
208}; 208};
209#endif 209#endif
210 210
211#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 211#if IS_ENABLED(CONFIG_USB_NET2272)
212static struct resource net2272_bfin_resources[] = { 212static struct resource net2272_bfin_resources[] = {
213 { 213 {
214 .start = 0x24000000, 214 .start = 0x24000000,
@@ -229,7 +229,7 @@ static struct platform_device net2272_bfin_device = {
229}; 229};
230#endif 230#endif
231 231
232#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 232#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
233static struct resource isp1362_hcd_resources[] = { 233static struct resource isp1362_hcd_resources[] = {
234 { 234 {
235 .start = 0x24008000, 235 .start = 0x24008000,
@@ -268,7 +268,7 @@ static struct platform_device isp1362_hcd_device = {
268}; 268};
269#endif 269#endif
270 270
271#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 271#if IS_ENABLED(CONFIG_SERIAL_BFIN)
272#ifdef CONFIG_SERIAL_BFIN_UART0 272#ifdef CONFIG_SERIAL_BFIN_UART0
273static struct resource bfin_uart0_resources[] = { 273static struct resource bfin_uart0_resources[] = {
274 { 274 {
@@ -319,7 +319,7 @@ static struct platform_device bfin_uart0_device = {
319#endif 319#endif
320#endif 320#endif
321 321
322#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 322#if IS_ENABLED(CONFIG_BFIN_SIR)
323#ifdef CONFIG_BFIN_SIR0 323#ifdef CONFIG_BFIN_SIR0
324static struct resource bfin_sir0_resources[] = { 324static struct resource bfin_sir0_resources[] = {
325 { 325 {
@@ -348,7 +348,7 @@ static struct platform_device bfin_sir0_device = {
348#endif 348#endif
349#endif 349#endif
350 350
351#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 351#if IS_ENABLED(CONFIG_PATA_PLATFORM)
352#define PATA_INT IRQ_PF46 352#define PATA_INT IRQ_PF46
353 353
354static struct pata_platform_info bfin_pata_platform_data = { 354static struct pata_platform_info bfin_pata_platform_data = {
@@ -385,7 +385,7 @@ static struct platform_device bfin_pata_device = {
385}; 385};
386#endif 386#endif
387 387
388#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 388#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
389static struct mtd_partition para_partitions[] = { 389static struct mtd_partition para_partitions[] = {
390 { 390 {
391 .name = "bootloader(nor)", 391 .name = "bootloader(nor)",
@@ -456,54 +456,54 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
456 456
457 &bfin_dpmc, 457 &bfin_dpmc,
458 458
459#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 459#if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
460 &hitachi_fb_device, 460 &hitachi_fb_device,
461#endif 461#endif
462 462
463#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 463#if IS_ENABLED(CONFIG_SERIAL_BFIN)
464#ifdef CONFIG_SERIAL_BFIN_UART0 464#ifdef CONFIG_SERIAL_BFIN_UART0
465 &bfin_uart0_device, 465 &bfin_uart0_device,
466#endif 466#endif
467#endif 467#endif
468 468
469#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 469#if IS_ENABLED(CONFIG_BFIN_SIR)
470#ifdef CONFIG_BFIN_SIR0 470#ifdef CONFIG_BFIN_SIR0
471 &bfin_sir0_device, 471 &bfin_sir0_device,
472#endif 472#endif
473#endif 473#endif
474 474
475#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 475#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
476 &isp1362_hcd_device, 476 &isp1362_hcd_device,
477#endif 477#endif
478 478
479#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 479#if IS_ENABLED(CONFIG_SMC91X)
480 &smc91x_device, 480 &smc91x_device,
481#endif 481#endif
482 482
483#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 483#if IS_ENABLED(CONFIG_SMSC911X)
484 &smsc911x_device, 484 &smsc911x_device,
485#endif 485#endif
486 486
487#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 487#if IS_ENABLED(CONFIG_USB_NET2272)
488 &net2272_bfin_device, 488 &net2272_bfin_device,
489#endif 489#endif
490 490
491#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 491#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
492 &bfin_spi0_device, 492 &bfin_spi0_device,
493#endif 493#endif
494 494
495#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 495#if IS_ENABLED(CONFIG_PATA_PLATFORM)
496 &bfin_pata_device, 496 &bfin_pata_device,
497#endif 497#endif
498 498
499#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 499#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
500 &para_flash_device, 500 &para_flash_device,
501#endif 501#endif
502}; 502};
503 503
504static int __init net2272_init(void) 504static int __init net2272_init(void)
505{ 505{
506#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 506#if IS_ENABLED(CONFIG_USB_NET2272)
507 int ret; 507 int ret;
508 508
509 ret = gpio_request(GPIO_PF46, "net2272"); 509 ret = gpio_request(GPIO_PF46, "net2272");
@@ -523,11 +523,11 @@ static int __init cm_bf561_init(void)
523{ 523{
524 printk(KERN_INFO "%s(): registering device resources\n", __func__); 524 printk(KERN_INFO "%s(): registering device resources\n", __func__);
525 platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices)); 525 platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices));
526#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 526#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
527 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 527 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
528#endif 528#endif
529 529
530#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 530#if IS_ENABLED(CONFIG_PATA_PLATFORM)
531 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 531 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
532#endif 532#endif
533 533
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 92938e79b9e3..88dee43e7abe 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -25,7 +25,7 @@
25 */ 25 */
26const char bfin_board_name[] = "ADI BF561-EZKIT"; 26const char bfin_board_name[] = "ADI BF561-EZKIT";
27 27
28#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 28#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
29#include <linux/usb/isp1760.h> 29#include <linux/usb/isp1760.h>
30static struct resource bfin_isp1760_resources[] = { 30static struct resource bfin_isp1760_resources[] = {
31 [0] = { 31 [0] = {
@@ -60,7 +60,7 @@ static struct platform_device bfin_isp1760_device = {
60}; 60};
61#endif 61#endif
62 62
63#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 63#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
64#include <linux/usb/isp1362.h> 64#include <linux/usb/isp1362.h>
65 65
66static struct resource isp1362_hcd_resources[] = { 66static struct resource isp1362_hcd_resources[] = {
@@ -101,7 +101,7 @@ static struct platform_device isp1362_hcd_device = {
101}; 101};
102#endif 102#endif
103 103
104#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 104#if IS_ENABLED(CONFIG_USB_NET2272)
105static struct resource net2272_bfin_resources[] = { 105static struct resource net2272_bfin_resources[] = {
106 { 106 {
107 .start = 0x2C000000, 107 .start = 0x2C000000,
@@ -129,7 +129,7 @@ static struct platform_device net2272_bfin_device = {
129 * USB-LAN EzExtender board 129 * USB-LAN EzExtender board
130 * Driver needs to know address, irq and flag pin. 130 * Driver needs to know address, irq and flag pin.
131 */ 131 */
132#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 132#if IS_ENABLED(CONFIG_SMC91X)
133#include <linux/smc91x.h> 133#include <linux/smc91x.h>
134 134
135static struct smc91x_platdata smc91x_info = { 135static struct smc91x_platdata smc91x_info = {
@@ -163,7 +163,7 @@ static struct platform_device smc91x_device = {
163}; 163};
164#endif 164#endif
165 165
166#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 166#if IS_ENABLED(CONFIG_SERIAL_BFIN)
167#ifdef CONFIG_SERIAL_BFIN_UART0 167#ifdef CONFIG_SERIAL_BFIN_UART0
168static struct resource bfin_uart0_resources[] = { 168static struct resource bfin_uart0_resources[] = {
169 { 169 {
@@ -214,7 +214,7 @@ static struct platform_device bfin_uart0_device = {
214#endif 214#endif
215#endif 215#endif
216 216
217#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 217#if IS_ENABLED(CONFIG_BFIN_SIR)
218#ifdef CONFIG_BFIN_SIR0 218#ifdef CONFIG_BFIN_SIR0
219static struct resource bfin_sir0_resources[] = { 219static struct resource bfin_sir0_resources[] = {
220 { 220 {
@@ -243,7 +243,7 @@ static struct platform_device bfin_sir0_device = {
243#endif 243#endif
244#endif 244#endif
245 245
246#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 246#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
247static struct mtd_partition ezkit_partitions[] = { 247static struct mtd_partition ezkit_partitions[] = {
248 { 248 {
249 .name = "bootloader(nor)", 249 .name = "bootloader(nor)",
@@ -291,7 +291,7 @@ static struct platform_device ezkit_flash_device = {
291}; 291};
292#endif 292#endif
293 293
294#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 294#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
295/* SPI (0) */ 295/* SPI (0) */
296static struct resource bfin_spi0_resource[] = { 296static struct resource bfin_spi0_resource[] = {
297 [0] = { 297 [0] = {
@@ -330,8 +330,7 @@ static struct platform_device bfin_spi0_device = {
330#endif 330#endif
331 331
332static struct spi_board_info bfin_spi_board_info[] __initdata = { 332static struct spi_board_info bfin_spi_board_info[] __initdata = {
333#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 333#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
334 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
335 { 334 {
336 .modalias = "ad183x", 335 .modalias = "ad183x",
337 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 336 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -341,7 +340,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
341 .mode = SPI_MODE_3, 340 .mode = SPI_MODE_3,
342 }, 341 },
343#endif 342#endif
344#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 343#if IS_ENABLED(CONFIG_SPI_SPIDEV)
345 { 344 {
346 .modalias = "spidev", 345 .modalias = "spidev",
347 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 346 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -351,7 +350,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
351#endif 350#endif
352}; 351};
353 352
354#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 353#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
355#include <linux/input.h> 354#include <linux/input.h>
356#include <linux/gpio_keys.h> 355#include <linux/gpio_keys.h>
357 356
@@ -375,7 +374,7 @@ static struct platform_device bfin_device_gpiokeys = {
375}; 374};
376#endif 375#endif
377 376
378#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 377#if IS_ENABLED(CONFIG_I2C_GPIO)
379#include <linux/i2c-gpio.h> 378#include <linux/i2c-gpio.h>
380 379
381static struct i2c_gpio_platform_data i2c_gpio_data = { 380static struct i2c_gpio_platform_data i2c_gpio_data = {
@@ -422,8 +421,7 @@ static struct platform_device bfin_dpmc = {
422 }, 421 },
423}; 422};
424 423
425#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 424#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
426 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
427#include <linux/videodev2.h> 425#include <linux/videodev2.h>
428#include <media/blackfin/bfin_capture.h> 426#include <media/blackfin/bfin_capture.h>
429#include <media/blackfin/ppi.h> 427#include <media/blackfin/ppi.h>
@@ -443,8 +441,7 @@ static const struct ppi_info ppi_info = {
443 .pin_req = ppi_req, 441 .pin_req = ppi_req,
444}; 442};
445 443
446#if defined(CONFIG_VIDEO_ADV7183) \ 444#if IS_ENABLED(CONFIG_VIDEO_ADV7183)
447 || defined(CONFIG_VIDEO_ADV7183_MODULE)
448#include <media/adv7183.h> 445#include <media/adv7183.h>
449static struct v4l2_input adv7183_inputs[] = { 446static struct v4l2_input adv7183_inputs[] = {
450 { 447 {
@@ -515,7 +512,7 @@ static struct platform_device bfin_capture_device = {
515}; 512};
516#endif 513#endif
517 514
518#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 515#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
519static struct platform_device bfin_i2s = { 516static struct platform_device bfin_i2s = {
520 .name = "bfin-i2s", 517 .name = "bfin-i2s",
521 .id = CONFIG_SND_BF5XX_SPORT_NUM, 518 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -523,7 +520,7 @@ static struct platform_device bfin_i2s = {
523}; 520};
524#endif 521#endif
525 522
526#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 523#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
527static struct platform_device bfin_ac97 = { 524static struct platform_device bfin_ac97 = {
528 .name = "bfin-ac97", 525 .name = "bfin-ac97",
529 .id = CONFIG_SND_BF5XX_SPORT_NUM, 526 .id = CONFIG_SND_BF5XX_SPORT_NUM,
@@ -531,8 +528,7 @@ static struct platform_device bfin_ac97 = {
531}; 528};
532#endif 529#endif
533 530
534#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 531#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
535 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
536static const char * const ad1836_link[] = { 532static const char * const ad1836_link[] = {
537 "bfin-i2s.0", 533 "bfin-i2s.0",
538 "spi0.4", 534 "spi0.4",
@@ -550,72 +546,70 @@ static struct platform_device *ezkit_devices[] __initdata = {
550 546
551 &bfin_dpmc, 547 &bfin_dpmc,
552 548
553#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 549#if IS_ENABLED(CONFIG_SMC91X)
554 &smc91x_device, 550 &smc91x_device,
555#endif 551#endif
556 552
557#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 553#if IS_ENABLED(CONFIG_USB_NET2272)
558 &net2272_bfin_device, 554 &net2272_bfin_device,
559#endif 555#endif
560 556
561#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 557#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
562 &bfin_isp1760_device, 558 &bfin_isp1760_device,
563#endif 559#endif
564 560
565#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 561#if IS_ENABLED(CONFIG_SPI_BFIN5XX)
566 &bfin_spi0_device, 562 &bfin_spi0_device,
567#endif 563#endif
568 564
569#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 565#if IS_ENABLED(CONFIG_SERIAL_BFIN)
570#ifdef CONFIG_SERIAL_BFIN_UART0 566#ifdef CONFIG_SERIAL_BFIN_UART0
571 &bfin_uart0_device, 567 &bfin_uart0_device,
572#endif 568#endif
573#endif 569#endif
574 570
575#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 571#if IS_ENABLED(CONFIG_BFIN_SIR)
576#ifdef CONFIG_BFIN_SIR0 572#ifdef CONFIG_BFIN_SIR0
577 &bfin_sir0_device, 573 &bfin_sir0_device,
578#endif 574#endif
579#endif 575#endif
580 576
581#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 577#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
582 &bfin_device_gpiokeys, 578 &bfin_device_gpiokeys,
583#endif 579#endif
584 580
585#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) 581#if IS_ENABLED(CONFIG_I2C_GPIO)
586 &i2c_gpio_device, 582 &i2c_gpio_device,
587#endif 583#endif
588 584
589#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 585#if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
590 &isp1362_hcd_device, 586 &isp1362_hcd_device,
591#endif 587#endif
592 588
593#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 589#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
594 &ezkit_flash_device, 590 &ezkit_flash_device,
595#endif 591#endif
596 592
597#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 593#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
598 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
599 &bfin_capture_device, 594 &bfin_capture_device,
600#endif 595#endif
601 596
602#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 597#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
603 &bfin_i2s, 598 &bfin_i2s,
604#endif 599#endif
605 600
606#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 601#if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
607 &bfin_ac97, 602 &bfin_ac97,
608#endif 603#endif
609 604
610#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 605#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
611 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
612 &bfin_ad1836_machine, 606 &bfin_ad1836_machine,
613#endif 607#endif
614}; 608};
615 609
616static int __init net2272_init(void) 610static int __init net2272_init(void)
617{ 611{
618#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 612#if IS_ENABLED(CONFIG_USB_NET2272)
619 int ret; 613 int ret;
620 614
621 ret = gpio_request(GPIO_PF11, "net2272"); 615 ret = gpio_request(GPIO_PF11, "net2272");
@@ -641,12 +635,12 @@ static int __init ezkit_init(void)
641 if (ret < 0) 635 if (ret < 0)
642 return ret; 636 return ret;
643 637
644#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 638#if IS_ENABLED(CONFIG_SMC91X)
645 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12)); 639 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12));
646 SSYNC(); 640 SSYNC();
647#endif 641#endif
648 642
649#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 643#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
650 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15)); 644 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15));
651 bfin_write_FIO0_FLAG_S(1 << 15); 645 bfin_write_FIO0_FLAG_S(1 << 15);
652 SSYNC(); 646 SSYNC();
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c
index 1a57bc986aad..f87b8cc0cd4c 100644
--- a/arch/blackfin/mach-bf561/boards/tepla.c
+++ b/arch/blackfin/mach-bf561/boards/tepla.c
@@ -42,7 +42,7 @@ static struct platform_device smc91x_device = {
42 .resource = smc91x_resources, 42 .resource = smc91x_resources,
43}; 43};
44 44
45#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 45#if IS_ENABLED(CONFIG_SERIAL_BFIN)
46#ifdef CONFIG_SERIAL_BFIN_UART0 46#ifdef CONFIG_SERIAL_BFIN_UART0
47static struct resource bfin_uart0_resources[] = { 47static struct resource bfin_uart0_resources[] = {
48 { 48 {
@@ -93,7 +93,7 @@ static struct platform_device bfin_uart0_device = {
93#endif 93#endif
94#endif 94#endif
95 95
96#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 96#if IS_ENABLED(CONFIG_BFIN_SIR)
97#ifdef CONFIG_BFIN_SIR0 97#ifdef CONFIG_BFIN_SIR0
98static struct resource bfin_sir0_resources[] = { 98static struct resource bfin_sir0_resources[] = {
99 { 99 {
@@ -125,13 +125,13 @@ static struct platform_device bfin_sir0_device = {
125static struct platform_device *tepla_devices[] __initdata = { 125static struct platform_device *tepla_devices[] __initdata = {
126 &smc91x_device, 126 &smc91x_device,
127 127
128#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 128#if IS_ENABLED(CONFIG_SERIAL_BFIN)
129#ifdef CONFIG_SERIAL_BFIN_UART0 129#ifdef CONFIG_SERIAL_BFIN_UART0
130 &bfin_uart0_device, 130 &bfin_uart0_device,
131#endif 131#endif
132#endif 132#endif
133 133
134#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 134#if IS_ENABLED(CONFIG_BFIN_SIR)
135#ifdef CONFIG_BFIN_SIR0 135#ifdef CONFIG_BFIN_SIR0
136 &bfin_sir0_device, 136 &bfin_sir0_device,
137#endif 137#endif
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c
index 8de8bc690b36..943f7e95ec15 100644
--- a/arch/blackfin/mach-bf609/boards/ezkit.c
+++ b/arch/blackfin/mach-bf609/boards/ezkit.c
@@ -39,7 +39,7 @@ const char bfin_board_name[] = "ADI BF609-EZKIT";
39 * Driver needs to know address, irq and flag pin. 39 * Driver needs to know address, irq and flag pin.
40 */ 40 */
41 41
42#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 42#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
43#include <linux/usb/isp1760.h> 43#include <linux/usb/isp1760.h>
44static struct resource bfin_isp1760_resources[] = { 44static struct resource bfin_isp1760_resources[] = {
45 [0] = { 45 [0] = {
@@ -74,7 +74,7 @@ static struct platform_device bfin_isp1760_device = {
74}; 74};
75#endif 75#endif
76 76
77#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 77#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
78#include <asm/bfin_rotary.h> 78#include <asm/bfin_rotary.h>
79 79
80static struct bfin_rotary_platform_data bfin_rotary_data = { 80static struct bfin_rotary_platform_data bfin_rotary_data = {
@@ -105,7 +105,7 @@ static struct platform_device bfin_rotary_device = {
105}; 105};
106#endif 106#endif
107 107
108#if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE) 108#if IS_ENABLED(CONFIG_STMMAC_ETH)
109#include <linux/stmmac.h> 109#include <linux/stmmac.h>
110#include <linux/phy.h> 110#include <linux/phy.h>
111 111
@@ -159,7 +159,7 @@ static struct platform_device bfin_eth_device = {
159}; 159};
160#endif 160#endif
161 161
162#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 162#if IS_ENABLED(CONFIG_INPUT_ADXL34X)
163#include <linux/input/adxl34x.h> 163#include <linux/input/adxl34x.h>
164static const struct adxl34x_platform_data adxl34x_info = { 164static const struct adxl34x_platform_data adxl34x_info = {
165 .x_axis_offset = 0, 165 .x_axis_offset = 0,
@@ -198,14 +198,14 @@ static const struct adxl34x_platform_data adxl34x_info = {
198}; 198};
199#endif 199#endif
200 200
201#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 201#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
202static struct platform_device rtc_device = { 202static struct platform_device rtc_device = {
203 .name = "rtc-bfin", 203 .name = "rtc-bfin",
204 .id = -1, 204 .id = -1,
205}; 205};
206#endif 206#endif
207 207
208#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 208#if IS_ENABLED(CONFIG_SERIAL_BFIN)
209#ifdef CONFIG_SERIAL_BFIN_UART0 209#ifdef CONFIG_SERIAL_BFIN_UART0
210static struct resource bfin_uart0_resources[] = { 210static struct resource bfin_uart0_resources[] = {
211 { 211 {
@@ -355,7 +355,7 @@ static struct platform_device bfin_uart1_device = {
355#endif 355#endif
356#endif 356#endif
357 357
358#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 358#if IS_ENABLED(CONFIG_BFIN_SIR)
359#ifdef CONFIG_BFIN_SIR0 359#ifdef CONFIG_BFIN_SIR0
360static struct resource bfin_sir0_resources[] = { 360static struct resource bfin_sir0_resources[] = {
361 { 361 {
@@ -408,7 +408,7 @@ static struct platform_device bfin_sir1_device = {
408#endif 408#endif
409#endif 409#endif
410 410
411#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 411#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
412static struct resource musb_resources[] = { 412static struct resource musb_resources[] = {
413 [0] = { 413 [0] = {
414 .start = 0xFFCC1000, 414 .start = 0xFFCC1000,
@@ -464,7 +464,7 @@ static struct platform_device musb_device = {
464}; 464};
465#endif 465#endif
466 466
467#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 467#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
468#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 468#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
469static struct resource bfin_sport0_uart_resources[] = { 469static struct resource bfin_sport0_uart_resources[] = {
470 { 470 {
@@ -569,7 +569,7 @@ static struct platform_device bfin_sport2_uart_device = {
569#endif 569#endif
570#endif 570#endif
571 571
572#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 572#if IS_ENABLED(CONFIG_CAN_BFIN)
573 573
574static unsigned short bfin_can0_peripherals[] = { 574static unsigned short bfin_can0_peripherals[] = {
575 P_CAN0_RX, P_CAN0_TX, 0 575 P_CAN0_RX, P_CAN0_TX, 0
@@ -610,7 +610,7 @@ static struct platform_device bfin_can0_device = {
610 610
611#endif 611#endif
612 612
613#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 613#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
614static struct mtd_partition partition_info[] = { 614static struct mtd_partition partition_info[] = {
615 { 615 {
616 .name = "bootloader(nand)", 616 .name = "bootloader(nand)",
@@ -660,7 +660,7 @@ static struct platform_device bfin_nand_device = {
660}; 660};
661#endif 661#endif
662 662
663#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 663#if IS_ENABLED(CONFIG_SDH_BFIN)
664 664
665static struct bfin_sd_host bfin_sdh_data = { 665static struct bfin_sd_host bfin_sdh_data = {
666 .dma_chan = CH_RSI, 666 .dma_chan = CH_RSI,
@@ -677,7 +677,7 @@ static struct platform_device bfin_sdh_device = {
677}; 677};
678#endif 678#endif
679 679
680#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 680#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
681static struct mtd_partition ezkit_partitions[] = { 681static struct mtd_partition ezkit_partitions[] = {
682 { 682 {
683 .name = "bootloader(nor)", 683 .name = "bootloader(nor)",
@@ -741,8 +741,7 @@ static struct platform_device ezkit_flash_device = {
741}; 741};
742#endif 742#endif
743 743
744#if defined(CONFIG_MTD_M25P80) \ 744#if IS_ENABLED(CONFIG_MTD_M25P80)
745 || defined(CONFIG_MTD_M25P80_MODULE)
746/* SPI flash chip (w25q32) */ 745/* SPI flash chip (w25q32) */
747static struct mtd_partition bfin_spi_flash_partitions[] = { 746static struct mtd_partition bfin_spi_flash_partitions[] = {
748 { 747 {
@@ -773,21 +772,20 @@ static struct bfin_spi3_chip spi_flash_chip_info = {
773}; 772};
774#endif 773#endif
775 774
776#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 775#if IS_ENABLED(CONFIG_SPI_SPIDEV)
777static struct bfin_spi3_chip spidev_chip_info = { 776static struct bfin_spi3_chip spidev_chip_info = {
778 .enable_dma = true, 777 .enable_dma = true,
779}; 778};
780#endif 779#endif
781 780
782#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 781#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
783static struct platform_device bfin_i2s_pcm = { 782static struct platform_device bfin_i2s_pcm = {
784 .name = "bfin-i2s-pcm-audio", 783 .name = "bfin-i2s-pcm-audio",
785 .id = -1, 784 .id = -1,
786}; 785};
787#endif 786#endif
788 787
789#if defined(CONFIG_SND_BF6XX_SOC_I2S) || \ 788#if IS_ENABLED(CONFIG_SND_BF6XX_SOC_I2S)
790 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
791#include <asm/bfin_sport3.h> 789#include <asm/bfin_sport3.h>
792static struct resource bfin_snd_resources[] = { 790static struct resource bfin_snd_resources[] = {
793 { 791 {
@@ -841,8 +839,7 @@ static struct platform_device bfin_i2s = {
841}; 839};
842#endif 840#endif
843 841
844#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 842#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
845 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
846static const char * const ad1836_link[] = { 843static const char * const ad1836_link[] = {
847 "bfin-i2s.0", 844 "bfin-i2s.0",
848 "spi0.76", 845 "spi0.76",
@@ -856,14 +853,13 @@ static struct platform_device bfin_ad1836_machine = {
856}; 853};
857#endif 854#endif
858 855
859#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ 856#if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61)
860 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
861static struct platform_device adau1761_device = { 857static struct platform_device adau1761_device = {
862 .name = "bfin-eval-adau1x61", 858 .name = "bfin-eval-adau1x61",
863}; 859};
864#endif 860#endif
865 861
866#if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) 862#if IS_ENABLED(CONFIG_SND_SOC_ADAU1761)
867#include <sound/adau17x1.h> 863#include <sound/adau17x1.h>
868static struct adau1761_platform_data adau1761_info = { 864static struct adau1761_platform_data adau1761_info = {
869 .lineout_mode = ADAU1761_OUTPUT_MODE_LINE, 865 .lineout_mode = ADAU1761_OUTPUT_MODE_LINE,
@@ -871,8 +867,7 @@ static struct adau1761_platform_data adau1761_info = {
871}; 867};
872#endif 868#endif
873 869
874#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 870#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
875 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
876#include <linux/videodev2.h> 871#include <linux/videodev2.h>
877#include <media/blackfin/bfin_capture.h> 872#include <media/blackfin/bfin_capture.h>
878#include <media/blackfin/ppi.h> 873#include <media/blackfin/ppi.h>
@@ -882,7 +877,7 @@ static const unsigned short ppi_req[] = {
882 P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7, 877 P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
883 P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11, 878 P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11,
884 P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15, 879 P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15,
885#if !defined(CONFIG_VIDEO_VS6624) && !defined(CONFIG_VIDEO_VS6624_MODULE) 880#if !IS_ENABLED(CONFIG_VIDEO_VS6624)
886 P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19, 881 P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19,
887 P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23, 882 P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23,
888#endif 883#endif
@@ -898,8 +893,7 @@ static const struct ppi_info ppi_info = {
898 .pin_req = ppi_req, 893 .pin_req = ppi_req,
899}; 894};
900 895
901#if defined(CONFIG_VIDEO_VS6624) \ 896#if IS_ENABLED(CONFIG_VIDEO_VS6624)
902 || defined(CONFIG_VIDEO_VS6624_MODULE)
903static struct v4l2_input vs6624_inputs[] = { 897static struct v4l2_input vs6624_inputs[] = {
904 { 898 {
905 .index = 0, 899 .index = 0,
@@ -936,8 +930,7 @@ static struct bfin_capture_config bfin_capture_data = {
936}; 930};
937#endif 931#endif
938 932
939#if defined(CONFIG_VIDEO_ADV7842) \ 933#if IS_ENABLED(CONFIG_VIDEO_ADV7842)
940 || defined(CONFIG_VIDEO_ADV7842_MODULE)
941#include <media/adv7842.h> 934#include <media/adv7842.h>
942 935
943static struct v4l2_input adv7842_inputs[] = { 936static struct v4l2_input adv7842_inputs[] = {
@@ -1067,8 +1060,7 @@ static struct platform_device bfin_capture_device = {
1067}; 1060};
1068#endif 1061#endif
1069 1062
1070#if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \ 1063#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_DISPLAY)
1071 || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
1072#include <linux/videodev2.h> 1064#include <linux/videodev2.h>
1073#include <media/blackfin/bfin_display.h> 1065#include <media/blackfin/bfin_display.h>
1074#include <media/blackfin/ppi.h> 1066#include <media/blackfin/ppi.h>
@@ -1090,8 +1082,7 @@ static const struct ppi_info ppi_info = {
1090 .pin_req = ppi_req_disp, 1082 .pin_req = ppi_req_disp,
1091}; 1083};
1092 1084
1093#if defined(CONFIG_VIDEO_ADV7511) \ 1085#if IS_ENABLED(CONFIG_VIDEO_ADV7511)
1094 || defined(CONFIG_VIDEO_ADV7511_MODULE)
1095#include <media/adv7511.h> 1086#include <media/adv7511.h>
1096 1087
1097static struct v4l2_output adv7511_outputs[] = { 1088static struct v4l2_output adv7511_outputs[] = {
@@ -1313,7 +1304,7 @@ static struct platform_device bfin_crypto_crc_device = {
1313}; 1304};
1314#endif 1305#endif
1315 1306
1316#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1307#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
1317static const struct ad7877_platform_data bfin_ad7877_ts_info = { 1308static const struct ad7877_platform_data bfin_ad7877_ts_info = {
1318 .model = 7877, 1309 .model = 7877,
1319 .vref_delay_usecs = 50, /* internal, no capacitor */ 1310 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -1679,7 +1670,7 @@ static struct platform_device bfin_gpg_device = {
1679 1670
1680#endif 1671#endif
1681 1672
1682#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 1673#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
1683#include <linux/input.h> 1674#include <linux/input.h>
1684#include <linux/gpio_keys.h> 1675#include <linux/gpio_keys.h>
1685 1676
@@ -1702,8 +1693,7 @@ static struct platform_device bfin_device_gpiokeys = {
1702#endif 1693#endif
1703 1694
1704static struct spi_board_info bfin_spi_board_info[] __initdata = { 1695static struct spi_board_info bfin_spi_board_info[] __initdata = {
1705#if defined(CONFIG_MTD_M25P80) \ 1696#if IS_ENABLED(CONFIG_MTD_M25P80)
1706 || defined(CONFIG_MTD_M25P80_MODULE)
1707 { 1697 {
1708 /* the modalias must be the same as spi device driver name */ 1698 /* the modalias must be the same as spi device driver name */
1709 .modalias = "m25p80", /* Name of spi_driver for this device */ 1699 .modalias = "m25p80", /* Name of spi_driver for this device */
@@ -1715,7 +1705,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1715 .mode = SPI_MODE_3, 1705 .mode = SPI_MODE_3,
1716 }, 1706 },
1717#endif 1707#endif
1718#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 1708#if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
1719 { 1709 {
1720 .modalias = "ad7877", 1710 .modalias = "ad7877",
1721 .platform_data = &bfin_ad7877_ts_info, 1711 .platform_data = &bfin_ad7877_ts_info,
@@ -1725,7 +1715,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1725 .chip_select = MAX_CTRL_CS + GPIO_PC15, /* SPI_SSEL4 */ 1715 .chip_select = MAX_CTRL_CS + GPIO_PC15, /* SPI_SSEL4 */
1726 }, 1716 },
1727#endif 1717#endif
1728#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 1718#if IS_ENABLED(CONFIG_SPI_SPIDEV)
1729 { 1719 {
1730 .modalias = "spidev", 1720 .modalias = "spidev",
1731 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1721 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
@@ -1734,7 +1724,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1734 .controller_data = &spidev_chip_info, 1724 .controller_data = &spidev_chip_info,
1735 }, 1725 },
1736#endif 1726#endif
1737#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) 1727#if IS_ENABLED(CONFIG_INPUT_ADXL34X_SPI)
1738 { 1728 {
1739 .modalias = "adxl34x", 1729 .modalias = "adxl34x",
1740 .platform_data = &adxl34x_info, 1730 .platform_data = &adxl34x_info,
@@ -1818,7 +1808,7 @@ static struct platform_device bf60x_spi_master1 = {
1818}; 1808};
1819#endif /* spi master and devices */ 1809#endif /* spi master and devices */
1820 1810
1821#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1811#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
1822static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; 1812static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
1823 1813
1824static struct resource bfin_twi0_resource[] = { 1814static struct resource bfin_twi0_resource[] = {
@@ -1871,20 +1861,20 @@ static struct platform_device i2c_bfin_twi1_device = {
1871#endif 1861#endif
1872 1862
1873static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { 1863static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
1874#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) 1864#if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
1875 { 1865 {
1876 I2C_BOARD_INFO("adxl34x", 0x53), 1866 I2C_BOARD_INFO("adxl34x", 0x53),
1877 .irq = IRQ_PC5, 1867 .irq = IRQ_PC5,
1878 .platform_data = (void *)&adxl34x_info, 1868 .platform_data = (void *)&adxl34x_info,
1879 }, 1869 },
1880#endif 1870#endif
1881#if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) 1871#if IS_ENABLED(CONFIG_SND_SOC_ADAU1761)
1882 { 1872 {
1883 I2C_BOARD_INFO("adau1761", 0x38), 1873 I2C_BOARD_INFO("adau1761", 0x38),
1884 .platform_data = (void *)&adau1761_info 1874 .platform_data = (void *)&adau1761_info
1885 }, 1875 },
1886#endif 1876#endif
1887#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) 1877#if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
1888 { 1878 {
1889 I2C_BOARD_INFO("ssm2602", 0x1b), 1879 I2C_BOARD_INFO("ssm2602", 0x1b),
1890 }, 1880 },
@@ -1942,11 +1932,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
1942 &bfin_gpg_device, 1932 &bfin_gpg_device,
1943#endif 1933#endif
1944 1934
1945#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 1935#if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
1946 &rtc_device, 1936 &rtc_device,
1947#endif 1937#endif
1948 1938
1949#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1939#if IS_ENABLED(CONFIG_SERIAL_BFIN)
1950#ifdef CONFIG_SERIAL_BFIN_UART0 1940#ifdef CONFIG_SERIAL_BFIN_UART0
1951 &bfin_uart0_device, 1941 &bfin_uart0_device,
1952#endif 1942#endif
@@ -1955,7 +1945,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
1955#endif 1945#endif
1956#endif 1946#endif
1957 1947
1958#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 1948#if IS_ENABLED(CONFIG_BFIN_SIR)
1959#ifdef CONFIG_BFIN_SIR0 1949#ifdef CONFIG_BFIN_SIR0
1960 &bfin_sir0_device, 1950 &bfin_sir0_device,
1961#endif 1951#endif
@@ -1964,19 +1954,19 @@ static struct platform_device *ezkit_devices[] __initdata = {
1964#endif 1954#endif
1965#endif 1955#endif
1966 1956
1967#if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE) 1957#if IS_ENABLED(CONFIG_STMMAC_ETH)
1968 &bfin_eth_device, 1958 &bfin_eth_device,
1969#endif 1959#endif
1970 1960
1971#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) 1961#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
1972 &musb_device, 1962 &musb_device,
1973#endif 1963#endif
1974 1964
1975#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) 1965#if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
1976 &bfin_isp1760_device, 1966 &bfin_isp1760_device,
1977#endif 1967#endif
1978 1968
1979#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1969#if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
1980#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 1970#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1981 &bfin_sport0_uart_device, 1971 &bfin_sport0_uart_device,
1982#endif 1972#endif
@@ -1988,15 +1978,15 @@ static struct platform_device *ezkit_devices[] __initdata = {
1988#endif 1978#endif
1989#endif 1979#endif
1990 1980
1991#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 1981#if IS_ENABLED(CONFIG_CAN_BFIN)
1992 &bfin_can0_device, 1982 &bfin_can0_device,
1993#endif 1983#endif
1994 1984
1995#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 1985#if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
1996 &bfin_nand_device, 1986 &bfin_nand_device,
1997#endif 1987#endif
1998 1988
1999#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) 1989#if IS_ENABLED(CONFIG_SDH_BFIN)
2000 &bfin_sdh_device, 1990 &bfin_sdh_device,
2001#endif 1991#endif
2002 1992
@@ -2005,11 +1995,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
2005 &bf60x_spi_master1, 1995 &bf60x_spi_master1,
2006#endif 1996#endif
2007 1997
2008#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) 1998#if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
2009 &bfin_rotary_device, 1999 &bfin_rotary_device,
2010#endif 2000#endif
2011 2001
2012#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 2002#if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
2013 &i2c_bfin_twi0_device, 2003 &i2c_bfin_twi0_device,
2014#if !defined(CONFIG_BF542) 2004#if !defined(CONFIG_BF542)
2015 &i2c_bfin_twi1_device, 2005 &i2c_bfin_twi1_device,
@@ -2024,34 +2014,29 @@ static struct platform_device *ezkit_devices[] __initdata = {
2024 &bfin_crypto_crc_device, 2014 &bfin_crypto_crc_device,
2025#endif 2015#endif
2026 2016
2027#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 2017#if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
2028 &bfin_device_gpiokeys, 2018 &bfin_device_gpiokeys,
2029#endif 2019#endif
2030 2020
2031#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 2021#if IS_ENABLED(CONFIG_MTD_PHYSMAP)
2032 &ezkit_flash_device, 2022 &ezkit_flash_device,
2033#endif 2023#endif
2034#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2024#if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
2035 &bfin_i2s_pcm, 2025 &bfin_i2s_pcm,
2036#endif 2026#endif
2037#if defined(CONFIG_SND_BF6XX_SOC_I2S) || \ 2027#if IS_ENABLED(CONFIG_SND_BF6XX_SOC_I2S)
2038 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
2039 &bfin_i2s, 2028 &bfin_i2s,
2040#endif 2029#endif
2041#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ 2030#if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
2042 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
2043 &bfin_ad1836_machine, 2031 &bfin_ad1836_machine,
2044#endif 2032#endif
2045#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ 2033#if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61)
2046 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
2047 &adau1761_device, 2034 &adau1761_device,
2048#endif 2035#endif
2049#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ 2036#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
2050 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
2051 &bfin_capture_device, 2037 &bfin_capture_device,
2052#endif 2038#endif
2053#if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \ 2039#if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_DISPLAY)
2054 || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
2055 &bfin_display_device, 2040 &bfin_display_device,
2056#endif 2041#endif
2057 2042
@@ -2075,9 +2060,9 @@ static struct pinctrl_map __initdata bfin_pinmux_map[] = {
2075 PIN_MAP_MUX_GROUP_DEFAULT("physmap-flash.0", "pinctrl-adi2.0", NULL, "smc0"), 2060 PIN_MAP_MUX_GROUP_DEFAULT("physmap-flash.0", "pinctrl-adi2.0", NULL, "smc0"),
2076 PIN_MAP_MUX_GROUP_DEFAULT("bf609_nl8048.2", "pinctrl-adi2.0", NULL, "ppi2_16b"), 2061 PIN_MAP_MUX_GROUP_DEFAULT("bf609_nl8048.2", "pinctrl-adi2.0", NULL, "ppi2_16b"),
2077 PIN_MAP_MUX_GROUP_DEFAULT("bfin_display.0", "pinctrl-adi2.0", NULL, "ppi0_16b"), 2062 PIN_MAP_MUX_GROUP_DEFAULT("bfin_display.0", "pinctrl-adi2.0", NULL, "ppi0_16b"),
2078#if defined(CONFIG_VIDEO_MT9M114) || defined(CONFIG_VIDEO_MT9M114_MODULE) 2063#if IS_ENABLED(CONFIG_VIDEO_MT9M114)
2079 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_8b"), 2064 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_8b"),
2080#elif defined(CONFIG_VIDEO_VS6624) || defined(CONFIG_VIDEO_VS6624_MODULE) 2065#elif IS_ENABLED(CONFIG_VIDEO_VS6624)
2081 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_16b"), 2066 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_16b"),
2082#else 2067#else
2083 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_24b"), 2068 PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_24b"),
diff --git a/arch/blackfin/mach-bf609/clock.c b/arch/blackfin/mach-bf609/clock.c
index 13644ed25489..56200f37cfc8 100644
--- a/arch/blackfin/mach-bf609/clock.c
+++ b/arch/blackfin/mach-bf609/clock.c
@@ -73,24 +73,6 @@ static void clk_reg_write_mask(u32 reg, uint32_t val, uint32_t mask)
73 bfin_write32(reg, val2); 73 bfin_write32(reg, val2);
74} 74}
75 75
76static void clk_reg_set_bits(u32 reg, uint32_t mask)
77{
78 u32 val;
79
80 val = bfin_read32(reg);
81 val |= mask;
82 bfin_write32(reg, val);
83}
84
85static void clk_reg_clear_bits(u32 reg, uint32_t mask)
86{
87 u32 val;
88
89 val = bfin_read32(reg);
90 val &= ~mask;
91 bfin_write32(reg, val);
92}
93
94int wait_for_pll_align(void) 76int wait_for_pll_align(void)
95{ 77{
96 int i = 10000; 78 int i = 10000;
diff --git a/arch/blackfin/mach-bf609/pm.c b/arch/blackfin/mach-bf609/pm.c
index ad505d9db4a8..0cdd6955c7be 100644
--- a/arch/blackfin/mach-bf609/pm.c
+++ b/arch/blackfin/mach-bf609/pm.c
@@ -210,7 +210,7 @@ void bf609_cpu_pm_enter(suspend_state_t state)
210 210
211#ifdef CONFIG_PM_BFIN_WAKE_PB15 211#ifdef CONFIG_PM_BFIN_WAKE_PB15
212 wakeup |= PB15WE; 212 wakeup |= PB15WE;
213# if CONFIG_PM_BFIN_WAKE_PA15_POL 213# if CONFIG_PM_BFIN_WAKE_PB15_POL
214 wakeup_pol |= PB15WE; 214 wakeup_pol |= PB15WE;
215# endif 215# endif
216#endif 216#endif