aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537
diff options
context:
space:
mode:
authorSteven Miao <realmz6@gmail.com>2014-04-11 14:07:27 -0400
committerSteven Miao <realmz6@gmail.com>2014-04-11 20:48:01 -0400
commitc4a2c58d20953ff1080f50f705cdd952f6d301b2 (patch)
tree9e604fad91d728839cbbea1549248339729a1829 /arch/blackfin/mach-bf537
parentf8ef77d9389f9b52fe80de4f1b236af3391420b8 (diff)
blackfin: cleanup board files
using IS_ENABLED() macro instead of defined(CONFIG_XXX) || defined(CONFIG_XXX_MODULE) Signed-off-by: Steven Miao <realmz6@gmail.com>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-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.c403
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c70
7 files changed, 356 insertions, 406 deletions
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 c403369e8945..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,7 +648,7 @@ 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};
@@ -666,7 +665,7 @@ static struct bfin5xx_spi_chip ad2s1200_spi_chip_info = {
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,
@@ -688,7 +687,7 @@ static struct bfin5xx_spi_chip ad7314_spi_chip_info = {
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 */
@@ -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,
@@ -1029,7 +1024,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
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,
@@ -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,26 +2169,26 @@ 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 },
@@ -2229,7 +2201,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
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