Commit c4a2c58d authored by Steven Miao's avatar Steven Miao

blackfin: cleanup board files

using IS_ENABLED() macro instead of defined(CONFIG_XXX) || defined(CONFIG_XXX_MODULE)
Signed-off-by: default avatarSteven Miao <realmz6@gmail.com>
parent f8ef77d9
...@@ -36,7 +36,7 @@ const char bfin_board_name[] = "ADI BF518F-EZBRD"; ...@@ -36,7 +36,7 @@ const char bfin_board_name[] = "ADI BF518F-EZBRD";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition ezbrd_partitions[] = { static struct mtd_partition ezbrd_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -61,7 +61,7 @@ static struct physmap_flash_data ezbrd_flash_data = { ...@@ -61,7 +61,7 @@ static struct physmap_flash_data ezbrd_flash_data = {
static struct resource ezbrd_flash_resource = { static struct resource ezbrd_flash_resource = {
.start = 0x20000000, .start = 0x20000000,
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
.end = 0x202fffff, .end = 0x202fffff,
#else #else
.end = 0x203fffff, .end = 0x203fffff,
...@@ -80,14 +80,14 @@ static struct platform_device ezbrd_flash_device = { ...@@ -80,14 +80,14 @@ static struct platform_device ezbrd_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = { static const unsigned short bfin_mac_peripherals[] = {
P_MII0_ETxD0, P_MII0_ETxD0,
...@@ -105,7 +105,7 @@ static const unsigned short bfin_mac_peripherals[] = { ...@@ -105,7 +105,7 @@ static const unsigned short bfin_mac_peripherals[] = {
static struct bfin_phydev_platform_data bfin_phydev_data[] = { static struct bfin_phydev_platform_data bfin_phydev_data[] = {
{ {
#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
.addr = 3, .addr = 3,
#else #else
.addr = 1, .addr = 1,
...@@ -119,7 +119,7 @@ static struct bfin_mii_bus_platform_data bfin_mii_bus_data = { ...@@ -119,7 +119,7 @@ static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
.phydev_data = bfin_phydev_data, .phydev_data = bfin_phydev_data,
.phy_mode = PHY_INTERFACE_MODE_MII, .phy_mode = PHY_INTERFACE_MODE_MII,
.mac_peripherals = bfin_mac_peripherals, .mac_peripherals = bfin_mac_peripherals,
#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
.phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */ .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */
#endif #endif
.vlan1_mask = 1, .vlan1_mask = 1,
...@@ -140,7 +140,7 @@ static struct platform_device bfin_mac_device = { ...@@ -140,7 +140,7 @@ static struct platform_device bfin_mac_device = {
} }
}; };
#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
static struct dsa_chip_data ksz8893m_switch_chip_data = { static struct dsa_chip_data ksz8893m_switch_chip_data = {
.mii_bus = &bfin_mii_bus.dev, .mii_bus = &bfin_mii_bus.dev,
.port_names = { .port_names = {
...@@ -165,8 +165,7 @@ static struct platform_device ksz8893m_switch_device = { ...@@ -165,8 +165,7 @@ static struct platform_device ksz8893m_switch_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -193,13 +192,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -193,13 +192,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -216,8 +215,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -216,8 +215,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -230,9 +228,8 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -230,9 +228,8 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#if defined(CONFIG_NET_DSA_KSZ8893M) \ #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
|| defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
{ {
.modalias = "ksz8893m", .modalias = "ksz8893m",
.max_speed_hz = 5000000, .max_speed_hz = 5000000,
...@@ -244,7 +241,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -244,7 +241,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
...@@ -254,7 +251,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -254,7 +251,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -264,7 +261,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -264,7 +261,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 2, .chip_select = 2,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ #if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
&& defined(CONFIG_SND_SOC_WM8731_SPI) && defined(CONFIG_SND_SOC_WM8731_SPI)
{ {
.modalias = "wm8731", .modalias = "wm8731",
...@@ -274,7 +271,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -274,7 +271,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -282,7 +279,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -282,7 +279,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 1, .chip_select = 1,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
{ {
.modalias = "bfin-lq035q1-spi", .modalias = "bfin-lq035q1-spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -294,7 +291,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -294,7 +291,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}; };
/* SPI controller data */ /* SPI controller data */
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI (0) */ /* SPI (0) */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = 6, .num_chipselect = 6,
...@@ -366,7 +363,7 @@ static struct platform_device bfin_spi1_device = { ...@@ -366,7 +363,7 @@ static struct platform_device bfin_spi1_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -465,7 +462,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -465,7 +462,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -520,7 +517,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -520,7 +517,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -528,7 +525,7 @@ static struct platform_device bfin_i2s = { ...@@ -528,7 +525,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -556,25 +553,25 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -556,25 +553,25 @@ static struct platform_device i2c_bfin_twi_device = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("pcf8574_lcd", 0x22), I2C_BOARD_INFO("pcf8574_lcd", 0x22),
}, },
#endif #endif
#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) #if IS_ENABLED(CONFIG_INPUT_PCF8574)
{ {
I2C_BOARD_INFO("pcf8574_keypad", 0x27), I2C_BOARD_INFO("pcf8574_keypad", 0x27),
.irq = IRQ_PF8, .irq = IRQ_PF8,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
{ {
I2C_BOARD_INFO("ssm2602", 0x1b), I2C_BOARD_INFO("ssm2602", 0x1b),
}, },
#endif #endif
}; };
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -645,7 +642,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -645,7 +642,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -667,7 +664,7 @@ static struct platform_device bfin_device_gpiokeys = { ...@@ -667,7 +664,7 @@ static struct platform_device bfin_device_gpiokeys = {
}; };
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
static struct bfin_sd_host bfin_sdh_data = { static struct bfin_sd_host bfin_sdh_data = {
.dma_chan = CH_RSI, .dma_chan = CH_RSI,
...@@ -710,24 +707,24 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -710,24 +707,24 @@ static struct platform_device *stamp_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) #if IS_ENABLED(CONFIG_NET_DSA_KSZ8893M)
&ksz8893m_switch_device, &ksz8893m_switch_device,
#endif #endif
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
&bfin_spi1_device, &bfin_spi1_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -736,7 +733,7 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -736,7 +733,7 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -745,15 +742,15 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -745,15 +742,15 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s, &bfin_i2s,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -762,15 +759,15 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -762,15 +759,15 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
&bf51x_sdh_device, &bf51x_sdh_device,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&ezbrd_flash_device, &ezbrd_flash_device,
#endif #endif
}; };
...@@ -784,7 +781,7 @@ static int __init ezbrd_init(void) ...@@ -784,7 +781,7 @@ static int __init ezbrd_init(void)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
/* setup BF518-EZBRD GPIO pin PG11 to AMS2, PG15 to AMS3. */ /* setup BF518-EZBRD GPIO pin PG11 to AMS2, PG15 to AMS3. */
peripheral_request(P_AMS2, "ParaFlash"); peripheral_request(P_AMS2, "ParaFlash");
#if !defined(CONFIG_SPI_BFIN5XX) && !defined(CONFIG_SPI_BFIN5XX_MODULE) #if !IS_ENABLED(CONFIG_SPI_BFIN5XX)
peripheral_request(P_AMS3, "ParaFlash"); peripheral_request(P_AMS3, "ParaFlash");
#endif #endif
return 0; return 0;
......
...@@ -36,7 +36,7 @@ const char bfin_board_name[] = "Bluetechnix TCM-BF518"; ...@@ -36,7 +36,7 @@ const char bfin_board_name[] = "Bluetechnix TCM-BF518";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition tcm_partitions[] = { static struct mtd_partition tcm_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -73,14 +73,14 @@ static struct platform_device tcm_flash_device = { ...@@ -73,14 +73,14 @@ static struct platform_device tcm_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_MII0; static const unsigned short bfin_mac_peripherals[] = P_MII0;
...@@ -113,8 +113,7 @@ static struct platform_device bfin_mac_device = { ...@@ -113,8 +113,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -141,13 +140,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -141,13 +140,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -164,8 +163,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -164,8 +163,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -178,7 +176,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -178,7 +176,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -188,7 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -188,7 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -198,7 +196,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -198,7 +196,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 2, .chip_select = 2,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ #if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
&& defined(CONFIG_SND_SOC_WM8731_SPI) && defined(CONFIG_SND_SOC_WM8731_SPI)
{ {
.modalias = "wm8731", .modalias = "wm8731",
...@@ -208,7 +206,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -208,7 +206,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -216,7 +214,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -216,7 +214,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 1, .chip_select = 1,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
{ {
.modalias = "bfin-lq035q1-spi", .modalias = "bfin-lq035q1-spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -228,7 +226,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -228,7 +226,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}; };
/* SPI controller data */ /* SPI controller data */
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI (0) */ /* SPI (0) */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = 6, .num_chipselect = 6,
...@@ -300,7 +298,7 @@ static struct platform_device bfin_spi1_device = { ...@@ -300,7 +298,7 @@ static struct platform_device bfin_spi1_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -399,7 +397,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -399,7 +397,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -454,7 +452,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -454,7 +452,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -482,12 +480,12 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -482,12 +480,12 @@ static struct platform_device i2c_bfin_twi_device = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("pcf8574_lcd", 0x22), I2C_BOARD_INFO("pcf8574_lcd", 0x22),
}, },
#endif #endif
#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) #if IS_ENABLED(CONFIG_INPUT_PCF8574)
{ {
I2C_BOARD_INFO("pcf8574_keypad", 0x27), I2C_BOARD_INFO("pcf8574_keypad", 0x27),
.irq = IRQ_PF8, .irq = IRQ_PF8,
...@@ -495,7 +493,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -495,7 +493,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#endif #endif
}; };
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -566,7 +564,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -566,7 +564,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -588,7 +586,7 @@ static struct platform_device bfin_device_gpiokeys = { ...@@ -588,7 +586,7 @@ static struct platform_device bfin_device_gpiokeys = {
}; };
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
static struct bfin_sd_host bfin_sdh_data = { static struct bfin_sd_host bfin_sdh_data = {
.dma_chan = CH_RSI, .dma_chan = CH_RSI,
...@@ -631,21 +629,21 @@ static struct platform_device *tcm_devices[] __initdata = { ...@@ -631,21 +629,21 @@ static struct platform_device *tcm_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
&bfin_spi1_device, &bfin_spi1_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -654,7 +652,7 @@ static struct platform_device *tcm_devices[] __initdata = { ...@@ -654,7 +652,7 @@ static struct platform_device *tcm_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -663,11 +661,11 @@ static struct platform_device *tcm_devices[] __initdata = { ...@@ -663,11 +661,11 @@ static struct platform_device *tcm_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -676,15 +674,15 @@ static struct platform_device *tcm_devices[] __initdata = { ...@@ -676,15 +674,15 @@ static struct platform_device *tcm_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
&bf51x_sdh_device, &bf51x_sdh_device,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&tcm_flash_device, &tcm_flash_device,
#endif #endif
}; };
......
...@@ -37,7 +37,7 @@ const char bfin_board_name[] = "ADI BF527-AD7160EVAL"; ...@@ -37,7 +37,7 @@ const char bfin_board_name[] = "ADI BF527-AD7160EVAL";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
static struct resource musb_resources[] = { static struct resource musb_resources[] = {
[0] = { [0] = {
.start = 0xffc03800, .start = 0xffc03800,
...@@ -97,7 +97,7 @@ static struct platform_device musb_device = { ...@@ -97,7 +97,7 @@ static struct platform_device musb_device = {
}; };
#endif #endif
#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_RA158Z)
static struct resource bf52x_ra158z_resources[] = { static struct resource bf52x_ra158z_resources[] = {
{ {
.start = IRQ_PPI_ERROR, .start = IRQ_PPI_ERROR,
...@@ -114,7 +114,7 @@ static struct platform_device bf52x_ra158z_device = { ...@@ -114,7 +114,7 @@ static struct platform_device bf52x_ra158z_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition ad7160eval_partitions[] = { static struct mtd_partition ad7160eval_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -154,7 +154,7 @@ static struct platform_device ad7160eval_flash_device = { ...@@ -154,7 +154,7 @@ static struct platform_device ad7160eval_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
static struct mtd_partition partition_info[] = { static struct mtd_partition partition_info[] = {
{ {
.name = "linux kernel(nand)", .name = "linux kernel(nand)",
...@@ -200,14 +200,14 @@ static struct platform_device bf5xx_nand_device = { ...@@ -200,14 +200,14 @@ static struct platform_device bf5xx_nand_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_RMII0; static const unsigned short bfin_mac_peripherals[] = P_RMII0;
...@@ -241,8 +241,7 @@ static struct platform_device bfin_mac_device = { ...@@ -241,8 +241,7 @@ static struct platform_device bfin_mac_device = {
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -269,13 +268,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -269,13 +268,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -284,8 +283,7 @@ static struct platform_device bfin_i2s = { ...@@ -284,8 +283,7 @@ static struct platform_device bfin_i2s = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -297,8 +295,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -297,8 +295,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -306,7 +303,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -306,7 +303,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 4, .chip_select = 4,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */
...@@ -316,7 +313,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -316,7 +313,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -326,7 +323,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -326,7 +323,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
...@@ -364,7 +361,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -364,7 +361,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -475,7 +472,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -475,7 +472,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -530,7 +527,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -530,7 +527,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160)
#include <linux/input/ad7160.h> #include <linux/input/ad7160.h>
static const struct ad7160_platform_data bfin_ad7160_ts_info = { static const struct ad7160_platform_data bfin_ad7160_ts_info = {
.sensor_x_res = 854, .sensor_x_res = 854,
...@@ -560,7 +557,7 @@ static const struct ad7160_platform_data bfin_ad7160_ts_info = { ...@@ -560,7 +557,7 @@ static const struct ad7160_platform_data bfin_ad7160_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -588,7 +585,7 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -588,7 +585,7 @@ static struct platform_device i2c_bfin_twi_device = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7160)
{ {
I2C_BOARD_INFO("ad7160", 0x33), I2C_BOARD_INFO("ad7160", 0x33),
.irq = IRQ_PH1, .irq = IRQ_PH1,
...@@ -597,7 +594,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -597,7 +594,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#endif #endif
}; };
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -668,7 +665,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -668,7 +665,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
#include <asm/bfin_rotary.h> #include <asm/bfin_rotary.h>
static struct bfin_rotary_platform_data bfin_rotary_data = { static struct bfin_rotary_platform_data bfin_rotary_data = {
...@@ -725,28 +722,28 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -725,28 +722,28 @@ static struct platform_device *stamp_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
&bf5xx_nand_device, &bf5xx_nand_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
&musb_device, &musb_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -755,11 +752,11 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -755,11 +752,11 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_RA158Z)
&bf52x_ra158z_device, &bf52x_ra158z_device,
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -768,11 +765,11 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -768,11 +765,11 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -781,15 +778,15 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -781,15 +778,15 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
&bfin_rotary_device, &bfin_rotary_device,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&ad7160eval_flash_device, &ad7160eval_flash_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s, &bfin_i2s,
#endif #endif
}; };
......
...@@ -37,7 +37,7 @@ const char bfin_board_name[] = "Bluetechnix CM-BF527"; ...@@ -37,7 +37,7 @@ const char bfin_board_name[] = "Bluetechnix CM-BF527";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
#include <linux/usb/isp1760.h> #include <linux/usb/isp1760.h>
static struct resource bfin_isp1760_resources[] = { static struct resource bfin_isp1760_resources[] = {
[0] = { [0] = {
...@@ -72,7 +72,7 @@ static struct platform_device bfin_isp1760_device = { ...@@ -72,7 +72,7 @@ static struct platform_device bfin_isp1760_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
static struct resource musb_resources[] = { static struct resource musb_resources[] = {
[0] = { [0] = {
.start = 0xffc03800, .start = 0xffc03800,
...@@ -134,7 +134,7 @@ static struct platform_device musb_device = { ...@@ -134,7 +134,7 @@ static struct platform_device musb_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
static struct mtd_partition partition_info[] = { static struct mtd_partition partition_info[] = {
{ {
.name = "linux kernel(nand)", .name = "linux kernel(nand)",
...@@ -180,7 +180,7 @@ static struct platform_device bf5xx_nand_device = { ...@@ -180,7 +180,7 @@ static struct platform_device bf5xx_nand_device = {
}; };
#endif #endif
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
static struct resource bfin_pcmcia_cf_resources[] = { static struct resource bfin_pcmcia_cf_resources[] = {
{ {
.start = 0x20310000, /* IO PORT */ .start = 0x20310000, /* IO PORT */
...@@ -209,14 +209,14 @@ static struct platform_device bfin_pcmcia_cf_device = { ...@@ -209,14 +209,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -249,7 +249,7 @@ static struct platform_device smc91x_device = { ...@@ -249,7 +249,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
static struct resource dm9000_resources[] = { static struct resource dm9000_resources[] = {
[0] = { [0] = {
.start = 0x203FB800, .start = 0x203FB800,
...@@ -276,7 +276,7 @@ static struct platform_device dm9000_device = { ...@@ -276,7 +276,7 @@ static struct platform_device dm9000_device = {
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_RMII0; static const unsigned short bfin_mac_peripherals[] = P_RMII0;
...@@ -309,7 +309,7 @@ static struct platform_device bfin_mac_device = { ...@@ -309,7 +309,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -330,8 +330,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -330,8 +330,7 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -358,13 +357,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -358,13 +357,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -381,8 +380,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -381,8 +380,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -395,8 +393,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -395,8 +393,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -404,7 +401,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -404,7 +401,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 4, .chip_select = 4,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -414,7 +411,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -414,7 +411,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -424,7 +421,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -424,7 +421,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 2, .chip_select = 2,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ #if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
&& defined(CONFIG_SND_SOC_WM8731_SPI) && defined(CONFIG_SND_SOC_WM8731_SPI)
{ {
.modalias = "wm8731", .modalias = "wm8731",
...@@ -434,7 +431,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -434,7 +431,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -444,7 +441,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -444,7 +441,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = 8, .num_chipselect = 8,
...@@ -482,7 +479,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -482,7 +479,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
static struct mtd_partition cm_partitions[] = { static struct mtd_partition cm_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -531,7 +528,7 @@ static struct platform_device cm_flash_device = { ...@@ -531,7 +528,7 @@ static struct platform_device cm_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -642,7 +639,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -642,7 +639,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -697,7 +694,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -697,7 +694,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -725,25 +722,25 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -725,25 +722,25 @@ static struct platform_device i2c_bfin_twi_device = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("pcf8574_lcd", 0x22), I2C_BOARD_INFO("pcf8574_lcd", 0x22),
}, },
#endif #endif
#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) #if IS_ENABLED(CONFIG_INPUT_PCF8574)
{ {
I2C_BOARD_INFO("pcf8574_keypad", 0x27), I2C_BOARD_INFO("pcf8574_keypad", 0x27),
.irq = IRQ_PF8, .irq = IRQ_PF8,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_7393)
{ {
I2C_BOARD_INFO("bfin-adv7393", 0x2B), I2C_BOARD_INFO("bfin-adv7393", 0x2B),
}, },
#endif #endif
}; };
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -814,7 +811,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -814,7 +811,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -861,48 +858,48 @@ static struct platform_device *cmbf527_devices[] __initdata = { ...@@ -861,48 +858,48 @@ static struct platform_device *cmbf527_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
&bf5xx_nand_device, &bf5xx_nand_device,
#endif #endif
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
&bfin_pcmcia_cf_device, &bfin_pcmcia_cf_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
&bfin_isp1760_device, &bfin_isp1760_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
&musb_device, &musb_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
&dm9000_device, &dm9000_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -911,7 +908,7 @@ static struct platform_device *cmbf527_devices[] __initdata = { ...@@ -911,7 +908,7 @@ static struct platform_device *cmbf527_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -920,11 +917,11 @@ static struct platform_device *cmbf527_devices[] __initdata = { ...@@ -920,11 +917,11 @@ static struct platform_device *cmbf527_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -933,11 +930,11 @@ static struct platform_device *cmbf527_devices[] __initdata = { ...@@ -933,11 +930,11 @@ static struct platform_device *cmbf527_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
&cm_flash_device, &cm_flash_device,
#endif #endif
}; };
......
...@@ -36,7 +36,7 @@ const char bfin_board_name[] = "ADI BF526-EZBRD"; ...@@ -36,7 +36,7 @@ const char bfin_board_name[] = "ADI BF526-EZBRD";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
static struct resource musb_resources[] = { static struct resource musb_resources[] = {
[0] = { [0] = {
.start = 0xffc03800, .start = 0xffc03800,
...@@ -98,7 +98,7 @@ static struct platform_device musb_device = { ...@@ -98,7 +98,7 @@ static struct platform_device musb_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition ezbrd_partitions[] = { static struct mtd_partition ezbrd_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -138,7 +138,7 @@ static struct platform_device ezbrd_flash_device = { ...@@ -138,7 +138,7 @@ static struct platform_device ezbrd_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
static struct mtd_partition partition_info[] = { static struct mtd_partition partition_info[] = {
{ {
.name = "bootloader(nand)", .name = "bootloader(nand)",
...@@ -188,7 +188,7 @@ static struct platform_device bf5xx_nand_device = { ...@@ -188,7 +188,7 @@ static struct platform_device bf5xx_nand_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
...@@ -196,7 +196,7 @@ static struct platform_device rtc_device = { ...@@ -196,7 +196,7 @@ static struct platform_device rtc_device = {
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_RMII0; static const unsigned short bfin_mac_peripherals[] = P_RMII0;
...@@ -229,8 +229,7 @@ static struct platform_device bfin_mac_device = { ...@@ -229,8 +229,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -257,13 +256,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -257,13 +256,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -279,7 +278,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -279,7 +278,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
#include <linux/spi/ad7879.h> #include <linux/spi/ad7879.h>
static const struct ad7879_platform_data bfin_ad7879_ts_info = { static const struct ad7879_platform_data bfin_ad7879_ts_info = {
.model = 7879, /* Model = AD7879 */ .model = 7879, /* Model = AD7879 */
...@@ -297,8 +296,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { ...@@ -297,8 +296,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -311,7 +309,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -311,7 +309,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
...@@ -321,7 +319,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -321,7 +319,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -331,7 +329,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -331,7 +329,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 2, .chip_select = 2,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
{ {
.modalias = "ad7879", .modalias = "ad7879",
.platform_data = &bfin_ad7879_ts_info, .platform_data = &bfin_ad7879_ts_info,
...@@ -342,7 +340,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -342,7 +340,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ #if IS_ENABLED(CONFIG_SND_SOC_WM8731) \
&& defined(CONFIG_SND_SOC_WM8731_SPI) && defined(CONFIG_SND_SOC_WM8731_SPI)
{ {
.modalias = "wm8731", .modalias = "wm8731",
...@@ -352,7 +350,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -352,7 +350,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -360,7 +358,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -360,7 +358,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 1, .chip_select = 1,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
{ {
.modalias = "bfin-lq035q1-spi", .modalias = "bfin-lq035q1-spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -371,7 +369,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -371,7 +369,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = 8, .num_chipselect = 8,
...@@ -409,7 +407,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -409,7 +407,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -520,7 +518,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -520,7 +518,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -575,7 +573,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -575,7 +573,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -603,12 +601,12 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -603,12 +601,12 @@ static struct platform_device i2c_bfin_twi_device = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("pcf8574_lcd", 0x22), I2C_BOARD_INFO("pcf8574_lcd", 0x22),
}, },
#endif #endif
#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) #if IS_ENABLED(CONFIG_INPUT_PCF8574)
{ {
I2C_BOARD_INFO("pcf8574_keypad", 0x27), I2C_BOARD_INFO("pcf8574_keypad", 0x27),
.irq = IRQ_PF8, .irq = IRQ_PF8,
...@@ -616,7 +614,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -616,7 +614,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#endif #endif
}; };
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -687,7 +685,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -687,7 +685,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -731,7 +729,7 @@ static struct platform_device bfin_dpmc = { ...@@ -731,7 +729,7 @@ static struct platform_device bfin_dpmc = {
}, },
}; };
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
#include <asm/bfin-lq035q1.h> #include <asm/bfin-lq035q1.h>
static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
...@@ -764,28 +762,28 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -764,28 +762,28 @@ static struct platform_device *stamp_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
&bf5xx_nand_device, &bf5xx_nand_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
&musb_device, &musb_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -794,11 +792,11 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -794,11 +792,11 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
&bfin_lq035q1_device, &bfin_lq035q1_device,
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -807,11 +805,11 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -807,11 +805,11 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -820,11 +818,11 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -820,11 +818,11 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&ezbrd_flash_device, &ezbrd_flash_device,
#endif #endif
}; };
......
...@@ -42,7 +42,7 @@ const char bfin_board_name[] = "ADI BF527-EZKIT"; ...@@ -42,7 +42,7 @@ const char bfin_board_name[] = "ADI BF527-EZKIT";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
#include <linux/usb/isp1760.h> #include <linux/usb/isp1760.h>
static struct resource bfin_isp1760_resources[] = { static struct resource bfin_isp1760_resources[] = {
[0] = { [0] = {
...@@ -77,7 +77,7 @@ static struct platform_device bfin_isp1760_device = { ...@@ -77,7 +77,7 @@ static struct platform_device bfin_isp1760_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
static struct resource musb_resources[] = { static struct resource musb_resources[] = {
[0] = { [0] = {
.start = 0xffc03800, .start = 0xffc03800,
...@@ -139,7 +139,7 @@ static struct platform_device musb_device = { ...@@ -139,7 +139,7 @@ static struct platform_device musb_device = {
}; };
#endif #endif
#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_T350MCQB)
static struct resource bf52x_t350mcqb_resources[] = { static struct resource bf52x_t350mcqb_resources[] = {
{ {
...@@ -157,7 +157,7 @@ static struct platform_device bf52x_t350mcqb_device = { ...@@ -157,7 +157,7 @@ static struct platform_device bf52x_t350mcqb_device = {
}; };
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
#include <asm/bfin-lq035q1.h> #include <asm/bfin-lq035q1.h>
static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
...@@ -184,7 +184,7 @@ static struct platform_device bfin_lq035q1_device = { ...@@ -184,7 +184,7 @@ static struct platform_device bfin_lq035q1_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition ezkit_partitions[] = { static struct mtd_partition ezkit_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -224,7 +224,7 @@ static struct platform_device ezkit_flash_device = { ...@@ -224,7 +224,7 @@ static struct platform_device ezkit_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
static struct mtd_partition partition_info[] = { static struct mtd_partition partition_info[] = {
{ {
.name = "bootloader(nand)", .name = "bootloader(nand)",
...@@ -274,7 +274,7 @@ static struct platform_device bf5xx_nand_device = { ...@@ -274,7 +274,7 @@ static struct platform_device bf5xx_nand_device = {
}; };
#endif #endif
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
static struct resource bfin_pcmcia_cf_resources[] = { static struct resource bfin_pcmcia_cf_resources[] = {
{ {
.start = 0x20310000, /* IO PORT */ .start = 0x20310000, /* IO PORT */
...@@ -303,14 +303,14 @@ static struct platform_device bfin_pcmcia_cf_device = { ...@@ -303,14 +303,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -343,7 +343,7 @@ static struct platform_device smc91x_device = { ...@@ -343,7 +343,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
static struct resource dm9000_resources[] = { static struct resource dm9000_resources[] = {
[0] = { [0] = {
.start = 0x203FB800, .start = 0x203FB800,
...@@ -370,7 +370,7 @@ static struct platform_device dm9000_device = { ...@@ -370,7 +370,7 @@ static struct platform_device dm9000_device = {
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_RMII0; static const unsigned short bfin_mac_peripherals[] = P_RMII0;
...@@ -403,7 +403,7 @@ static struct platform_device bfin_mac_device = { ...@@ -403,7 +403,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -427,8 +427,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -427,8 +427,7 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -455,13 +454,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -455,13 +454,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -477,7 +476,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -477,7 +476,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
#include <linux/spi/ad7879.h> #include <linux/spi/ad7879.h>
static const struct ad7879_platform_data bfin_ad7879_ts_info = { static const struct ad7879_platform_data bfin_ad7879_ts_info = {
.model = 7879, /* Model = AD7879 */ .model = 7879, /* Model = AD7879 */
...@@ -493,7 +492,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { ...@@ -493,7 +492,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static const u16 bfin_snd_pin[][7] = { static const u16 bfin_snd_pin[][7] = {
{P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
...@@ -541,21 +540,21 @@ static struct resource bfin_snd_resources[][4] = { ...@@ -541,21 +540,21 @@ static struct resource bfin_snd_resources[][4] = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s_pcm = { static struct platform_device bfin_i2s_pcm = {
.name = "bfin-i2s-pcm-audio", .name = "bfin-i2s-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
static struct platform_device bfin_ac97_pcm = { static struct platform_device bfin_ac97_pcm = {
.name = "bfin-ac97-pcm-audio", .name = "bfin-ac97-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -567,8 +566,7 @@ static struct platform_device bfin_i2s = { ...@@ -567,8 +566,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-i2s.0", "bfin-i2s.0",
"spi0.4", "spi0.4",
...@@ -583,8 +581,7 @@ static struct platform_device bfin_ad1836_machine = { ...@@ -583,8 +581,7 @@ static struct platform_device bfin_ad1836_machine = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -597,8 +594,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -597,8 +594,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -608,7 +604,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -608,7 +604,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -619,7 +615,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -619,7 +615,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -629,7 +625,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -629,7 +625,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 2, .chip_select = 2,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
{ {
.modalias = "ad7879", .modalias = "ad7879",
.platform_data = &bfin_ad7879_ts_info, .platform_data = &bfin_ad7879_ts_info,
...@@ -640,7 +636,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -640,7 +636,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -648,7 +644,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -648,7 +644,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 1, .chip_select = 1,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
{ {
.modalias = "bfin-lq035q1-spi", .modalias = "bfin-lq035q1-spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -659,7 +655,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -659,7 +655,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = 8, .num_chipselect = 8,
...@@ -697,7 +693,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -697,7 +693,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -808,7 +804,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -808,7 +804,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -863,7 +859,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -863,7 +859,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -890,7 +886,7 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -890,7 +886,7 @@ static struct platform_device i2c_bfin_twi_device = {
}; };
#endif #endif
#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) #if IS_ENABLED(CONFIG_PMIC_ADP5520)
#include <linux/mfd/adp5520.h> #include <linux/mfd/adp5520.h>
/* /*
...@@ -956,54 +952,54 @@ static struct adp5520_platform_data adp5520_pdev_data = { ...@@ -956,54 +952,54 @@ static struct adp5520_platform_data adp5520_pdev_data = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("pcf8574_lcd", 0x22), I2C_BOARD_INFO("pcf8574_lcd", 0x22),
}, },
#endif #endif
#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) #if IS_ENABLED(CONFIG_INPUT_PCF8574)
{ {
I2C_BOARD_INFO("pcf8574_keypad", 0x27), I2C_BOARD_INFO("pcf8574_keypad", 0x27),
.irq = IRQ_PF8, .irq = IRQ_PF8,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_7393)
{ {
I2C_BOARD_INFO("bfin-adv7393", 0x2B), I2C_BOARD_INFO("bfin-adv7393", 0x2B),
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C)
{ {
I2C_BOARD_INFO("ad7879", 0x2C), I2C_BOARD_INFO("ad7879", 0x2C),
.irq = IRQ_PF8, .irq = IRQ_PF8,
.platform_data = (void *)&bfin_ad7879_ts_info, .platform_data = (void *)&bfin_ad7879_ts_info,
}, },
#endif #endif
#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) #if IS_ENABLED(CONFIG_PMIC_ADP5520)
{ {
I2C_BOARD_INFO("pmic-adp5520", 0x32), I2C_BOARD_INFO("pmic-adp5520", 0x32),
.irq = IRQ_PF9, .irq = IRQ_PF9,
.platform_data = (void *)&adp5520_pdev_data, .platform_data = (void *)&adp5520_pdev_data,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
{ {
I2C_BOARD_INFO("ssm2602", 0x1b), I2C_BOARD_INFO("ssm2602", 0x1b),
}, },
#endif #endif
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("ad5252", 0x2f), I2C_BOARD_INFO("ad5252", 0x2f),
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_ADAU1373)
{ {
I2C_BOARD_INFO("adau1373", 0x1A), I2C_BOARD_INFO("adau1373", 0x1A),
}, },
#endif #endif
}; };
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -1074,7 +1070,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -1074,7 +1070,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
static struct gpio_keys_button bfin_gpio_keys_table[] = { static struct gpio_keys_button bfin_gpio_keys_table[] = {
...@@ -1095,7 +1091,7 @@ static struct platform_device bfin_device_gpiokeys = { ...@@ -1095,7 +1091,7 @@ static struct platform_device bfin_device_gpiokeys = {
}; };
#endif #endif
#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
#include <asm/bfin_rotary.h> #include <asm/bfin_rotary.h>
static struct bfin_rotary_platform_data bfin_rotary_data = { static struct bfin_rotary_platform_data bfin_rotary_data = {
...@@ -1153,56 +1149,56 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -1153,56 +1149,56 @@ static struct platform_device *stamp_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
&bf5xx_nand_device, &bf5xx_nand_device,
#endif #endif
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
&bfin_pcmcia_cf_device, &bfin_pcmcia_cf_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
&bfin_isp1760_device, &bfin_isp1760_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
&musb_device, &musb_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
&dm9000_device, &dm9000_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_T350MCQB)
&bf52x_t350mcqb_device, &bf52x_t350mcqb_device,
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
&bfin_lq035q1_device, &bfin_lq035q1_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -1211,7 +1207,7 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -1211,7 +1207,7 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -1220,11 +1216,11 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -1220,11 +1216,11 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -1233,32 +1229,31 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -1233,32 +1229,31 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
&bfin_rotary_device, &bfin_rotary_device,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&ezkit_flash_device, &ezkit_flash_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s_pcm, &bfin_i2s_pcm,
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
&bfin_ac97_pcm, &bfin_ac97_pcm,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s, &bfin_i2s,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
&bfin_ad1836_machine, &bfin_ad1836_machine,
#endif #endif
}; };
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
#include <asm/portmux.h> #include <asm/portmux.h>
#include <asm/dpmc.h> #include <asm/dpmc.h>
#if defined(CONFIG_TOUCHSCREEN_AD7879) \ #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
|| defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
#include <linux/spi/ad7879.h> #include <linux/spi/ad7879.h>
#define LCD_BACKLIGHT_GPIO 0x40 #define LCD_BACKLIGHT_GPIO 0x40
/* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for /* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for
...@@ -45,7 +44,7 @@ const char bfin_board_name[] = "TLL6527M"; ...@@ -45,7 +44,7 @@ const char bfin_board_name[] = "TLL6527M";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
static struct resource musb_resources[] = { static struct resource musb_resources[] = {
[0] = { [0] = {
.start = 0xffc03800, .start = 0xffc03800,
...@@ -104,7 +103,7 @@ static struct platform_device musb_device = { ...@@ -104,7 +103,7 @@ static struct platform_device musb_device = {
}; };
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
#include <asm/bfin-lq035q1.h> #include <asm/bfin-lq035q1.h>
static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
...@@ -133,7 +132,7 @@ static struct platform_device bfin_lq035q1_device = { ...@@ -133,7 +132,7 @@ static struct platform_device bfin_lq035q1_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
static struct mtd_partition tll6527m_partitions[] = { static struct mtd_partition tll6527m_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -182,7 +181,7 @@ static struct platform_device tll6527m_flash_device = { ...@@ -182,7 +181,7 @@ static struct platform_device tll6527m_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) #if IS_ENABLED(CONFIG_GPIO_DECODER)
/* An SN74LVC138A 3:8 decoder chip has been used to generate 7 augmented /* An SN74LVC138A 3:8 decoder chip has been used to generate 7 augmented
* outputs used as SPI CS lines for all SPI SLAVE devices on TLL6527v1-0. * outputs used as SPI CS lines for all SPI SLAVE devices on TLL6527v1-0.
* EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being * EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being
...@@ -215,7 +214,7 @@ static struct platform_device spi_decoded_gpio = { ...@@ -215,7 +214,7 @@ static struct platform_device spi_decoded_gpio = {
#endif #endif
#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X)
#include <linux/input/adxl34x.h> #include <linux/input/adxl34x.h>
static const struct adxl34x_platform_data adxl345_info = { static const struct adxl34x_platform_data adxl345_info = {
.x_axis_offset = 0, .x_axis_offset = 0,
...@@ -250,14 +249,14 @@ static const struct adxl34x_platform_data adxl345_info = { ...@@ -250,14 +249,14 @@ static const struct adxl34x_platform_data adxl345_info = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_RMII0; static const unsigned short bfin_mac_peripherals[] = P_RMII0;
...@@ -290,8 +289,7 @@ static struct platform_device bfin_mac_device = { ...@@ -290,8 +289,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -318,14 +316,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -318,14 +316,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879) \ #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
|| defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
static const struct ad7879_platform_data bfin_ad7879_ts_info = { static const struct ad7879_platform_data bfin_ad7879_ts_info = {
.model = 7879, /* Model = AD7879 */ .model = 7879, /* Model = AD7879 */
.x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */ .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
...@@ -343,7 +340,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { ...@@ -343,7 +340,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -351,7 +348,7 @@ static struct platform_device bfin_i2s = { ...@@ -351,7 +348,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) #if IS_ENABLED(CONFIG_GPIO_MCP23S08)
#include <linux/spi/mcp23s08.h> #include <linux/spi/mcp23s08.h>
static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = {
.chip[0].is_present = true, .chip[0].is_present = true,
...@@ -364,8 +361,7 @@ static const struct mcp23s08_platform_data bfin_mcp23s08_usr_gpio_info = { ...@@ -364,8 +361,7 @@ static const struct mcp23s08_platform_data bfin_mcp23s08_usr_gpio_info = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -381,7 +377,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -381,7 +377,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
/* /*
...@@ -396,8 +392,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -396,8 +392,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \ #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
|| defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
{ {
.modalias = "ad7879", .modalias = "ad7879",
.platform_data = &bfin_ad7879_ts_info, .platform_data = &bfin_ad7879_ts_info,
...@@ -409,7 +404,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -409,7 +404,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 10000000, .max_speed_hz = 10000000,
...@@ -419,7 +414,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -419,7 +414,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
{ {
.modalias = "bfin-lq035q1-spi", .modalias = "bfin-lq035q1-spi",
.max_speed_hz = 20000000, .max_speed_hz = 20000000,
...@@ -428,7 +423,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -428,7 +423,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) #if IS_ENABLED(CONFIG_GPIO_MCP23S08)
{ {
.modalias = "mcp23s08", .modalias = "mcp23s08",
.platform_data = &bfin_mcp23s08_sys_gpio_info, .platform_data = &bfin_mcp23s08_sys_gpio_info,
...@@ -448,7 +443,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -448,7 +443,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS, .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS,
...@@ -487,7 +482,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -487,7 +482,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -600,7 +595,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -600,7 +595,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -655,7 +650,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -655,7 +650,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -683,26 +678,25 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -683,26 +678,25 @@ static struct platform_device i2c_bfin_twi_device = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("pcf8574_lcd", 0x22), I2C_BOARD_INFO("pcf8574_lcd", 0x22),
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_7393)
{ {
I2C_BOARD_INFO("bfin-adv7393", 0x2B), I2C_BOARD_INFO("bfin-adv7393", 0x2B),
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) \ #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C)
|| defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE)
{ {
I2C_BOARD_INFO("ad7879", 0x2C), I2C_BOARD_INFO("ad7879", 0x2C),
.irq = IRQ_PH14, .irq = IRQ_PH14,
.platform_data = (void *)&bfin_ad7879_ts_info, .platform_data = (void *)&bfin_ad7879_ts_info,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
{ {
I2C_BOARD_INFO("ssm2602", 0x1b), I2C_BOARD_INFO("ssm2602", 0x1b),
}, },
...@@ -714,8 +708,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -714,8 +708,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
{ {
I2C_BOARD_INFO("ltc3576", 0x09), I2C_BOARD_INFO("ltc3576", 0x09),
}, },
#if defined(CONFIG_INPUT_ADXL34X_I2C) \ #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
|| defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
{ {
I2C_BOARD_INFO("adxl34x", 0x53), I2C_BOARD_INFO("adxl34x", 0x53),
.irq = IRQ_PH13, .irq = IRQ_PH13,
...@@ -724,8 +717,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -724,8 +717,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#endif #endif
}; };
#if defined(CONFIG_SERIAL_BFIN_SPORT) \ #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
|| defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -823,28 +815,28 @@ static struct platform_device *tll6527m_devices[] __initdata = { ...@@ -823,28 +815,28 @@ static struct platform_device *tll6527m_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
&musb_device, &musb_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
&bfin_lq035q1_device, &bfin_lq035q1_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -853,7 +845,7 @@ static struct platform_device *tll6527m_devices[] __initdata = { ...@@ -853,7 +845,7 @@ static struct platform_device *tll6527m_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -862,12 +854,11 @@ static struct platform_device *tll6527m_devices[] __initdata = { ...@@ -862,12 +854,11 @@ static struct platform_device *tll6527m_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) \ #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
|| defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -876,15 +867,15 @@ static struct platform_device *tll6527m_devices[] __initdata = { ...@@ -876,15 +867,15 @@ static struct platform_device *tll6527m_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
&tll6527m_flash_device, &tll6527m_flash_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s, &bfin_i2s,
#endif #endif
#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE) #if IS_ENABLED(CONFIG_GPIO_DECODER)
&spi_decoded_gpio, &spi_decoded_gpio,
#endif #endif
}; };
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/irq.h> #include <linux/irq.h>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
*/ */
const char bfin_board_name[] = "HV Sistemas H8606"; const char bfin_board_name[] = "HV Sistemas H8606";
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
...@@ -39,7 +39,7 @@ static struct platform_device rtc_device = { ...@@ -39,7 +39,7 @@ static struct platform_device rtc_device = {
/* /*
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
static struct resource dm9000_resources[] = { static struct resource dm9000_resources[] = {
[0] = { [0] = {
.start = 0x20300000, .start = 0x20300000,
...@@ -67,7 +67,7 @@ static struct platform_device dm9000_device = { ...@@ -67,7 +67,7 @@ static struct platform_device dm9000_device = {
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -104,7 +104,7 @@ static struct platform_device smc91x_device = { ...@@ -104,7 +104,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -125,10 +125,10 @@ static struct platform_device net2272_bfin_device = { ...@@ -125,10 +125,10 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader (spi)", .name = "bootloader (spi)",
...@@ -166,7 +166,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -166,7 +166,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
/* Notice: for blackfin, the speed_hz is the value of register /* Notice: for blackfin, the speed_hz is the value of register
* SPI_BAUD, not the real baudrate */ * SPI_BAUD, not the real baudrate */
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -180,7 +180,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -180,7 +180,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 16, .max_speed_hz = 16,
...@@ -229,7 +229,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -229,7 +229,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -280,7 +280,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -280,7 +280,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -309,7 +309,7 @@ static struct platform_device bfin_sir0_device = { ...@@ -309,7 +309,7 @@ static struct platform_device bfin_sir0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) #if IS_ENABLED(CONFIG_SERIAL_8250)
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/serial.h> #include <linux/serial.h>
...@@ -353,7 +353,7 @@ static struct platform_device serial8250_device = { ...@@ -353,7 +353,7 @@ static struct platform_device serial8250_device = {
#endif #endif
#if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_OPENCORES)
/* /*
* Configuration for one OpenCores keyboard controller in FPGA at address 0x20200030, * Configuration for one OpenCores keyboard controller in FPGA at address 0x20200030,
...@@ -382,43 +382,43 @@ static struct platform_device opencores_kbd_device = { ...@@ -382,43 +382,43 @@ static struct platform_device opencores_kbd_device = {
#endif #endif
static struct platform_device *h8606_devices[] __initdata = { static struct platform_device *h8606_devices[] __initdata = {
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
&dm9000_device, &dm9000_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) #if IS_ENABLED(CONFIG_SERIAL_8250)
&serial8250_device, &serial8250_device,
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_OPENCORES)
&opencores_kbd_device, &opencores_kbd_device,
#endif #endif
}; };
...@@ -428,7 +428,7 @@ static int __init H8606_init(void) ...@@ -428,7 +428,7 @@ static int __init H8606_init(void)
printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n"); printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n");
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices)); platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif #endif
return 0; return 0;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
const char bfin_board_name[] = "BlackStamp"; const char bfin_board_name[] = "BlackStamp";
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
...@@ -41,7 +41,7 @@ static struct platform_device rtc_device = { ...@@ -41,7 +41,7 @@ static struct platform_device rtc_device = {
/* /*
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -74,7 +74,7 @@ static struct platform_device smc91x_device = { ...@@ -74,7 +74,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -105,14 +105,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -105,14 +105,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -125,7 +125,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -125,7 +125,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -136,7 +136,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -136,7 +136,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -146,7 +146,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -146,7 +146,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -184,7 +184,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -184,7 +184,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -235,7 +235,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -235,7 +235,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -264,7 +264,7 @@ static struct platform_device bfin_sir0_device = { ...@@ -264,7 +264,7 @@ static struct platform_device bfin_sir0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -335,7 +335,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -335,7 +335,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -358,7 +358,7 @@ static struct platform_device bfin_device_gpiokeys = { ...@@ -358,7 +358,7 @@ static struct platform_device bfin_device_gpiokeys = {
}; };
#endif #endif
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) #if IS_ENABLED(CONFIG_I2C_GPIO)
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
static struct i2c_gpio_platform_data i2c_gpio_data = { static struct i2c_gpio_platform_data i2c_gpio_data = {
...@@ -413,32 +413,32 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -413,32 +413,32 @@ static struct platform_device *stamp_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -447,11 +447,11 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -447,11 +447,11 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) #if IS_ENABLED(CONFIG_I2C_GPIO)
&i2c_gpio_device, &i2c_gpio_device,
#endif #endif
}; };
...@@ -469,7 +469,7 @@ static int __init blackstamp_init(void) ...@@ -469,7 +469,7 @@ static int __init blackstamp_init(void)
if (ret < 0) if (ret < 0)
return ret; return ret;
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
/* /*
* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC. * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
* the bfin-async-map driver takes care of flipping between * the bfin-async-map driver takes care of flipping between
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/spi/mmc_spi.h> #include <linux/spi/mmc_spi.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/irq.h> #include <linux/irq.h>
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
*/ */
const char bfin_board_name[] = "Bluetechnix CM BF533"; const char bfin_board_name[] = "Bluetechnix CM BF533";
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -62,14 +62,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -62,14 +62,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -82,7 +82,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -82,7 +82,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -91,7 +91,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -91,7 +91,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -140,14 +140,14 @@ static struct platform_device bfin_spi0_device = { ...@@ -140,14 +140,14 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -178,7 +178,7 @@ static struct platform_device smc91x_device = { ...@@ -178,7 +178,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
static struct resource smsc911x_resources[] = { static struct resource smsc911x_resources[] = {
...@@ -212,7 +212,7 @@ static struct platform_device smsc911x_device = { ...@@ -212,7 +212,7 @@ static struct platform_device smsc911x_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -263,7 +263,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -263,7 +263,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -292,7 +292,7 @@ static struct platform_device bfin_sir0_device = { ...@@ -292,7 +292,7 @@ static struct platform_device bfin_sir0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -363,7 +363,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -363,7 +363,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
static struct resource isp1362_hcd_resources[] = { static struct resource isp1362_hcd_resources[] = {
{ {
.start = 0x20308000, .start = 0x20308000,
...@@ -403,7 +403,7 @@ static struct platform_device isp1362_hcd_device = { ...@@ -403,7 +403,7 @@ static struct platform_device isp1362_hcd_device = {
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -426,7 +426,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -426,7 +426,7 @@ static struct platform_device net2272_bfin_device = {
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition para_partitions[] = { static struct mtd_partition para_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -495,19 +495,19 @@ static struct platform_device *cm_bf533_devices[] __initdata = { ...@@ -495,19 +495,19 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -516,31 +516,31 @@ static struct platform_device *cm_bf533_devices[] __initdata = { ...@@ -516,31 +516,31 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
&isp1362_hcd_device, &isp1362_hcd_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
&smsc911x_device, &smsc911x_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&para_flash_device, &para_flash_device,
#endif #endif
}; };
...@@ -549,7 +549,7 @@ static int __init cm_bf533_init(void) ...@@ -549,7 +549,7 @@ static int __init cm_bf533_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(cm_bf533_devices, ARRAY_SIZE(cm_bf533_devices)); platform_add_devices(cm_bf533_devices, ARRAY_SIZE(cm_bf533_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif #endif
return 0; return 0;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/irq.h> #include <linux/irq.h>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
*/ */
const char bfin_board_name[] = "ADI BF533-EZKIT"; const char bfin_board_name[] = "ADI BF533-EZKIT";
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
...@@ -40,7 +40,7 @@ static struct platform_device rtc_device = { ...@@ -40,7 +40,7 @@ static struct platform_device rtc_device = {
* USB-LAN EzExtender board * USB-LAN EzExtender board
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -72,7 +72,7 @@ static struct platform_device smc91x_device = { ...@@ -72,7 +72,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition ezkit_partitions_a[] = { static struct mtd_partition ezkit_partitions_a[] = {
{ {
.name = "bootloader(nor a)", .name = "bootloader(nor a)",
...@@ -138,7 +138,7 @@ static struct platform_device ezkit_flash_device_b = { ...@@ -138,7 +138,7 @@ static struct platform_device ezkit_flash_device_b = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) #if IS_ENABLED(CONFIG_MTD_PLATRAM)
static struct platdata_mtd_ram sram_data_a = { static struct platdata_mtd_ram sram_data_a = {
.mapname = "Flash A SRAM", .mapname = "Flash A SRAM",
.bankwidth = 2, .bankwidth = 2,
...@@ -182,7 +182,7 @@ static struct platform_device sram_device_b = { ...@@ -182,7 +182,7 @@ static struct platform_device sram_device_b = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -214,7 +214,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -214,7 +214,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -227,7 +227,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -227,7 +227,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -235,7 +235,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -235,7 +235,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 4, .chip_select = 4,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -245,7 +245,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -245,7 +245,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -283,7 +283,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -283,7 +283,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -334,7 +334,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -334,7 +334,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -363,7 +363,7 @@ static struct platform_device bfin_sir0_device = { ...@@ -363,7 +363,7 @@ static struct platform_device bfin_sir0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -387,7 +387,7 @@ static struct platform_device bfin_device_gpiokeys = { ...@@ -387,7 +387,7 @@ static struct platform_device bfin_device_gpiokeys = {
}; };
#endif #endif
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) #if IS_ENABLED(CONFIG_I2C_GPIO)
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
static struct i2c_gpio_platform_data i2c_gpio_data = { static struct i2c_gpio_platform_data i2c_gpio_data = {
...@@ -435,14 +435,14 @@ static struct platform_device bfin_dpmc = { ...@@ -435,14 +435,14 @@ static struct platform_device bfin_dpmc = {
}; };
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_7393)
{ {
I2C_BOARD_INFO("bfin-adv7393", 0x2B), I2C_BOARD_INFO("bfin-adv7393", 0x2B),
}, },
#endif #endif
}; };
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -450,7 +450,7 @@ static struct platform_device bfin_i2s = { ...@@ -450,7 +450,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
static struct platform_device bfin_ac97 = { static struct platform_device bfin_ac97 = {
.name = "bfin-ac97", .name = "bfin-ac97",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -462,53 +462,53 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -462,53 +462,53 @@ static struct platform_device *ezkit_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&ezkit_flash_device_a, &ezkit_flash_device_a,
&ezkit_flash_device_b, &ezkit_flash_device_b,
#endif #endif
#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) #if IS_ENABLED(CONFIG_MTD_PLATRAM)
&sram_device_a, &sram_device_a,
&sram_device_b, &sram_device_b,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) #if IS_ENABLED(CONFIG_I2C_GPIO)
&i2c_gpio_device, &i2c_gpio_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s, &bfin_i2s,
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
&bfin_ac97, &bfin_ac97,
#endif #endif
}; };
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <asm/irq.h> #include <asm/irq.h>
...@@ -32,7 +32,7 @@ const char bfin_board_name[] = "IP04/IP08"; ...@@ -32,7 +32,7 @@ const char bfin_board_name[] = "IP04/IP08";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_BFIN532_IP0X) #if defined(CONFIG_BFIN532_IP0X)
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
#include <linux/dm9000.h> #include <linux/dm9000.h>
...@@ -104,10 +104,10 @@ static struct platform_device dm9000_device2 = { ...@@ -104,10 +104,10 @@ static struct platform_device dm9000_device2 = {
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, /* if 1 - block!!! */ .enable_dma = 0, /* if 1 - block!!! */
}; };
...@@ -116,7 +116,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = { ...@@ -116,7 +116,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
/* Notice: for blackfin, the speed_hz is the value of register /* Notice: for blackfin, the speed_hz is the value of register
* SPI_BAUD, not the real baudrate */ * SPI_BAUD, not the real baudrate */
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 2, .max_speed_hz = 2,
...@@ -142,7 +142,7 @@ static struct platform_device spi_bfin_master_device = { ...@@ -142,7 +142,7 @@ static struct platform_device spi_bfin_master_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -193,7 +193,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -193,7 +193,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -222,7 +222,7 @@ static struct platform_device bfin_sir0_device = { ...@@ -222,7 +222,7 @@ static struct platform_device bfin_sir0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
static struct resource isp1362_hcd_resources[] = { static struct resource isp1362_hcd_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -264,29 +264,29 @@ static struct platform_device isp1362_hcd_device = { ...@@ -264,29 +264,29 @@ static struct platform_device isp1362_hcd_device = {
static struct platform_device *ip0x_devices[] __initdata = { static struct platform_device *ip0x_devices[] __initdata = {
#if defined(CONFIG_BFIN532_IP0X) #if defined(CONFIG_BFIN532_IP0X)
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
&dm9000_device1, &dm9000_device1,
&dm9000_device2, &dm9000_device2,
#endif #endif
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&spi_bfin_master_device, &spi_bfin_master_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
&isp1362_hcd_device, &isp1362_hcd_device,
#endif #endif
}; };
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#include <linux/spi/mmc_spi.h> #include <linux/spi/mmc_spi.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/irq.h> #include <linux/irq.h>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
*/ */
const char bfin_board_name[] = "ADI BF533-STAMP"; const char bfin_board_name[] = "ADI BF533-STAMP";
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
...@@ -40,7 +40,7 @@ static struct platform_device rtc_device = { ...@@ -40,7 +40,7 @@ static struct platform_device rtc_device = {
/* /*
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -73,7 +73,7 @@ static struct platform_device smc91x_device = { ...@@ -73,7 +73,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -97,7 +97,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -97,7 +97,7 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) #if IS_ENABLED(CONFIG_MTD_BFIN_ASYNC)
static struct mtd_partition stamp_partitions[] = { static struct mtd_partition stamp_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -147,7 +147,7 @@ static struct platform_device stamp_flash_device = { ...@@ -147,7 +147,7 @@ static struct platform_device stamp_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -178,7 +178,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -178,7 +178,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
#define MMC_SPI_CARD_DETECT_INT IRQ_PF5 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5
static int bfin_mmc_spi_init(struct device *dev, static int bfin_mmc_spi_init(struct device *dev,
irqreturn_t (*detect_int)(int, void *), void *data) irqreturn_t (*detect_int)(int, void *), void *data)
...@@ -206,7 +206,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = { ...@@ -206,7 +206,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -219,8 +219,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -219,8 +219,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
{ {
.modalias = "ad1836", .modalias = "ad1836",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -231,7 +230,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -231,7 +230,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -239,7 +238,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -239,7 +238,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 1, .chip_select = 1,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -252,7 +251,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -252,7 +251,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -290,7 +289,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -290,7 +289,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -341,7 +340,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -341,7 +340,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -370,8 +369,7 @@ static struct platform_device bfin_sir0_device = { ...@@ -370,8 +369,7 @@ static struct platform_device bfin_sir0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || \ #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -442,7 +440,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -442,7 +440,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_BFIN_SPORT)
static struct resource bfin_sport0_resources[] = { static struct resource bfin_sport0_resources[] = {
{ {
.start = SPORT0_TCR1, .start = SPORT0_TCR1,
...@@ -486,7 +484,7 @@ static struct platform_device bfin_sport0_device = { ...@@ -486,7 +484,7 @@ static struct platform_device bfin_sport0_device = {
}; };
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -509,7 +507,7 @@ static struct platform_device bfin_device_gpiokeys = { ...@@ -509,7 +507,7 @@ static struct platform_device bfin_device_gpiokeys = {
}; };
#endif #endif
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) #if IS_ENABLED(CONFIG_I2C_GPIO)
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
static struct i2c_gpio_platform_data i2c_gpio_data = { static struct i2c_gpio_platform_data i2c_gpio_data = {
...@@ -530,29 +528,29 @@ static struct platform_device i2c_gpio_device = { ...@@ -530,29 +528,29 @@ static struct platform_device i2c_gpio_device = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info[] = { static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) #if IS_ENABLED(CONFIG_JOYSTICK_AD7142)
{ {
I2C_BOARD_INFO("ad7142_joystick", 0x2C), I2C_BOARD_INFO("ad7142_joystick", 0x2C),
.irq = 39, .irq = 39,
}, },
#endif #endif
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("pcf8574_lcd", 0x22), I2C_BOARD_INFO("pcf8574_lcd", 0x22),
}, },
#endif #endif
#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) #if IS_ENABLED(CONFIG_INPUT_PCF8574)
{ {
I2C_BOARD_INFO("pcf8574_keypad", 0x27), I2C_BOARD_INFO("pcf8574_keypad", 0x27),
.irq = 39, .irq = 39,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_7393)
{ {
I2C_BOARD_INFO("bfin-adv7393", 0x2B), I2C_BOARD_INFO("bfin-adv7393", 0x2B),
}, },
#endif #endif
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("ad5252", 0x2f), I2C_BOARD_INFO("ad5252", 0x2f),
}, },
...@@ -586,9 +584,8 @@ static struct platform_device bfin_dpmc = { ...@@ -586,9 +584,8 @@ static struct platform_device bfin_dpmc = {
}, },
}; };
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \
defined(CONFIG_SND_BF5XX_AC97) || \ IS_ENABLED(CONFIG_SND_BF5XX_AC97)
defined(CONFIG_SND_BF5XX_AC97_MODULE)
#include <asm/bfin_sport.h> #include <asm/bfin_sport.h>
...@@ -640,22 +637,21 @@ static struct resource bfin_snd_resources[][4] = { ...@@ -640,22 +637,21 @@ static struct resource bfin_snd_resources[][4] = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s_pcm = { static struct platform_device bfin_i2s_pcm = {
.name = "bfin-i2s-pcm-audio", .name = "bfin-i2s-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
static struct platform_device bfin_ac97_pcm = { static struct platform_device bfin_ac97_pcm = {
.name = "bfin-ac97-pcm-audio", .name = "bfin-ac97-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-i2s.0", "bfin-i2s.0",
"spi0.4", "spi0.4",
...@@ -669,8 +665,7 @@ static struct platform_device bfin_ad1836_machine = { ...@@ -669,8 +665,7 @@ static struct platform_device bfin_ad1836_machine = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
static const unsigned ad73311_gpio[] = { static const unsigned ad73311_gpio[] = {
GPIO_PF4, GPIO_PF4,
}; };
...@@ -684,22 +679,21 @@ static struct platform_device bfin_ad73311_machine = { ...@@ -684,22 +679,21 @@ static struct platform_device bfin_ad73311_machine = {
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_AD73311)
static struct platform_device bfin_ad73311_codec_device = { static struct platform_device bfin_ad73311_codec_device = {
.name = "ad73311", .name = "ad73311",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_AD74111)
static struct platform_device bfin_ad74111_codec_device = { static struct platform_device bfin_ad74111_codec_device = {
.name = "ad74111", .name = "ad74111",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_I2S) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -712,8 +706,7 @@ static struct platform_device bfin_i2s = { ...@@ -712,8 +706,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AC97) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
static struct platform_device bfin_ac97 = { static struct platform_device bfin_ac97 = {
.name = "bfin-ac97", .name = "bfin-ac97",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -730,36 +723,35 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -730,36 +723,35 @@ static struct platform_device *stamp_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || \ #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -768,58 +760,54 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -768,58 +760,54 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) #if IS_ENABLED(CONFIG_I2C_GPIO)
&i2c_gpio_device, &i2c_gpio_device,
#endif #endif
#if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) #if IS_ENABLED(CONFIG_MTD_BFIN_ASYNC)
&stamp_flash_device, &stamp_flash_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s_pcm, &bfin_i2s_pcm,
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
&bfin_ac97_pcm, &bfin_ac97_pcm,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
&bfin_ad1836_machine, &bfin_ad1836_machine,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
&bfin_ad73311_machine, &bfin_ad73311_machine,
#endif #endif
#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_AD73311)
&bfin_ad73311_codec_device, &bfin_ad73311_codec_device,
#endif #endif
#if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_AD74111)
&bfin_ad74111_codec_device, &bfin_ad74111_codec_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_I2S) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
&bfin_i2s, &bfin_i2s,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AC97) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
&bfin_ac97, &bfin_ac97,
#endif #endif
}; };
static int __init net2272_init(void) static int __init net2272_init(void)
{ {
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
int ret; int ret;
/* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */ /* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */
...@@ -865,7 +853,7 @@ static int __init stamp_init(void) ...@@ -865,7 +853,7 @@ static int __init stamp_init(void)
if (ret < 0) if (ret < 0)
return ret; return ret;
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
/* /*
* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC. * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
* the bfin-async-map driver takes care of flipping between * the bfin-async-map driver takes care of flipping between
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
*/ */
const char bfin_board_name[] = "Bluetechnix CM BF537E"; const char bfin_board_name[] = "Bluetechnix CM BF537E";
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -66,14 +66,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -66,14 +66,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -86,7 +86,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -86,7 +86,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .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,7 +95,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -144,7 +144,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -144,7 +144,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
/* SPORT SPI controller data */ /* SPORT SPI controller data */
static struct bfin5xx_spi_master bfin_sport_spi0_info = { static struct bfin5xx_spi_master bfin_sport_spi0_info = {
...@@ -209,20 +209,20 @@ static struct platform_device bfin_sport_spi1_device = { ...@@ -209,20 +209,20 @@ static struct platform_device bfin_sport_spi1_device = {
#endif /* sport spi master and devices */ #endif /* sport spi master and devices */
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
static struct platform_device hitachi_fb_device = { static struct platform_device hitachi_fb_device = {
.name = "hitachi-tx09", .name = "hitachi-tx09",
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -254,7 +254,7 @@ static struct platform_device smc91x_device = { ...@@ -254,7 +254,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
static struct resource isp1362_hcd_resources[] = { static struct resource isp1362_hcd_resources[] = {
{ {
.start = 0x20308000, .start = 0x20308000,
...@@ -293,7 +293,7 @@ static struct platform_device isp1362_hcd_device = { ...@@ -293,7 +293,7 @@ static struct platform_device isp1362_hcd_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -314,7 +314,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -314,7 +314,7 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
static struct mtd_partition cm_partitions[] = { static struct mtd_partition cm_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -363,7 +363,7 @@ static struct platform_device cm_flash_device = { ...@@ -363,7 +363,7 @@ static struct platform_device cm_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -498,7 +498,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -498,7 +498,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -551,7 +551,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -551,7 +551,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -578,14 +578,14 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -578,14 +578,14 @@ static struct platform_device i2c_bfin_twi_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) \ #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) \
|| defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) || IS_ENABLED(CONFIG_BFIN_SPORT)
unsigned short bfin_sport0_peripherals[] = { unsigned short bfin_sport0_peripherals[] = {
P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -650,7 +650,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -650,7 +650,7 @@ static struct platform_device bfin_sport1_uart_device = {
}; };
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_BFIN_SPORT)
static struct resource bfin_sport0_resources[] = { static struct resource bfin_sport0_resources[] = {
{ {
.start = SPORT0_TCR1, .start = SPORT0_TCR1,
...@@ -694,7 +694,7 @@ static struct platform_device bfin_sport0_device = { ...@@ -694,7 +694,7 @@ static struct platform_device bfin_sport0_device = {
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_MII0; static const unsigned short bfin_mac_peripherals[] = P_MII0;
...@@ -727,7 +727,7 @@ static struct platform_device bfin_mac_device = { ...@@ -727,7 +727,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
#define PATA_INT IRQ_PF14 #define PATA_INT IRQ_PF14
static struct pata_platform_info bfin_pata_platform_data = { static struct pata_platform_info bfin_pata_platform_data = {
...@@ -795,19 +795,19 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { ...@@ -795,19 +795,19 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_BFIN_SPORT)
&bfin_sport0_device, &bfin_sport0_device,
#endif #endif
#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
&hitachi_fb_device, &hitachi_fb_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -816,7 +816,7 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { ...@@ -816,7 +816,7 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -825,11 +825,11 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { ...@@ -825,11 +825,11 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -838,44 +838,44 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { ...@@ -838,44 +838,44 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
&isp1362_hcd_device, &isp1362_hcd_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
&bfin_sport_spi0_device, &bfin_sport_spi0_device,
&bfin_sport_spi1_device, &bfin_sport_spi1_device,
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
&bfin_pata_device, &bfin_pata_device,
#endif #endif
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
&cm_flash_device, &cm_flash_device,
#endif #endif
}; };
static int __init net2272_init(void) static int __init net2272_init(void)
{ {
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
int ret; int ret;
ret = gpio_request(GPIO_PG14, "net2272"); ret = gpio_request(GPIO_PG14, "net2272");
...@@ -895,11 +895,11 @@ static int __init cm_bf537e_init(void) ...@@ -895,11 +895,11 @@ static int __init cm_bf537e_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices)); platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
#endif #endif
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
*/ */
const char bfin_board_name[] = "Bluetechnix CM BF537U"; const char bfin_board_name[] = "Bluetechnix CM BF537U";
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -66,14 +66,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -66,14 +66,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -86,7 +86,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -86,7 +86,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .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,7 +95,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -144,20 +144,20 @@ static struct platform_device bfin_spi0_device = { ...@@ -144,20 +144,20 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
static struct platform_device hitachi_fb_device = { static struct platform_device hitachi_fb_device = {
.name = "hitachi-tx09", .name = "hitachi-tx09",
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -189,7 +189,7 @@ static struct platform_device smc91x_device = { ...@@ -189,7 +189,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
static struct resource isp1362_hcd_resources[] = { static struct resource isp1362_hcd_resources[] = {
{ {
.start = 0x20308000, .start = 0x20308000,
...@@ -228,7 +228,7 @@ static struct platform_device isp1362_hcd_device = { ...@@ -228,7 +228,7 @@ static struct platform_device isp1362_hcd_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20200000, .start = 0x20200000,
...@@ -249,7 +249,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -249,7 +249,7 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
static struct mtd_partition cm_partitions[] = { static struct mtd_partition cm_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -298,7 +298,7 @@ static struct platform_device cm_flash_device = { ...@@ -298,7 +298,7 @@ static struct platform_device cm_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -397,7 +397,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -397,7 +397,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -450,7 +450,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -450,7 +450,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -477,7 +477,7 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -477,7 +477,7 @@ static struct platform_device i2c_bfin_twi_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -548,7 +548,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -548,7 +548,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_MII0; static const unsigned short bfin_mac_peripherals[] = P_MII0;
...@@ -581,7 +581,7 @@ static struct platform_device bfin_mac_device = { ...@@ -581,7 +581,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
#define PATA_INT IRQ_PF14 #define PATA_INT IRQ_PF14
static struct pata_platform_info bfin_pata_platform_data = { static struct pata_platform_info bfin_pata_platform_data = {
...@@ -649,15 +649,15 @@ static struct platform_device *cm_bf537u_devices[] __initdata = { ...@@ -649,15 +649,15 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
&hitachi_fb_device, &hitachi_fb_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -666,7 +666,7 @@ static struct platform_device *cm_bf537u_devices[] __initdata = { ...@@ -666,7 +666,7 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -675,11 +675,11 @@ static struct platform_device *cm_bf537u_devices[] __initdata = { ...@@ -675,11 +675,11 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -688,39 +688,39 @@ static struct platform_device *cm_bf537u_devices[] __initdata = { ...@@ -688,39 +688,39 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
&isp1362_hcd_device, &isp1362_hcd_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
&bfin_pata_device, &bfin_pata_device,
#endif #endif
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
&cm_flash_device, &cm_flash_device,
#endif #endif
}; };
static int __init net2272_init(void) static int __init net2272_init(void)
{ {
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
int ret; int ret;
ret = gpio_request(GPIO_PH15, driver_name); ret = gpio_request(GPIO_PH15, driver_name);
...@@ -752,11 +752,11 @@ static int __init cm_bf537u_init(void) ...@@ -752,11 +752,11 @@ static int __init cm_bf537u_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices)); platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
#endif #endif
......
...@@ -41,14 +41,14 @@ const char bfin_board_name[] = "DNP/5370"; ...@@ -41,14 +41,14 @@ const char bfin_board_name[] = "DNP/5370";
#define FLASH_MAC 0x202f0000 #define FLASH_MAC 0x202f0000
#define CONFIG_MTD_PHYSMAP_LEN 0x300000 #define CONFIG_MTD_PHYSMAP_LEN 0x300000
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_RMII0; static const unsigned short bfin_mac_peripherals[] = P_RMII0;
...@@ -81,7 +81,7 @@ static struct platform_device bfin_mac_device = { ...@@ -81,7 +81,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition asmb_flash_partitions[] = { static struct mtd_partition asmb_flash_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -125,9 +125,9 @@ static struct platform_device asmb_flash_device = { ...@@ -125,9 +125,9 @@ static struct platform_device asmb_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, /* use no dma transfer with this chip*/ .enable_dma = 0, /* use no dma transfer with this chip*/
...@@ -135,7 +135,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = { ...@@ -135,7 +135,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
#endif #endif
#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) #if IS_ENABLED(CONFIG_MTD_DATAFLASH)
/* This mapping is for at45db642 it has 1056 page size, /* This mapping is for at45db642 it has 1056 page size,
* partition size and offset should be page aligned * partition size and offset should be page aligned
*/ */
...@@ -166,7 +166,7 @@ static struct bfin5xx_spi_chip spi_dataflash_chip_info = { ...@@ -166,7 +166,7 @@ static struct bfin5xx_spi_chip spi_dataflash_chip_info = {
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
/* SD/MMC card reader at SPI bus */ /* SD/MMC card reader at SPI bus */
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, .max_speed_hz = 20000000,
...@@ -178,7 +178,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -178,7 +178,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
/* 8 Megabyte Atmel NOR flash chip at SPI bus */ /* 8 Megabyte Atmel NOR flash chip at SPI bus */
#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) #if IS_ENABLED(CONFIG_MTD_DATAFLASH)
{ {
.modalias = "mtd_dataflash", .modalias = "mtd_dataflash",
.max_speed_hz = 16700000, .max_speed_hz = 16700000,
...@@ -228,7 +228,7 @@ static struct platform_device spi_bfin_master_device = { ...@@ -228,7 +228,7 @@ static struct platform_device spi_bfin_master_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -328,7 +328,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -328,7 +328,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -357,7 +357,7 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -357,7 +357,7 @@ static struct platform_device i2c_bfin_twi_device = {
static struct platform_device *dnp5370_devices[] __initdata = { static struct platform_device *dnp5370_devices[] __initdata = {
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -366,24 +366,24 @@ static struct platform_device *dnp5370_devices[] __initdata = { ...@@ -366,24 +366,24 @@ static struct platform_device *dnp5370_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&asmb_flash_device, &asmb_flash_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&spi_bfin_master_device, &spi_bfin_master_device,
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
*/ */
const char bfin_board_name[] = "CamSig Minotaur BF537"; const char bfin_board_name[] = "CamSig Minotaur BF537";
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
static struct resource bfin_pcmcia_cf_resources[] = { static struct resource bfin_pcmcia_cf_resources[] = {
{ {
.start = 0x20310000, /* IO PORT */ .start = 0x20310000, /* IO PORT */
...@@ -60,14 +60,14 @@ static struct platform_device bfin_pcmcia_cf_device = { ...@@ -60,14 +60,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_MII0; static const unsigned short bfin_mac_peripherals[] = P_MII0;
...@@ -100,7 +100,7 @@ static struct platform_device bfin_mac_device = { ...@@ -100,7 +100,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -121,11 +121,10 @@ static struct platform_device net2272_bfin_device = { ...@@ -121,11 +121,10 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
/* Partition sizes */ /* Partition sizes */
#define FLASH_SIZE 0x00400000 #define FLASH_SIZE 0x00400000
...@@ -162,15 +161,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -162,15 +161,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -183,7 +181,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -183,7 +181,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
...@@ -231,7 +229,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -231,7 +229,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -330,7 +328,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -330,7 +328,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -385,7 +383,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -385,7 +383,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -412,7 +410,7 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -412,7 +410,7 @@ static struct platform_device i2c_bfin_twi_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -484,28 +482,28 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -484,28 +482,28 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
static struct platform_device *minotaur_devices[] __initdata = { static struct platform_device *minotaur_devices[] __initdata = {
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
&bfin_pcmcia_cf_device, &bfin_pcmcia_cf_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -514,7 +512,7 @@ static struct platform_device *minotaur_devices[] __initdata = { ...@@ -514,7 +512,7 @@ static struct platform_device *minotaur_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -523,11 +521,11 @@ static struct platform_device *minotaur_devices[] __initdata = { ...@@ -523,11 +521,11 @@ static struct platform_device *minotaur_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -542,7 +540,7 @@ static int __init minotaur_init(void) ...@@ -542,7 +540,7 @@ static int __init minotaur_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(minotaur_devices, ARRAY_SIZE(minotaur_devices)); platform_add_devices(minotaur_devices, ARRAY_SIZE(minotaur_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bfin_spi_board_info, spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info)); ARRAY_SIZE(bfin_spi_board_info));
#endif #endif
......
...@@ -30,7 +30,7 @@ const char bfin_board_name[] = "ADI PNAV-1.0"; ...@@ -30,7 +30,7 @@ const char bfin_board_name[] = "ADI PNAV-1.0";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
static struct resource bfin_pcmcia_cf_resources[] = { static struct resource bfin_pcmcia_cf_resources[] = {
{ {
.start = 0x20310000, /* IO PORT */ .start = 0x20310000, /* IO PORT */
...@@ -59,14 +59,14 @@ static struct platform_device bfin_pcmcia_cf_device = { ...@@ -59,14 +59,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -99,7 +99,7 @@ static struct platform_device smc91x_device = { ...@@ -99,7 +99,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_RMII0; static const unsigned short bfin_mac_peripherals[] = P_RMII0;
...@@ -132,7 +132,7 @@ static struct platform_device bfin_mac_device = { ...@@ -132,7 +132,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -153,11 +153,10 @@ static struct platform_device net2272_bfin_device = { ...@@ -153,11 +153,10 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -188,13 +187,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -188,13 +187,13 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -211,8 +210,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -211,8 +210,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -225,8 +223,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -225,8 +223,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .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,7 +231,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 4, .chip_select = 4,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ .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,7 +241,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -294,13 +291,13 @@ static struct platform_device bfin_spi0_device = { ...@@ -294,13 +291,13 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) #if IS_ENABLED(CONFIG_FB_BF537_LQ035)
static struct platform_device bfin_fb_device = { static struct platform_device bfin_fb_device = {
.name = "bf537-lq035", .name = "bf537-lq035",
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -399,7 +396,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -399,7 +396,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -455,36 +452,36 @@ static struct platform_device bfin_sir1_device = { ...@@ -455,36 +452,36 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
static struct platform_device *stamp_devices[] __initdata = { static struct platform_device *stamp_devices[] __initdata = {
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
&bfin_pcmcia_cf_device, &bfin_pcmcia_cf_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) #if IS_ENABLED(CONFIG_FB_BF537_LQ035)
&bfin_fb_device, &bfin_fb_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -493,7 +490,7 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -493,7 +490,7 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -507,7 +504,7 @@ static int __init pnav_init(void) ...@@ -507,7 +504,7 @@ static int __init pnav_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bfin_spi_board_info, spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info)); ARRAY_SIZE(bfin_spi_board_info));
#endif #endif
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/i2c.h> #include <linux/i2c.h>
...@@ -53,7 +53,7 @@ const char bfin_board_name[] = "ADI BF537-STAMP"; ...@@ -53,7 +53,7 @@ const char bfin_board_name[] = "ADI BF537-STAMP";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
#include <linux/usb/isp1760.h> #include <linux/usb/isp1760.h>
static struct resource bfin_isp1760_resources[] = { static struct resource bfin_isp1760_resources[] = {
[0] = { [0] = {
...@@ -88,7 +88,7 @@ static struct platform_device bfin_isp1760_device = { ...@@ -88,7 +88,7 @@ static struct platform_device bfin_isp1760_device = {
}; };
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
static struct gpio_keys_button bfin_gpio_keys_table[] = { static struct gpio_keys_button bfin_gpio_keys_table[] = {
...@@ -111,7 +111,7 @@ static struct platform_device bfin_device_gpiokeys = { ...@@ -111,7 +111,7 @@ static struct platform_device bfin_device_gpiokeys = {
}; };
#endif #endif
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
static struct resource bfin_pcmcia_cf_resources[] = { static struct resource bfin_pcmcia_cf_resources[] = {
{ {
.start = 0x20310000, /* IO PORT */ .start = 0x20310000, /* IO PORT */
...@@ -140,14 +140,14 @@ static struct platform_device bfin_pcmcia_cf_device = { ...@@ -140,14 +140,14 @@ static struct platform_device bfin_pcmcia_cf_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -180,7 +180,7 @@ static struct platform_device smc91x_device = { ...@@ -180,7 +180,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
static struct resource dm9000_resources[] = { static struct resource dm9000_resources[] = {
[0] = { [0] = {
.start = 0x203FB800, .start = 0x203FB800,
...@@ -207,7 +207,7 @@ static struct platform_device dm9000_device = { ...@@ -207,7 +207,7 @@ static struct platform_device dm9000_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_SL811_HCD)
static struct resource sl811_hcd_resources[] = { static struct resource sl811_hcd_resources[] = {
{ {
.start = 0x20340000, .start = 0x20340000,
...@@ -251,7 +251,7 @@ static struct platform_device sl811_hcd_device = { ...@@ -251,7 +251,7 @@ static struct platform_device sl811_hcd_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
static struct resource isp1362_hcd_resources[] = { static struct resource isp1362_hcd_resources[] = {
{ {
.start = 0x20360000, .start = 0x20360000,
...@@ -290,7 +290,7 @@ static struct platform_device isp1362_hcd_device = { ...@@ -290,7 +290,7 @@ static struct platform_device isp1362_hcd_device = {
}; };
#endif #endif
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
static unsigned short bfin_can_peripherals[] = { static unsigned short bfin_can_peripherals[] = {
P_CAN0_RX, P_CAN0_TX, 0 P_CAN0_RX, P_CAN0_TX, 0
}; };
...@@ -328,7 +328,7 @@ static struct platform_device bfin_can_device = { ...@@ -328,7 +328,7 @@ static struct platform_device bfin_can_device = {
}; };
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_MII0; static const unsigned short bfin_mac_peripherals[] = P_MII0;
...@@ -361,7 +361,7 @@ static struct platform_device bfin_mac_device = { ...@@ -361,7 +361,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -385,7 +385,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -385,7 +385,7 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
static struct mtd_partition bfin_plat_nand_partitions[] = { static struct mtd_partition bfin_plat_nand_partitions[] = {
...@@ -461,7 +461,7 @@ static void bfin_plat_nand_init(void) ...@@ -461,7 +461,7 @@ static void bfin_plat_nand_init(void)
static void bfin_plat_nand_init(void) {} static void bfin_plat_nand_init(void) {}
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition stamp_partitions[] = { static struct mtd_partition stamp_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -509,8 +509,7 @@ static struct platform_device stamp_flash_device = { ...@@ -509,8 +509,7 @@ static struct platform_device stamp_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -541,7 +540,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -541,7 +540,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) #if IS_ENABLED(CONFIG_INPUT_AD714X_SPI)
#include <linux/input/ad714x.h> #include <linux/input/ad714x.h>
static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { static struct ad714x_slider_plat ad7147_spi_slider_plat[] = {
...@@ -602,7 +601,7 @@ static struct ad714x_platform_data ad7147_spi_platform_data = { ...@@ -602,7 +601,7 @@ static struct ad714x_platform_data ad7147_spi_platform_data = {
}; };
#endif #endif
#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) #if IS_ENABLED(CONFIG_INPUT_AD714X_I2C)
#include <linux/input/ad714x.h> #include <linux/input/ad714x.h>
static struct ad714x_button_plat ad7142_i2c_button_plat[] = { static struct ad714x_button_plat ad7142_i2c_button_plat[] = {
{ {
...@@ -649,7 +648,7 @@ static struct ad714x_platform_data ad7142_i2c_platform_data = { ...@@ -649,7 +648,7 @@ static struct ad714x_platform_data ad7142_i2c_platform_data = {
}; };
#endif #endif
#if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) #if IS_ENABLED(CONFIG_AD2S90)
static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { static struct bfin5xx_spi_chip ad2s90_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
...@@ -666,7 +665,7 @@ static struct bfin5xx_spi_chip ad2s1200_spi_chip_info = { ...@@ -666,7 +665,7 @@ static struct bfin5xx_spi_chip ad2s1200_spi_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) #if IS_ENABLED(CONFIG_AD2S1210)
static unsigned short ad2s1210_platform_data[] = { static unsigned short ad2s1210_platform_data[] = {
/* use as SAMPLE, A0, A1 */ /* use as SAMPLE, A0, A1 */
GPIO_PF7, GPIO_PF8, GPIO_PF9, GPIO_PF7, GPIO_PF8, GPIO_PF9,
...@@ -688,7 +687,7 @@ static struct bfin5xx_spi_chip ad7314_spi_chip_info = { ...@@ -688,7 +687,7 @@ static struct bfin5xx_spi_chip ad7314_spi_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE) #if IS_ENABLED(CONFIG_AD7816)
static unsigned short ad7816_platform_data[] = { static unsigned short ad7816_platform_data[] = {
GPIO_PF4, /* rdwr_pin */ GPIO_PF4, /* rdwr_pin */
GPIO_PF5, /* convert_pin */ GPIO_PF5, /* convert_pin */
...@@ -701,7 +700,7 @@ static struct bfin5xx_spi_chip ad7816_spi_chip_info = { ...@@ -701,7 +700,7 @@ static struct bfin5xx_spi_chip ad7816_spi_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE) #if IS_ENABLED(CONFIG_ADT7310)
static unsigned long adt7310_platform_data[3] = { static unsigned long adt7310_platform_data[3] = {
/* INT bound temperature alarm event. line 1 */ /* INT bound temperature alarm event. line 1 */
IRQ_PG4, IRQF_TRIGGER_LOW, IRQ_PG4, IRQF_TRIGGER_LOW,
...@@ -714,14 +713,14 @@ static struct bfin5xx_spi_chip adt7310_spi_chip_info = { ...@@ -714,14 +713,14 @@ static struct bfin5xx_spi_chip adt7310_spi_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE) #if IS_ENABLED(CONFIG_AD7298)
static unsigned short ad7298_platform_data[] = { static unsigned short ad7298_platform_data[] = {
GPIO_PF7, /* busy_pin */ GPIO_PF7, /* busy_pin */
0, 0,
}; };
#endif #endif
#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) #if IS_ENABLED(CONFIG_ADT7316_SPI)
static unsigned long adt7316_spi_data[2] = { static unsigned long adt7316_spi_data[2] = {
IRQF_TRIGGER_LOW, /* interrupt flags */ IRQF_TRIGGER_LOW, /* interrupt flags */
GPIO_PF7, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */ 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,7 +731,7 @@ static struct bfin5xx_spi_chip adt7316_spi_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
#define MMC_SPI_CARD_DETECT_INT IRQ_PF5 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5
static int bfin_mmc_spi_init(struct device *dev, static int bfin_mmc_spi_init(struct device *dev,
...@@ -759,7 +758,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = { ...@@ -759,7 +758,7 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
#include <linux/spi/ad7877.h> #include <linux/spi/ad7877.h>
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
...@@ -776,7 +775,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -776,7 +775,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
#include <linux/spi/ad7879.h> #include <linux/spi/ad7879.h>
static const struct ad7879_platform_data bfin_ad7879_ts_info = { static const struct ad7879_platform_data bfin_ad7879_ts_info = {
.model = 7879, /* Model = AD7879 */ .model = 7879, /* Model = AD7879 */
...@@ -793,7 +792,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { ...@@ -793,7 +792,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X)
#include <linux/input/adxl34x.h> #include <linux/input/adxl34x.h>
static const struct adxl34x_platform_data adxl34x_info = { static const struct adxl34x_platform_data adxl34x_info = {
.x_axis_offset = 0, .x_axis_offset = 0,
...@@ -832,13 +831,13 @@ static const struct adxl34x_platform_data adxl34x_info = { ...@@ -832,13 +831,13 @@ static const struct adxl34x_platform_data adxl34x_info = {
}; };
#endif #endif
#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) #if IS_ENABLED(CONFIG_ENC28J60)
static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { static struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
.enable_dma = 1, .enable_dma = 1,
}; };
#endif #endif
#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) #if IS_ENABLED(CONFIG_ADF702X)
#include <linux/spi/adf702x.h> #include <linux/spi/adf702x.h>
#define TXREG 0x0160A470 #define TXREG 0x0160A470
static const u32 adf7021_regs[] = { static const u32 adf7021_regs[] = {
...@@ -880,7 +879,7 @@ static inline void adf702x_mac_init(void) ...@@ -880,7 +879,7 @@ static inline void adf702x_mac_init(void)
static inline void adf702x_mac_init(void) {} static inline void adf702x_mac_init(void) {}
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_ADS7846)
#include <linux/spi/ads7846.h> #include <linux/spi/ads7846.h>
static int ads7873_get_pendown_state(void) static int ads7873_get_pendown_state(void)
{ {
...@@ -899,8 +898,7 @@ static struct ads7846_platform_data __initdata ad7873_pdata = { ...@@ -899,8 +898,7 @@ static struct ads7846_platform_data __initdata ad7873_pdata = {
}; };
#endif #endif
#if defined(CONFIG_MTD_DATAFLASH) \ #if IS_ENABLED(CONFIG_MTD_DATAFLASH)
|| defined(CONFIG_MTD_DATAFLASH_MODULE)
static struct mtd_partition bfin_spi_dataflash_partitions[] = { static struct mtd_partition bfin_spi_dataflash_partitions[] = {
{ {
...@@ -931,15 +929,14 @@ static struct bfin5xx_spi_chip data_flash_chip_info = { ...@@ -931,15 +929,14 @@ static struct bfin5xx_spi_chip data_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE) #if IS_ENABLED(CONFIG_AD7476)
static struct bfin5xx_spi_chip spi_ad7476_chip_info = { static struct bfin5xx_spi_chip spi_ad7476_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
}; };
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -951,8 +948,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -951,8 +948,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_MTD_DATAFLASH) \ #if IS_ENABLED(CONFIG_MTD_DATAFLASH)
|| defined(CONFIG_MTD_DATAFLASH_MODULE)
{ /* DataFlash chip */ { /* DataFlash chip */
.modalias = "mtd_dataflash", .modalias = "mtd_dataflash",
.max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ .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,8 +960,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
{ {
.modalias = "ad1836", .modalias = "ad1836",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .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,7 +991,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) #if IS_ENABLED(CONFIG_INPUT_AD714X_SPI)
{ {
.modalias = "ad714x_captouch", .modalias = "ad714x_captouch",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,7 +1003,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) #if IS_ENABLED(CONFIG_AD2S90)
{ {
.modalias = "ad2s90", .modalias = "ad2s90",
.bus_num = 0, .bus_num = 0,
...@@ -1029,7 +1024,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1029,7 +1024,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE) #if IS_ENABLED(CONFIG_AD2S1210)
{ {
.modalias = "ad2s1210", .modalias = "ad2s1210",
.max_speed_hz = 8192000, .max_speed_hz = 8192000,
...@@ -1051,7 +1046,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1051,7 +1046,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE) #if IS_ENABLED(CONFIG_AD7816)
{ {
.modalias = "ad7818", .modalias = "ad7818",
.max_speed_hz = 1000000, .max_speed_hz = 1000000,
...@@ -1063,7 +1058,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1063,7 +1058,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE) #if IS_ENABLED(CONFIG_ADT7310)
{ {
.modalias = "adt7310", .modalias = "adt7310",
.max_speed_hz = 1000000, .max_speed_hz = 1000000,
...@@ -1076,7 +1071,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1076,7 +1071,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE) #if IS_ENABLED(CONFIG_AD7298)
{ {
.modalias = "ad7298", .modalias = "ad7298",
.max_speed_hz = 1000000, .max_speed_hz = 1000000,
...@@ -1087,7 +1082,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1087,7 +1082,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) #if IS_ENABLED(CONFIG_ADT7316_SPI)
{ {
.modalias = "adt7316", .modalias = "adt7316",
.max_speed_hz = 1000000, .max_speed_hz = 1000000,
...@@ -1100,7 +1095,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1100,7 +1095,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .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,7 +1106,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -1121,7 +1116,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1121,7 +1116,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 1, .chip_select = 1,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
{ {
.modalias = "ad7879", .modalias = "ad7879",
.platform_data = &bfin_ad7879_ts_info, .platform_data = &bfin_ad7879_ts_info,
...@@ -1132,7 +1127,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1132,7 +1127,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .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,7 +1135,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 1, .chip_select = 1,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
{ {
.modalias = "bfin-lq035q1-spi", .modalias = "bfin-lq035q1-spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .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,7 +1144,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) #if IS_ENABLED(CONFIG_ENC28J60)
{ {
.modalias = "enc28j60", .modalias = "enc28j60",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .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,7 +1155,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X_SPI)
{ {
.modalias = "adxl34x", .modalias = "adxl34x",
.platform_data = &adxl34x_info, .platform_data = &adxl34x_info,
...@@ -1171,7 +1166,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1171,7 +1166,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) #if IS_ENABLED(CONFIG_ADF702X)
{ {
.modalias = "adf702x", .modalias = "adf702x",
.max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ .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,7 +1176,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_ADS7846)
{ {
.modalias = "ads7846", .modalias = "ads7846",
.max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1187,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
#if defined(CONFIG_AD7476) \ #if IS_ENABLED(CONFIG_AD7476)
|| defined(CONFIG_AD7476_MODULE)
{ {
.modalias = "ad7476", /* Name of spi_driver for this device */ .modalias = "ad7476", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ .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,8 +1198,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_ADE7753) \ #if IS_ENABLED(CONFIG_ADE7753)
|| defined(CONFIG_ADE7753_MODULE)
{ {
.modalias = "ade7753", .modalias = "ade7753",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1208,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_1, .mode = SPI_MODE_1,
}, },
#endif #endif
#if defined(CONFIG_ADE7754) \ #if IS_ENABLED(CONFIG_ADE7754)
|| defined(CONFIG_ADE7754_MODULE)
{ {
.modalias = "ade7754", .modalias = "ade7754",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1218,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_1, .mode = SPI_MODE_1,
}, },
#endif #endif
#if defined(CONFIG_ADE7758) \ #if IS_ENABLED(CONFIG_ADE7758)
|| defined(CONFIG_ADE7758_MODULE)
{ {
.modalias = "ade7758", .modalias = "ade7758",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1228,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_1, .mode = SPI_MODE_1,
}, },
#endif #endif
#if defined(CONFIG_ADE7759) \ #if IS_ENABLED(CONFIG_ADE7759)
|| defined(CONFIG_ADE7759_MODULE)
{ {
.modalias = "ade7759", .modalias = "ade7759",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1238,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_1, .mode = SPI_MODE_1,
}, },
#endif #endif
#if defined(CONFIG_ADE7854_SPI) \ #if IS_ENABLED(CONFIG_ADE7854_SPI)
|| defined(CONFIG_ADE7854_SPI_MODULE)
{ {
.modalias = "ade7854", .modalias = "ade7854",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1248,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_ADIS16060) \ #if IS_ENABLED(CONFIG_ADIS16060)
|| defined(CONFIG_ADIS16060_MODULE)
{ {
.modalias = "adis16060_r", .modalias = "adis16060_r",
.max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */ .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,8 +1266,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_1, .mode = SPI_MODE_1,
}, },
#endif #endif
#if defined(CONFIG_ADIS16130) \ #if IS_ENABLED(CONFIG_ADIS16130)
|| defined(CONFIG_ADIS16130_MODULE)
{ {
.modalias = "adis16130", .modalias = "adis16130",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1276,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_ADIS16201) \ #if IS_ENABLED(CONFIG_ADIS16201)
|| defined(CONFIG_ADIS16201_MODULE)
{ {
.modalias = "adis16201", .modalias = "adis16201",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1287,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.irq = IRQ_PF4, .irq = IRQ_PF4,
}, },
#endif #endif
#if defined(CONFIG_ADIS16203) \ #if IS_ENABLED(CONFIG_ADIS16203)
|| defined(CONFIG_ADIS16203_MODULE)
{ {
.modalias = "adis16203", .modalias = "adis16203",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1298,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.irq = IRQ_PF4, .irq = IRQ_PF4,
}, },
#endif #endif
#if defined(CONFIG_ADIS16204) \ #if IS_ENABLED(CONFIG_ADIS16204)
|| defined(CONFIG_ADIS16204_MODULE)
{ {
.modalias = "adis16204", .modalias = "adis16204",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1309,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.irq = IRQ_PF4, .irq = IRQ_PF4,
}, },
#endif #endif
#if defined(CONFIG_ADIS16209) \ #if IS_ENABLED(CONFIG_ADIS16209)
|| defined(CONFIG_ADIS16209_MODULE)
{ {
.modalias = "adis16209", .modalias = "adis16209",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1320,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.irq = IRQ_PF4, .irq = IRQ_PF4,
}, },
#endif #endif
#if defined(CONFIG_ADIS16220) \ #if IS_ENABLED(CONFIG_ADIS16220)
|| defined(CONFIG_ADIS16220_MODULE)
{ {
.modalias = "adis16220", .modalias = "adis16220",
.max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1331,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.irq = IRQ_PF4, .irq = IRQ_PF4,
}, },
#endif #endif
#if defined(CONFIG_ADIS16240) \ #if IS_ENABLED(CONFIG_ADIS16240)
|| defined(CONFIG_ADIS16240_MODULE)
{ {
.modalias = "adis16240", .modalias = "adis16240",
.max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ .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,8 +1342,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.irq = IRQ_PF4, .irq = IRQ_PF4,
}, },
#endif #endif
#if defined(CONFIG_ADIS16260) \ #if IS_ENABLED(CONFIG_ADIS16260)
|| defined(CONFIG_ADIS16260_MODULE)
{ {
.modalias = "adis16260", .modalias = "adis16260",
.max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */ .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,8 +1353,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.irq = IRQ_PF4, .irq = IRQ_PF4,
}, },
#endif #endif
#if defined(CONFIG_ADIS16261) \ #if IS_ENABLED(CONFIG_ADIS16261)
|| defined(CONFIG_ADIS16261_MODULE)
{ {
.modalias = "adis16261", .modalias = "adis16261",
.max_speed_hz = 2500000, /* max spi clock (SCK) speed in HZ */ .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,8 +1363,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_ADIS16300) \ #if IS_ENABLED(CONFIG_ADIS16300)
|| defined(CONFIG_ADIS16300_MODULE)
{ {
.modalias = "adis16300", .modalias = "adis16300",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1374,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.irq = IRQ_PF4, .irq = IRQ_PF4,
}, },
#endif #endif
#if defined(CONFIG_ADIS16350) \ #if IS_ENABLED(CONFIG_ADIS16350)
|| defined(CONFIG_ADIS16350_MODULE)
{ {
.modalias = "adis16364", .modalias = "adis16364",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,8 +1385,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.irq = IRQ_PF4, .irq = IRQ_PF4,
}, },
#endif #endif
#if defined(CONFIG_ADIS16400) \ #if IS_ENABLED(CONFIG_ADIS16400)
|| defined(CONFIG_ADIS16400_MODULE)
{ {
.modalias = "adis16400", .modalias = "adis16400",
.max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */ .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,7 +1397,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
...@@ -1459,7 +1435,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -1459,7 +1435,7 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
/* SPORT SPI controller data */ /* SPORT SPI controller data */
static struct bfin5xx_spi_master bfin_sport_spi0_info = { static struct bfin5xx_spi_master bfin_sport_spi0_info = {
...@@ -1524,13 +1500,13 @@ static struct platform_device bfin_sport_spi1_device = { ...@@ -1524,13 +1500,13 @@ static struct platform_device bfin_sport_spi1_device = {
#endif /* sport spi master and devices */ #endif /* sport spi master and devices */
#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) #if IS_ENABLED(CONFIG_FB_BF537_LQ035)
static struct platform_device bfin_fb_device = { static struct platform_device bfin_fb_device = {
.name = "bf537_lq035", .name = "bf537_lq035",
}; };
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
#include <asm/bfin-lq035q1.h> #include <asm/bfin-lq035q1.h>
static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
...@@ -1559,8 +1535,7 @@ static struct platform_device bfin_lq035q1_device = { ...@@ -1559,8 +1535,7 @@ static struct platform_device bfin_lq035q1_device = {
}; };
#endif #endif
#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
|| defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <media/blackfin/bfin_capture.h> #include <media/blackfin/bfin_capture.h>
#include <media/blackfin/ppi.h> #include <media/blackfin/ppi.h>
...@@ -1580,8 +1555,7 @@ static const struct ppi_info ppi_info = { ...@@ -1580,8 +1555,7 @@ static const struct ppi_info ppi_info = {
.pin_req = ppi_req, .pin_req = ppi_req,
}; };
#if defined(CONFIG_VIDEO_VS6624) \ #if IS_ENABLED(CONFIG_VIDEO_VS6624)
|| defined(CONFIG_VIDEO_VS6624_MODULE)
static struct v4l2_input vs6624_inputs[] = { static struct v4l2_input vs6624_inputs[] = {
{ {
.index = 0, .index = 0,
...@@ -1624,7 +1598,7 @@ static struct platform_device bfin_capture_device = { ...@@ -1624,7 +1598,7 @@ static struct platform_device bfin_capture_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -1735,7 +1709,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -1735,7 +1709,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -1790,7 +1764,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -1790,7 +1764,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -1817,7 +1791,7 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -1817,7 +1791,7 @@ static struct platform_device i2c_bfin_twi_device = {
}; };
#endif #endif
#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_ADP5588)
static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
[0] = KEY_GRAVE, [0] = KEY_GRAVE,
[1] = KEY_1, [1] = KEY_1,
...@@ -1902,7 +1876,7 @@ static struct adp5588_kpad_platform_data adp5588_kpad_data = { ...@@ -1902,7 +1876,7 @@ static struct adp5588_kpad_platform_data adp5588_kpad_data = {
}; };
#endif #endif
#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) #if IS_ENABLED(CONFIG_PMIC_ADP5520)
#include <linux/mfd/adp5520.h> #include <linux/mfd/adp5520.h>
/* /*
...@@ -2013,14 +1987,14 @@ static struct adp5520_platform_data adp5520_pdev_data = { ...@@ -2013,14 +1987,14 @@ static struct adp5520_platform_data adp5520_pdev_data = {
#endif #endif
#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) #if IS_ENABLED(CONFIG_GPIO_ADP5588)
static struct adp5588_gpio_platform_data adp5588_gpio_data = { static struct adp5588_gpio_platform_data adp5588_gpio_data = {
.gpio_start = 50, .gpio_start = 50,
.pullup_dis_mask = 0, .pullup_dis_mask = 0,
}; };
#endif #endif
#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) #if IS_ENABLED(CONFIG_BACKLIGHT_ADP8870)
#include <linux/i2c/adp8870.h> #include <linux/i2c/adp8870.h>
static struct led_info adp8870_leds[] = { static struct led_info adp8870_leds[] = {
{ {
...@@ -2072,7 +2046,7 @@ static struct adp8870_backlight_platform_data adp8870_pdata = { ...@@ -2072,7 +2046,7 @@ static struct adp8870_backlight_platform_data adp8870_pdata = {
}; };
#endif #endif
#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) #if IS_ENABLED(CONFIG_BACKLIGHT_ADP8860)
#include <linux/i2c/adp8860.h> #include <linux/i2c/adp8860.h>
static struct led_info adp8860_leds[] = { static struct led_info adp8860_leds[] = {
{ {
...@@ -2114,7 +2088,7 @@ static struct adp8860_backlight_platform_data adp8860_pdata = { ...@@ -2114,7 +2088,7 @@ static struct adp8860_backlight_platform_data adp8860_pdata = {
}; };
#endif #endif
#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) #if IS_ENABLED(CONFIG_REGULATOR_AD5398)
static struct regulator_consumer_supply ad5398_consumer = { static struct regulator_consumer_supply ad5398_consumer = {
.supply = "current", .supply = "current",
}; };
...@@ -2129,8 +2103,7 @@ static struct regulator_init_data ad5398_regulator_data = { ...@@ -2129,8 +2103,7 @@ static struct regulator_init_data ad5398_regulator_data = {
.consumer_supplies = &ad5398_consumer, .consumer_supplies = &ad5398_consumer,
}; };
#if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ #if IS_ENABLED(CONFIG_REGULATOR_VIRTUAL_CONSUMER)
defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
static struct platform_device ad5398_virt_consumer_device = { static struct platform_device ad5398_virt_consumer_device = {
.name = "reg-virt-consumer", .name = "reg-virt-consumer",
.id = 0, .id = 0,
...@@ -2139,8 +2112,7 @@ static struct platform_device ad5398_virt_consumer_device = { ...@@ -2139,8 +2112,7 @@ static struct platform_device ad5398_virt_consumer_device = {
}, },
}; };
#endif #endif
#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ #if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER)
defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
static struct regulator_bulk_data ad5398_bulk_data = { static struct regulator_bulk_data ad5398_bulk_data = {
.supply = "current", .supply = "current",
}; };
...@@ -2161,14 +2133,14 @@ static struct platform_device ad5398_userspace_consumer_device = { ...@@ -2161,14 +2133,14 @@ static struct platform_device ad5398_userspace_consumer_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE) #if IS_ENABLED(CONFIG_ADT7410)
/* INT bound temperature alarm event. line 1 */ /* INT bound temperature alarm event. line 1 */
static unsigned long adt7410_platform_data[2] = { static unsigned long adt7410_platform_data[2] = {
IRQ_PG4, IRQF_TRIGGER_LOW, IRQ_PG4, IRQF_TRIGGER_LOW,
}; };
#endif #endif
#if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE) #if IS_ENABLED(CONFIG_ADT7316_I2C)
/* INT bound temperature alarm event. line 1 */ /* INT bound temperature alarm event. line 1 */
static unsigned long adt7316_i2c_data[2] = { static unsigned long adt7316_i2c_data[2] = {
IRQF_TRIGGER_LOW, /* interrupt flags */ IRQF_TRIGGER_LOW, /* interrupt flags */
...@@ -2183,13 +2155,13 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -2183,13 +2155,13 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADAV80X_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_ADAV80X)
{ {
I2C_BOARD_INFO("adav803", 0x10), I2C_BOARD_INFO("adav803", 0x10),
}, },
#endif #endif
#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) #if IS_ENABLED(CONFIG_INPUT_AD714X_I2C)
{ {
I2C_BOARD_INFO("ad7142_captouch", 0x2C), I2C_BOARD_INFO("ad7142_captouch", 0x2C),
.irq = IRQ_PG5, .irq = IRQ_PG5,
...@@ -2197,26 +2169,26 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -2197,26 +2169,26 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
}, },
#endif #endif
#if defined(CONFIG_AD7150) || defined(CONFIG_AD7150_MODULE) #if IS_ENABLED(CONFIG_AD7150)
{ {
I2C_BOARD_INFO("ad7150", 0x48), I2C_BOARD_INFO("ad7150", 0x48),
.irq = IRQ_PG5, /* fixme: use real interrupt number */ .irq = IRQ_PG5, /* fixme: use real interrupt number */
}, },
#endif #endif
#if defined(CONFIG_AD7152) || defined(CONFIG_AD7152_MODULE) #if IS_ENABLED(CONFIG_AD7152)
{ {
I2C_BOARD_INFO("ad7152", 0x48), I2C_BOARD_INFO("ad7152", 0x48),
}, },
#endif #endif
#if defined(CONFIG_AD774X) || defined(CONFIG_AD774X_MODULE) #if IS_ENABLED(CONFIG_AD774X)
{ {
I2C_BOARD_INFO("ad774x", 0x48), I2C_BOARD_INFO("ad774x", 0x48),
}, },
#endif #endif
#if defined(CONFIG_ADE7854_I2C) || defined(CONFIG_ADE7854_I2C_MODULE) #if IS_ENABLED(CONFIG_ADE7854_I2C)
{ {
I2C_BOARD_INFO("ade7854", 0x38), I2C_BOARD_INFO("ade7854", 0x38),
}, },
...@@ -2229,7 +2201,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -2229,7 +2201,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
}, },
#endif #endif
#if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE) #if IS_ENABLED(CONFIG_ADT7410)
{ {
I2C_BOARD_INFO("adt7410", 0x48), I2C_BOARD_INFO("adt7410", 0x48),
/* CT critical temperature event. line 0 */ /* CT critical temperature event. line 0 */
...@@ -2238,14 +2210,14 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -2238,14 +2210,14 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
}, },
#endif #endif
#if defined(CONFIG_AD7291) || defined(CONFIG_AD7291_MODULE) #if IS_ENABLED(CONFIG_AD7291)
{ {
I2C_BOARD_INFO("ad7291", 0x20), I2C_BOARD_INFO("ad7291", 0x20),
.irq = IRQ_PG5, .irq = IRQ_PG5,
}, },
#endif #endif
#if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE) #if IS_ENABLED(CONFIG_ADT7316_I2C)
{ {
I2C_BOARD_INFO("adt7316", 0x48), I2C_BOARD_INFO("adt7316", 0x48),
.irq = IRQ_PG6, .irq = IRQ_PG6,
...@@ -2253,128 +2225,128 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { ...@@ -2253,128 +2225,128 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("pcf8574_lcd", 0x22), I2C_BOARD_INFO("pcf8574_lcd", 0x22),
}, },
#endif #endif
#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) #if IS_ENABLED(CONFIG_INPUT_PCF8574)
{ {
I2C_BOARD_INFO("pcf8574_keypad", 0x27), I2C_BOARD_INFO("pcf8574_keypad", 0x27),
.irq = IRQ_PG6, .irq = IRQ_PG6,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_I2C)
{ {
I2C_BOARD_INFO("ad7879", 0x2F), I2C_BOARD_INFO("ad7879", 0x2F),
.irq = IRQ_PG5, .irq = IRQ_PG5,
.platform_data = (void *)&bfin_ad7879_ts_info, .platform_data = (void *)&bfin_ad7879_ts_info,
}, },
#endif #endif
#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_ADP5588)
{ {
I2C_BOARD_INFO("adp5588-keys", 0x34), I2C_BOARD_INFO("adp5588-keys", 0x34),
.irq = IRQ_PG0, .irq = IRQ_PG0,
.platform_data = (void *)&adp5588_kpad_data, .platform_data = (void *)&adp5588_kpad_data,
}, },
#endif #endif
#if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE) #if IS_ENABLED(CONFIG_PMIC_ADP5520)
{ {
I2C_BOARD_INFO("pmic-adp5520", 0x32), I2C_BOARD_INFO("pmic-adp5520", 0x32),
.irq = IRQ_PG0, .irq = IRQ_PG0,
.platform_data = (void *)&adp5520_pdev_data, .platform_data = (void *)&adp5520_pdev_data,
}, },
#endif #endif
#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
{ {
I2C_BOARD_INFO("adxl34x", 0x53), I2C_BOARD_INFO("adxl34x", 0x53),
.irq = IRQ_PG3, .irq = IRQ_PG3,
.platform_data = (void *)&adxl34x_info, .platform_data = (void *)&adxl34x_info,
}, },
#endif #endif
#if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) #if IS_ENABLED(CONFIG_GPIO_ADP5588)
{ {
I2C_BOARD_INFO("adp5588-gpio", 0x34), I2C_BOARD_INFO("adp5588-gpio", 0x34),
.platform_data = (void *)&adp5588_gpio_data, .platform_data = (void *)&adp5588_gpio_data,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_7393)
{ {
I2C_BOARD_INFO("bfin-adv7393", 0x2B), I2C_BOARD_INFO("bfin-adv7393", 0x2B),
}, },
#endif #endif
#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) #if IS_ENABLED(CONFIG_FB_BF537_LQ035)
{ {
I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F), I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F),
}, },
#endif #endif
#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) #if IS_ENABLED(CONFIG_BACKLIGHT_ADP8870)
{ {
I2C_BOARD_INFO("adp8870", 0x2B), I2C_BOARD_INFO("adp8870", 0x2B),
.platform_data = (void *)&adp8870_pdata, .platform_data = (void *)&adp8870_pdata,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_ADAU1371) || defined(CONFIG_SND_SOC_ADAU1371_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_ADAU1371)
{ {
I2C_BOARD_INFO("adau1371", 0x1A), I2C_BOARD_INFO("adau1371", 0x1A),
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_ADAU1761)
{ {
I2C_BOARD_INFO("adau1761", 0x38), I2C_BOARD_INFO("adau1761", 0x38),
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_ADAU1361) || defined(CONFIG_SND_SOC_ADAU1361_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_ADAU1361)
{ {
I2C_BOARD_INFO("adau1361", 0x38), I2C_BOARD_INFO("adau1361", 0x38),
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_ADAU1701) || defined(CONFIG_SND_SOC_ADAU1701_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_ADAU1701)
{ {
I2C_BOARD_INFO("adau1701", 0x34), I2C_BOARD_INFO("adau1701", 0x34),
}, },
#endif #endif
#if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE) #if IS_ENABLED(CONFIG_AD525X_DPOT)
{ {
I2C_BOARD_INFO("ad5258", 0x18), I2C_BOARD_INFO("ad5258", 0x18),
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
{ {
I2C_BOARD_INFO("ssm2602", 0x1b), I2C_BOARD_INFO("ssm2602", 0x1b),
}, },
#endif #endif
#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) #if IS_ENABLED(CONFIG_REGULATOR_AD5398)
{ {
I2C_BOARD_INFO("ad5398", 0xC), I2C_BOARD_INFO("ad5398", 0xC),
.platform_data = (void *)&ad5398_regulator_data, .platform_data = (void *)&ad5398_regulator_data,
}, },
#endif #endif
#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) #if IS_ENABLED(CONFIG_BACKLIGHT_ADP8860)
{ {
I2C_BOARD_INFO("adp8860", 0x2A), I2C_BOARD_INFO("adp8860", 0x2A),
.platform_data = (void *)&adp8860_pdata, .platform_data = (void *)&adp8860_pdata,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_ADAU1373)
{ {
I2C_BOARD_INFO("adau1373", 0x1A), I2C_BOARD_INFO("adau1373", 0x1A),
}, },
#endif #endif
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("ad5252", 0x2e), I2C_BOARD_INFO("ad5252", 0x2e),
}, },
#endif #endif
}; };
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) \ #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) \
|| defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) || IS_ENABLED(CONFIG_BFIN_SPORT)
unsigned short bfin_sport0_peripherals[] = { unsigned short bfin_sport0_peripherals[] = {
P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -2439,7 +2411,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -2439,7 +2411,7 @@ static struct platform_device bfin_sport1_uart_device = {
}; };
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_BFIN_SPORT)
static struct resource bfin_sport0_resources[] = { static struct resource bfin_sport0_resources[] = {
{ {
.start = SPORT0_TCR1, .start = SPORT0_TCR1,
...@@ -2482,7 +2454,7 @@ static struct platform_device bfin_sport0_device = { ...@@ -2482,7 +2454,7 @@ static struct platform_device bfin_sport0_device = {
}, },
}; };
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
#define CF_IDE_NAND_CARD_USE_HDD_INTERFACE #define CF_IDE_NAND_CARD_USE_HDD_INTERFACE
/* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */ /* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */
...@@ -2569,8 +2541,8 @@ static struct platform_device bfin_dpmc = { ...@@ -2569,8 +2541,8 @@ static struct platform_device bfin_dpmc = {
}, },
}; };
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \
defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) IS_ENABLED(CONFIG_SND_BF5XX_AC97)
#define SPORT_REQ(x) \ #define SPORT_REQ(x) \
[x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ [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,22 +2592,21 @@ static struct resource bfin_snd_resources[][4] = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s_pcm = { static struct platform_device bfin_i2s_pcm = {
.name = "bfin-i2s-pcm-audio", .name = "bfin-i2s-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
static struct platform_device bfin_ac97_pcm = { static struct platform_device bfin_ac97_pcm = {
.name = "bfin-ac97-pcm-audio", .name = "bfin-ac97-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-i2s.0", "bfin-i2s.0",
"spi0.4", "spi0.4",
...@@ -2649,8 +2620,7 @@ static struct platform_device bfin_ad1836_machine = { ...@@ -2649,8 +2620,7 @@ static struct platform_device bfin_ad1836_machine = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
static const unsigned ad73311_gpio[] = { static const unsigned ad73311_gpio[] = {
GPIO_PF4, GPIO_PF4,
}; };
...@@ -2664,22 +2634,21 @@ static struct platform_device bfin_ad73311_machine = { ...@@ -2664,22 +2634,21 @@ static struct platform_device bfin_ad73311_machine = {
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_AD73311)
static struct platform_device bfin_ad73311_codec_device = { static struct platform_device bfin_ad73311_codec_device = {
.name = "ad73311", .name = "ad73311",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X)
defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE)
static struct platform_device bfin_eval_adav801_device = { static struct platform_device bfin_eval_adav801_device = {
.name = "bfin-eval-adav801", .name = "bfin-eval-adav801",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -2691,7 +2660,7 @@ static struct platform_device bfin_i2s = { ...@@ -2691,7 +2660,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
static struct platform_device bfin_ac97 = { static struct platform_device bfin_ac97 = {
.name = "bfin-ac97", .name = "bfin-ac97",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -2703,7 +2672,7 @@ static struct platform_device bfin_ac97 = { ...@@ -2703,7 +2672,7 @@ static struct platform_device bfin_ac97 = {
}; };
#endif #endif
#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) #if IS_ENABLED(CONFIG_REGULATOR_FIXED_VOLTAGE)
#define REGULATOR_ADP122 "adp122" #define REGULATOR_ADP122 "adp122"
#define REGULATOR_ADP122_UV 2500000 #define REGULATOR_ADP122_UV 2500000
...@@ -2741,8 +2710,7 @@ static struct platform_device adp_switch_device = { ...@@ -2741,8 +2710,7 @@ static struct platform_device adp_switch_device = {
}, },
}; };
#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ #if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER)
defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
static struct regulator_bulk_data adp122_bulk_data = { static struct regulator_bulk_data adp122_bulk_data = {
.supply = REGULATOR_ADP122, .supply = REGULATOR_ADP122,
}; };
...@@ -2763,8 +2731,7 @@ static struct platform_device adp122_userspace_consumer_device = { ...@@ -2763,8 +2731,7 @@ static struct platform_device adp122_userspace_consumer_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_IIO_GPIO_TRIGGER) || \ #if IS_ENABLED(CONFIG_IIO_GPIO_TRIGGER)
defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
static struct resource iio_gpio_trigger_resources[] = { static struct resource iio_gpio_trigger_resources[] = {
[0] = { [0] = {
...@@ -2781,15 +2748,13 @@ static struct platform_device iio_gpio_trigger = { ...@@ -2781,15 +2748,13 @@ static struct platform_device iio_gpio_trigger = {
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373)
defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE)
static struct platform_device bf5xx_adau1373_device = { static struct platform_device bf5xx_adau1373_device = {
.name = "bfin-eval-adau1373", .name = "bfin-eval-adau1373",
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701)
defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE)
static struct platform_device bf5xx_adau1701_device = { static struct platform_device bf5xx_adau1701_device = {
.name = "bfin-eval-adau1701", .name = "bfin-eval-adau1701",
}; };
...@@ -2798,73 +2763,72 @@ static struct platform_device bf5xx_adau1701_device = { ...@@ -2798,73 +2763,72 @@ static struct platform_device bf5xx_adau1701_device = {
static struct platform_device *stamp_devices[] __initdata = { static struct platform_device *stamp_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_BFIN_SPORT)
&bfin_sport0_device, &bfin_sport0_device,
#endif #endif
#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) #if IS_ENABLED(CONFIG_BFIN_CFPCMCIA)
&bfin_pcmcia_cf_device, &bfin_pcmcia_cf_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_SL811_HCD)
&sl811_hcd_device, &sl811_hcd_device,
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
&isp1362_hcd_device, &isp1362_hcd_device,
#endif #endif
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
&bfin_isp1760_device, &bfin_isp1760_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) #if IS_ENABLED(CONFIG_DM9000)
&dm9000_device, &dm9000_device,
#endif #endif
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
&bfin_can_device, &bfin_can_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
&bfin_sport_spi0_device, &bfin_sport_spi0_device,
&bfin_sport_spi1_device, &bfin_sport_spi1_device,
#endif #endif
#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) #if IS_ENABLED(CONFIG_FB_BF537_LQ035)
&bfin_fb_device, &bfin_fb_device,
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
&bfin_lq035q1_device, &bfin_lq035q1_device,
#endif #endif
#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
|| defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
&bfin_capture_device, &bfin_capture_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -2873,7 +2837,7 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -2873,7 +2837,7 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -2882,11 +2846,11 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -2882,11 +2846,11 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -2895,95 +2859,86 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -2895,95 +2859,86 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
&bfin_pata_device, &bfin_pata_device,
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
&bfin_async_nand_device, &bfin_async_nand_device,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&stamp_flash_device, &stamp_flash_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s_pcm, &bfin_i2s_pcm,
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
&bfin_ac97_pcm, &bfin_ac97_pcm,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
&bfin_ad1836_machine, &bfin_ad1836_machine,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
&bfin_ad73311_machine, &bfin_ad73311_machine,
#endif #endif
#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_AD73311)
&bfin_ad73311_codec_device, &bfin_ad73311_codec_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
&bfin_i2s, &bfin_i2s,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
&bfin_ac97, &bfin_ac97,
#endif #endif
#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) #if IS_ENABLED(CONFIG_REGULATOR_AD5398)
#if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ #if IS_ENABLED(CONFIG_REGULATOR_VIRTUAL_CONSUMER)
defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
&ad5398_virt_consumer_device, &ad5398_virt_consumer_device,
#endif #endif
#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ #if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER)
defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
&ad5398_userspace_consumer_device, &ad5398_userspace_consumer_device,
#endif #endif
#endif #endif
#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) #if IS_ENABLED(CONFIG_REGULATOR_FIXED_VOLTAGE)
&adp_switch_device, &adp_switch_device,
#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ #if IS_ENABLED(CONFIG_REGULATOR_USERSPACE_CONSUMER)
defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
&adp122_userspace_consumer_device, &adp122_userspace_consumer_device,
#endif #endif
#endif #endif
#if defined(CONFIG_IIO_GPIO_TRIGGER) || \ #if IS_ENABLED(CONFIG_IIO_GPIO_TRIGGER)
defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
&iio_gpio_trigger, &iio_gpio_trigger,
#endif #endif
#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373)
defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE)
&bf5xx_adau1373_device, &bf5xx_adau1373_device,
#endif #endif
#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701)
defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE)
&bf5xx_adau1701_device, &bf5xx_adau1701_device,
#endif #endif
#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X)
defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE)
&bfin_eval_adav801_device, &bfin_eval_adav801_device,
#endif #endif
}; };
static int __init net2272_init(void) static int __init net2272_init(void)
{ {
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
int ret; int ret;
ret = gpio_request(GPIO_PF6, "net2272"); ret = gpio_request(GPIO_PF6, "net2272");
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
*/ */
const char bfin_board_name[] = "Bluetechnix TCM BF537"; const char bfin_board_name[] = "Bluetechnix TCM BF537";
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -66,14 +66,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -66,14 +66,14 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
}; };
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -86,7 +86,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -86,7 +86,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .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,7 +95,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
...@@ -144,20 +144,20 @@ static struct platform_device bfin_spi0_device = { ...@@ -144,20 +144,20 @@ static struct platform_device bfin_spi0_device = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
static struct platform_device hitachi_fb_device = { static struct platform_device hitachi_fb_device = {
.name = "hitachi-tx09", .name = "hitachi-tx09",
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -189,7 +189,7 @@ static struct platform_device smc91x_device = { ...@@ -189,7 +189,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
static struct resource isp1362_hcd_resources[] = { static struct resource isp1362_hcd_resources[] = {
{ {
.start = 0x20308000, .start = 0x20308000,
...@@ -228,7 +228,7 @@ static struct platform_device isp1362_hcd_device = { ...@@ -228,7 +228,7 @@ static struct platform_device isp1362_hcd_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x20300000, .start = 0x20300000,
...@@ -249,7 +249,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -249,7 +249,7 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
static struct mtd_partition cm_partitions[] = { static struct mtd_partition cm_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -298,7 +298,7 @@ static struct platform_device cm_flash_device = { ...@@ -298,7 +298,7 @@ static struct platform_device cm_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -397,7 +397,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -397,7 +397,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -452,7 +452,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -452,7 +452,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -479,7 +479,7 @@ static struct platform_device i2c_bfin_twi_device = { ...@@ -479,7 +479,7 @@ static struct platform_device i2c_bfin_twi_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -550,7 +550,7 @@ static struct platform_device bfin_sport1_uart_device = { ...@@ -550,7 +550,7 @@ static struct platform_device bfin_sport1_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
#include <linux/bfin_mac.h> #include <linux/bfin_mac.h>
static const unsigned short bfin_mac_peripherals[] = P_MII0; static const unsigned short bfin_mac_peripherals[] = P_MII0;
...@@ -583,7 +583,7 @@ static struct platform_device bfin_mac_device = { ...@@ -583,7 +583,7 @@ static struct platform_device bfin_mac_device = {
}; };
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
#define PATA_INT IRQ_PF14 #define PATA_INT IRQ_PF14
static struct pata_platform_info bfin_pata_platform_data = { static struct pata_platform_info bfin_pata_platform_data = {
...@@ -651,15 +651,15 @@ static struct platform_device *cm_bf537_devices[] __initdata = { ...@@ -651,15 +651,15 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
&hitachi_fb_device, &hitachi_fb_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -668,7 +668,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = { ...@@ -668,7 +668,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -677,11 +677,11 @@ static struct platform_device *cm_bf537_devices[] __initdata = { ...@@ -677,11 +677,11 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi_device, &i2c_bfin_twi_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -690,39 +690,39 @@ static struct platform_device *cm_bf537_devices[] __initdata = { ...@@ -690,39 +690,39 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
&isp1362_hcd_device, &isp1362_hcd_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if IS_ENABLED(CONFIG_BFIN_MAC)
&bfin_mii_bus, &bfin_mii_bus,
&bfin_mac_device, &bfin_mac_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
&bfin_pata_device, &bfin_pata_device,
#endif #endif
#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
&cm_flash_device, &cm_flash_device,
#endif #endif
}; };
static int __init net2272_init(void) static int __init net2272_init(void)
{ {
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
int ret; int ret;
ret = gpio_request(GPIO_PG14, "net2272"); ret = gpio_request(GPIO_PG14, "net2272");
...@@ -742,11 +742,11 @@ static int __init tcm_bf537_init(void) ...@@ -742,11 +742,11 @@ static int __init tcm_bf537_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
#endif #endif
......
...@@ -33,14 +33,14 @@ const char bfin_board_name[] = "ADI BF538-EZKIT"; ...@@ -33,14 +33,14 @@ const char bfin_board_name[] = "ADI BF538-EZKIT";
*/ */
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif /* CONFIG_RTC_DRV_BFIN */ #endif /* CONFIG_RTC_DRV_BFIN */
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -199,7 +199,7 @@ static struct platform_device bfin_uart2_device = { ...@@ -199,7 +199,7 @@ static struct platform_device bfin_uart2_device = {
#endif /* CONFIG_SERIAL_BFIN_UART2 */ #endif /* CONFIG_SERIAL_BFIN_UART2 */
#endif /* CONFIG_SERIAL_BFIN */ #endif /* CONFIG_SERIAL_BFIN */
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -277,7 +277,7 @@ static struct platform_device bfin_sir2_device = { ...@@ -277,7 +277,7 @@ static struct platform_device bfin_sir2_device = {
#endif /* CONFIG_BFIN_SIR2 */ #endif /* CONFIG_BFIN_SIR2 */
#endif /* CONFIG_BFIN_SIR */ #endif /* CONFIG_BFIN_SIR */
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -416,7 +416,7 @@ static struct platform_device bfin_sport3_uart_device = { ...@@ -416,7 +416,7 @@ static struct platform_device bfin_sport3_uart_device = {
#endif /* CONFIG_SERIAL_BFIN_SPORT3_UART */ #endif /* CONFIG_SERIAL_BFIN_SPORT3_UART */
#endif /* CONFIG_SERIAL_BFIN_SPORT */ #endif /* CONFIG_SERIAL_BFIN_SPORT */
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
static unsigned short bfin_can_peripherals[] = { static unsigned short bfin_can_peripherals[] = {
P_CAN0_RX, P_CAN0_TX, 0 P_CAN0_RX, P_CAN0_TX, 0
}; };
...@@ -458,7 +458,7 @@ static struct platform_device bfin_can_device = { ...@@ -458,7 +458,7 @@ static struct platform_device bfin_can_device = {
* USB-LAN EzExtender board * USB-LAN EzExtender board
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -490,10 +490,9 @@ static struct platform_device smc91x_device = { ...@@ -490,10 +490,9 @@ static struct platform_device smc91x_device = {
}; };
#endif /* CONFIG_SMC91X */ #endif /* CONFIG_SMC91X */
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
/* SPI flash chip (m25p16) */ /* SPI flash chip (m25p16) */
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
...@@ -521,7 +520,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -521,7 +520,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
#endif /* CONFIG_MTD_M25P80 */ #endif /* CONFIG_MTD_M25P80 */
#endif /* CONFIG_SPI_BFIN5XX */ #endif /* CONFIG_SPI_BFIN5XX */
#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879)
#include <linux/spi/ad7879.h> #include <linux/spi/ad7879.h>
static const struct ad7879_platform_data bfin_ad7879_ts_info = { static const struct ad7879_platform_data bfin_ad7879_ts_info = {
.model = 7879, /* Model = AD7879 */ .model = 7879, /* Model = AD7879 */
...@@ -538,7 +537,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { ...@@ -538,7 +537,7 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
}; };
#endif /* CONFIG_TOUCHSCREEN_AD7879 */ #endif /* CONFIG_TOUCHSCREEN_AD7879 */
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
#include <asm/bfin-lq035q1.h> #include <asm/bfin-lq035q1.h>
static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
...@@ -568,8 +567,7 @@ static struct platform_device bfin_lq035q1_device = { ...@@ -568,8 +567,7 @@ static struct platform_device bfin_lq035q1_device = {
#endif /* CONFIG_FB_BFIN_LQ035Q1 */ #endif /* CONFIG_FB_BFIN_LQ035Q1 */
static struct spi_board_info bf538_spi_board_info[] __initdata = { static struct spi_board_info bf538_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -581,7 +579,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { ...@@ -581,7 +579,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif /* CONFIG_MTD_M25P80 */ #endif /* CONFIG_MTD_M25P80 */
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7879_SPI)
{ {
.modalias = "ad7879", .modalias = "ad7879",
.platform_data = &bfin_ad7879_ts_info, .platform_data = &bfin_ad7879_ts_info,
...@@ -592,7 +590,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { ...@@ -592,7 +590,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = {
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif /* CONFIG_TOUCHSCREEN_AD7879_SPI */ #endif /* CONFIG_TOUCHSCREEN_AD7879_SPI */
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
{ {
.modalias = "bfin-lq035q1-spi", .modalias = "bfin-lq035q1-spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -601,7 +599,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { ...@@ -601,7 +599,7 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = {
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif /* CONFIG_FB_BFIN_LQ035Q1 */ #endif /* CONFIG_FB_BFIN_LQ035Q1 */
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -717,7 +715,7 @@ static struct platform_device bf538_spi_master2 = { ...@@ -717,7 +715,7 @@ static struct platform_device bf538_spi_master2 = {
}, },
}; };
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -766,7 +764,7 @@ static struct platform_device i2c_bfin_twi1_device = { ...@@ -766,7 +764,7 @@ static struct platform_device i2c_bfin_twi1_device = {
}; };
#endif /* CONFIG_I2C_BLACKFIN_TWI */ #endif /* CONFIG_I2C_BLACKFIN_TWI */
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
static struct gpio_keys_button bfin_gpio_keys_table[] = { static struct gpio_keys_button bfin_gpio_keys_table[] = {
...@@ -814,7 +812,7 @@ static struct platform_device bfin_dpmc = { ...@@ -814,7 +812,7 @@ static struct platform_device bfin_dpmc = {
}, },
}; };
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition ezkit_partitions[] = { static struct mtd_partition ezkit_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -839,7 +837,7 @@ static struct physmap_flash_data ezkit_flash_data = { ...@@ -839,7 +837,7 @@ static struct physmap_flash_data ezkit_flash_data = {
static struct resource ezkit_flash_resource = { static struct resource ezkit_flash_resource = {
.start = 0x20000000, .start = 0x20000000,
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
.end = 0x202fffff, .end = 0x202fffff,
#else #else
.end = 0x203fffff, .end = 0x203fffff,
...@@ -862,11 +860,11 @@ static struct platform_device *cm_bf538_devices[] __initdata = { ...@@ -862,11 +860,11 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -878,18 +876,18 @@ static struct platform_device *cm_bf538_devices[] __initdata = { ...@@ -878,18 +876,18 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bf538_spi_master0, &bf538_spi_master0,
&bf538_spi_master1, &bf538_spi_master1,
&bf538_spi_master2, &bf538_spi_master2,
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi0_device, &i2c_bfin_twi0_device,
&i2c_bfin_twi1_device, &i2c_bfin_twi1_device,
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -901,7 +899,7 @@ static struct platform_device *cm_bf538_devices[] __initdata = { ...@@ -901,7 +899,7 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -916,23 +914,23 @@ static struct platform_device *cm_bf538_devices[] __initdata = { ...@@ -916,23 +914,23 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
&bfin_can_device, &bfin_can_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if IS_ENABLED(CONFIG_FB_BFIN_LQ035Q1)
&bfin_lq035q1_device, &bfin_lq035q1_device,
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&ezkit_flash_device, &ezkit_flash_device,
#endif #endif
}; };
...@@ -942,7 +940,7 @@ static int __init ezkit_init(void) ...@@ -942,7 +940,7 @@ static int __init ezkit_init(void)
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(cm_bf538_devices, ARRAY_SIZE(cm_bf538_devices)); platform_add_devices(cm_bf538_devices, ARRAY_SIZE(cm_bf538_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bf538_spi_board_info, spi_register_board_info(bf538_spi_board_info,
ARRAY_SIZE(bf538_spi_board_info)); ARRAY_SIZE(bf538_spi_board_info));
#endif #endif
......
...@@ -37,7 +37,7 @@ const char bfin_board_name[] = "Bluetechnix CM-BF548"; ...@@ -37,7 +37,7 @@ const char bfin_board_name[] = "Bluetechnix CM-BF548";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) #if IS_ENABLED(CONFIG_FB_BF54X_LQ043)
#include <mach/bf54x-lq043.h> #include <mach/bf54x-lq043.h>
...@@ -69,7 +69,7 @@ static struct platform_device bf54x_lq043_device = { ...@@ -69,7 +69,7 @@ static struct platform_device bf54x_lq043_device = {
}; };
#endif #endif
#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_BFIN)
static unsigned int bf548_keymap[] = { static unsigned int bf548_keymap[] = {
KEYVAL(0, 0, KEY_ENTER), KEYVAL(0, 0, KEY_ENTER),
KEYVAL(0, 1, KEY_HELP), KEYVAL(0, 1, KEY_HELP),
...@@ -119,14 +119,14 @@ static struct platform_device bf54x_kpad_device = { ...@@ -119,14 +119,14 @@ static struct platform_device bf54x_kpad_device = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -353,7 +353,7 @@ static struct platform_device bfin_uart3_device = { ...@@ -353,7 +353,7 @@ static struct platform_device bfin_uart3_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -456,7 +456,7 @@ static struct platform_device bfin_sir3_device = { ...@@ -456,7 +456,7 @@ static struct platform_device bfin_sir3_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
static struct resource smsc911x_resources[] = { static struct resource smsc911x_resources[] = {
...@@ -491,7 +491,7 @@ static struct platform_device smsc911x_device = { ...@@ -491,7 +491,7 @@ static struct platform_device smsc911x_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
static struct resource musb_resources[] = { static struct resource musb_resources[] = {
[0] = { [0] = {
.start = 0xFFC03C00, .start = 0xFFC03C00,
...@@ -553,7 +553,7 @@ static struct platform_device musb_device = { ...@@ -553,7 +553,7 @@ static struct platform_device musb_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -692,7 +692,7 @@ static struct platform_device bfin_sport3_uart_device = { ...@@ -692,7 +692,7 @@ static struct platform_device bfin_sport3_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) #if IS_ENABLED(CONFIG_PATA_BF54X)
static struct resource bfin_atapi_resources[] = { static struct resource bfin_atapi_resources[] = {
{ {
.start = 0xFFC03800, .start = 0xFFC03800,
...@@ -714,7 +714,7 @@ static struct platform_device bfin_atapi_device = { ...@@ -714,7 +714,7 @@ static struct platform_device bfin_atapi_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
static struct mtd_partition partition_info[] = { static struct mtd_partition partition_info[] = {
{ {
.name = "linux kernel(nand)", .name = "linux kernel(nand)",
...@@ -760,7 +760,7 @@ static struct platform_device bf5xx_nand_device = { ...@@ -760,7 +760,7 @@ static struct platform_device bf5xx_nand_device = {
}; };
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
static struct bfin_sd_host bfin_sdh_data = { static struct bfin_sd_host bfin_sdh_data = {
.dma_chan = CH_SDH, .dma_chan = CH_SDH,
.irq_int0 = IRQ_SDH_MASK0, .irq_int0 = IRQ_SDH_MASK0,
...@@ -776,7 +776,7 @@ static struct platform_device bf54x_sdh_device = { ...@@ -776,7 +776,7 @@ static struct platform_device bf54x_sdh_device = {
}; };
#endif #endif
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
static unsigned short bfin_can_peripherals[] = { static unsigned short bfin_can_peripherals[] = {
P_CAN0_RX, P_CAN0_TX, 0 P_CAN0_RX, P_CAN0_TX, 0
}; };
...@@ -814,7 +814,7 @@ static struct platform_device bfin_can_device = { ...@@ -814,7 +814,7 @@ static struct platform_device bfin_can_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition para_partitions[] = { static struct mtd_partition para_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -854,10 +854,9 @@ static struct platform_device para_flash_device = { ...@@ -854,10 +854,9 @@ static struct platform_device para_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
/* SPI flash chip (m25p16) */ /* SPI flash chip (m25p16) */
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
...@@ -884,7 +883,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -884,7 +883,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -901,8 +900,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -901,8 +900,7 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
#endif #endif
static struct spi_board_info bf54x_spi_board_info[] __initdata = { static struct spi_board_info bf54x_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -914,7 +912,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { ...@@ -914,7 +912,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -924,7 +922,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { ...@@ -924,7 +922,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = {
.chip_select = 2, .chip_select = 2,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -1006,7 +1004,7 @@ static struct platform_device bf54x_spi_master1 = { ...@@ -1006,7 +1004,7 @@ static struct platform_device bf54x_spi_master1 = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -1060,7 +1058,7 @@ static struct platform_device i2c_bfin_twi1_device = { ...@@ -1060,7 +1058,7 @@ static struct platform_device i2c_bfin_twi1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
static struct gpio_keys_button bfin_gpio_keys_table[] = { static struct gpio_keys_button bfin_gpio_keys_table[] = {
...@@ -1112,11 +1110,11 @@ static struct platform_device *cm_bf548_devices[] __initdata = { ...@@ -1112,11 +1110,11 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -1131,7 +1129,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = { ...@@ -1131,7 +1129,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -1146,19 +1144,19 @@ static struct platform_device *cm_bf548_devices[] __initdata = { ...@@ -1146,19 +1144,19 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) #if IS_ENABLED(CONFIG_FB_BF54X_LQ043)
&bf54x_lq043_device, &bf54x_lq043_device,
#endif #endif
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
&smsc911x_device, &smsc911x_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
&musb_device, &musb_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -1173,43 +1171,43 @@ static struct platform_device *cm_bf548_devices[] __initdata = { ...@@ -1173,43 +1171,43 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) #if IS_ENABLED(CONFIG_PATA_BF54X)
&bfin_atapi_device, &bfin_atapi_device,
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
&bf5xx_nand_device, &bf5xx_nand_device,
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
&bf54x_sdh_device, &bf54x_sdh_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bf54x_spi_master0, &bf54x_spi_master0,
&bf54x_spi_master1, &bf54x_spi_master1,
#endif #endif
#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_BFIN)
&bf54x_kpad_device, &bf54x_kpad_device,
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi0_device, &i2c_bfin_twi0_device,
#if !defined(CONFIG_BF542) #if !defined(CONFIG_BF542)
&i2c_bfin_twi1_device, &i2c_bfin_twi1_device,
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&para_flash_device, &para_flash_device,
#endif #endif
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
&bfin_can_device, &bfin_can_device,
#endif #endif
...@@ -1220,7 +1218,7 @@ static int __init cm_bf548_init(void) ...@@ -1220,7 +1218,7 @@ static int __init cm_bf548_init(void)
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bf54x_spi_board_info, spi_register_board_info(bf54x_spi_board_info,
ARRAY_SIZE(bf54x_spi_board_info)); ARRAY_SIZE(bf54x_spi_board_info));
#endif #endif
......
...@@ -41,7 +41,7 @@ const char bfin_board_name[] = "ADI BF548-EZKIT"; ...@@ -41,7 +41,7 @@ const char bfin_board_name[] = "ADI BF548-EZKIT";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
#include <linux/usb/isp1760.h> #include <linux/usb/isp1760.h>
static struct resource bfin_isp1760_resources[] = { static struct resource bfin_isp1760_resources[] = {
[0] = { [0] = {
...@@ -76,7 +76,7 @@ static struct platform_device bfin_isp1760_device = { ...@@ -76,7 +76,7 @@ static struct platform_device bfin_isp1760_device = {
}; };
#endif #endif
#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) #if IS_ENABLED(CONFIG_FB_BF54X_LQ043)
#include <mach/bf54x-lq043.h> #include <mach/bf54x-lq043.h>
...@@ -108,7 +108,7 @@ static struct platform_device bf54x_lq043_device = { ...@@ -108,7 +108,7 @@ static struct platform_device bf54x_lq043_device = {
}; };
#endif #endif
#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_BFIN)
static const unsigned int bf548_keymap[] = { static const unsigned int bf548_keymap[] = {
KEYVAL(0, 0, KEY_ENTER), KEYVAL(0, 0, KEY_ENTER),
KEYVAL(0, 1, KEY_HELP), KEYVAL(0, 1, KEY_HELP),
...@@ -158,7 +158,7 @@ static struct platform_device bf54x_kpad_device = { ...@@ -158,7 +158,7 @@ static struct platform_device bf54x_kpad_device = {
}; };
#endif #endif
#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
#include <asm/bfin_rotary.h> #include <asm/bfin_rotary.h>
static struct bfin_rotary_platform_data bfin_rotary_data = { static struct bfin_rotary_platform_data bfin_rotary_data = {
...@@ -190,7 +190,7 @@ static struct platform_device bfin_rotary_device = { ...@@ -190,7 +190,7 @@ static struct platform_device bfin_rotary_device = {
}; };
#endif #endif
#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X)
#include <linux/input/adxl34x.h> #include <linux/input/adxl34x.h>
static const struct adxl34x_platform_data adxl34x_info = { static const struct adxl34x_platform_data adxl34x_info = {
.x_axis_offset = 0, .x_axis_offset = 0,
...@@ -229,14 +229,14 @@ static const struct adxl34x_platform_data adxl34x_info = { ...@@ -229,14 +229,14 @@ static const struct adxl34x_platform_data adxl34x_info = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -491,7 +491,7 @@ static struct platform_device bfin_uart3_device = { ...@@ -491,7 +491,7 @@ static struct platform_device bfin_uart3_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -594,7 +594,7 @@ static struct platform_device bfin_sir3_device = { ...@@ -594,7 +594,7 @@ static struct platform_device bfin_sir3_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
static struct resource smsc911x_resources[] = { static struct resource smsc911x_resources[] = {
...@@ -629,7 +629,7 @@ static struct platform_device smsc911x_device = { ...@@ -629,7 +629,7 @@ static struct platform_device smsc911x_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
static struct resource musb_resources[] = { static struct resource musb_resources[] = {
[0] = { [0] = {
.start = 0xFFC03C00, .start = 0xFFC03C00,
...@@ -691,7 +691,7 @@ static struct platform_device musb_device = { ...@@ -691,7 +691,7 @@ static struct platform_device musb_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -830,7 +830,7 @@ static struct platform_device bfin_sport3_uart_device = { ...@@ -830,7 +830,7 @@ static struct platform_device bfin_sport3_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
static unsigned short bfin_can0_peripherals[] = { static unsigned short bfin_can0_peripherals[] = {
P_CAN0_RX, P_CAN0_TX, 0 P_CAN0_RX, P_CAN0_TX, 0
...@@ -908,7 +908,7 @@ static struct platform_device bfin_can1_device = { ...@@ -908,7 +908,7 @@ static struct platform_device bfin_can1_device = {
#endif #endif
#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) #if IS_ENABLED(CONFIG_PATA_BF54X)
static struct resource bfin_atapi_resources[] = { static struct resource bfin_atapi_resources[] = {
{ {
.start = 0xFFC03800, .start = 0xFFC03800,
...@@ -930,7 +930,7 @@ static struct platform_device bfin_atapi_device = { ...@@ -930,7 +930,7 @@ static struct platform_device bfin_atapi_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
static struct mtd_partition partition_info[] = { static struct mtd_partition partition_info[] = {
{ {
.name = "bootloader(nand)", .name = "bootloader(nand)",
...@@ -980,7 +980,7 @@ static struct platform_device bf5xx_nand_device = { ...@@ -980,7 +980,7 @@ static struct platform_device bf5xx_nand_device = {
}; };
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
static struct bfin_sd_host bfin_sdh_data = { static struct bfin_sd_host bfin_sdh_data = {
.dma_chan = CH_SDH, .dma_chan = CH_SDH,
...@@ -997,7 +997,7 @@ static struct platform_device bf54x_sdh_device = { ...@@ -997,7 +997,7 @@ static struct platform_device bf54x_sdh_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition ezkit_partitions[] = { static struct mtd_partition ezkit_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -1045,8 +1045,7 @@ static struct platform_device ezkit_flash_device = { ...@@ -1045,8 +1045,7 @@ static struct platform_device ezkit_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
/* SPI flash chip (m25p16) */ /* SPI flash chip (m25p16) */
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
...@@ -1073,7 +1072,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -1073,7 +1072,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -1495,8 +1494,7 @@ static struct platform_device bfin_gpj_device = { ...@@ -1495,8 +1494,7 @@ static struct platform_device bfin_gpj_device = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -1508,8 +1506,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1508,8 +1506,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -1517,7 +1514,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1517,7 +1514,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = MAX_CTRL_CS + GPIO_PG6, /* SPI_SSEL2 */ .chip_select = MAX_CTRL_CS + GPIO_PG6, /* SPI_SSEL2 */
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -1527,7 +1524,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1527,7 +1524,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = MAX_CTRL_CS + GPIO_PE5, /* SPI_SSEL2 */ .chip_select = MAX_CTRL_CS + GPIO_PE5, /* SPI_SSEL2 */
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -1535,7 +1532,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1535,7 +1532,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = MAX_CTRL_CS + GPIO_PE4, /* SPI_SSEL1 */ .chip_select = MAX_CTRL_CS + GPIO_PE4, /* SPI_SSEL1 */
}, },
#endif #endif
#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X_SPI)
{ {
.modalias = "adxl34x", .modalias = "adxl34x",
.platform_data = &adxl34x_info, .platform_data = &adxl34x_info,
...@@ -1547,7 +1544,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1547,7 +1544,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -1620,8 +1617,7 @@ static struct platform_device bf54x_spi_master1 = { ...@@ -1620,8 +1617,7 @@ static struct platform_device bf54x_spi_master1 = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
|| defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <media/blackfin/bfin_capture.h> #include <media/blackfin/bfin_capture.h>
#include <media/blackfin/ppi.h> #include <media/blackfin/ppi.h>
...@@ -1641,8 +1637,7 @@ static const struct ppi_info ppi_info = { ...@@ -1641,8 +1637,7 @@ static const struct ppi_info ppi_info = {
.pin_req = ppi_req, .pin_req = ppi_req,
}; };
#if defined(CONFIG_VIDEO_VS6624) \ #if IS_ENABLED(CONFIG_VIDEO_VS6624)
|| defined(CONFIG_VIDEO_VS6624_MODULE)
static struct v4l2_input vs6624_inputs[] = { static struct v4l2_input vs6624_inputs[] = {
{ {
.index = 0, .index = 0,
...@@ -1687,7 +1682,7 @@ static struct platform_device bfin_capture_device = { ...@@ -1687,7 +1682,7 @@ static struct platform_device bfin_capture_device = {
}; };
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -1742,7 +1737,7 @@ static struct platform_device i2c_bfin_twi1_device = { ...@@ -1742,7 +1737,7 @@ static struct platform_device i2c_bfin_twi1_device = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
{ {
I2C_BOARD_INFO("ssm2602", 0x1b), I2C_BOARD_INFO("ssm2602", 0x1b),
}, },
...@@ -1751,25 +1746,25 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { ...@@ -1751,25 +1746,25 @@ static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("pcf8574_lcd", 0x22), I2C_BOARD_INFO("pcf8574_lcd", 0x22),
}, },
#endif #endif
#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) #if IS_ENABLED(CONFIG_INPUT_PCF8574)
{ {
I2C_BOARD_INFO("pcf8574_keypad", 0x27), I2C_BOARD_INFO("pcf8574_keypad", 0x27),
.irq = 212, .irq = 212,
}, },
#endif #endif
#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
{ {
I2C_BOARD_INFO("adxl34x", 0x53), I2C_BOARD_INFO("adxl34x", 0x53),
.irq = IRQ_PC5, .irq = IRQ_PC5,
.platform_data = (void *)&adxl34x_info, .platform_data = (void *)&adxl34x_info,
}, },
#endif #endif
#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) #if IS_ENABLED(CONFIG_BFIN_TWI_LCD)
{ {
I2C_BOARD_INFO("ad5252", 0x2f), I2C_BOARD_INFO("ad5252", 0x2f),
}, },
...@@ -1777,7 +1772,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { ...@@ -1777,7 +1772,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
}; };
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
static struct gpio_keys_button bfin_gpio_keys_table[] = { static struct gpio_keys_button bfin_gpio_keys_table[] = {
...@@ -1828,8 +1823,8 @@ static struct platform_device bfin_dpmc = { ...@@ -1828,8 +1823,8 @@ static struct platform_device bfin_dpmc = {
}, },
}; };
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_I2S) || \
defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) IS_ENABLED(CONFIG_SND_BF5XX_AC97)
#define SPORT_REQ(x) \ #define SPORT_REQ(x) \
[x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \ [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
...@@ -1889,35 +1884,35 @@ static struct resource bfin_snd_resources[][4] = { ...@@ -1889,35 +1884,35 @@ static struct resource bfin_snd_resources[][4] = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s_pcm = { static struct platform_device bfin_i2s_pcm = {
.name = "bfin-i2s-pcm-audio", .name = "bfin-i2s-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
static struct platform_device bfin_ac97_pcm = { static struct platform_device bfin_ac97_pcm = {
.name = "bfin-ac97-pcm-audio", .name = "bfin-ac97-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD73311)
static struct platform_device bfin_ad73311_codec_device = { static struct platform_device bfin_ad73311_codec_device = {
.name = "ad73311", .name = "ad73311",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1980)
static struct platform_device bfin_ad1980_codec_device = { static struct platform_device bfin_ad1980_codec_device = {
.name = "ad1980", .name = "ad1980",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_I2S)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -1929,7 +1924,7 @@ static struct platform_device bfin_i2s = { ...@@ -1929,7 +1924,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AC97)
static struct platform_device bfin_ac97 = { static struct platform_device bfin_ac97 = {
.name = "bfin-ac97", .name = "bfin-ac97",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -1962,11 +1957,11 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -1962,11 +1957,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
&bfin_gpj_device, &bfin_gpj_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -1981,7 +1976,7 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -1981,7 +1976,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -1996,23 +1991,23 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -1996,23 +1991,23 @@ static struct platform_device *ezkit_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) #if IS_ENABLED(CONFIG_FB_BF54X_LQ043)
&bf54x_lq043_device, &bf54x_lq043_device,
#endif #endif
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
&smsc911x_device, &smsc911x_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
&musb_device, &musb_device,
#endif #endif
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
&bfin_isp1760_device, &bfin_isp1760_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -2027,72 +2022,71 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -2027,72 +2022,71 @@ static struct platform_device *ezkit_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
&bfin_can0_device, &bfin_can0_device,
&bfin_can1_device, &bfin_can1_device,
#endif #endif
#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) #if IS_ENABLED(CONFIG_PATA_BF54X)
&bfin_atapi_device, &bfin_atapi_device,
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
&bf5xx_nand_device, &bf5xx_nand_device,
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
&bf54x_sdh_device, &bf54x_sdh_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bf54x_spi_master0, &bf54x_spi_master0,
&bf54x_spi_master1, &bf54x_spi_master1,
#endif #endif
#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
|| defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
&bfin_capture_device, &bfin_capture_device,
#endif #endif
#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_BFIN)
&bf54x_kpad_device, &bf54x_kpad_device,
#endif #endif
#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
&bfin_rotary_device, &bfin_rotary_device,
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi0_device, &i2c_bfin_twi0_device,
#if !defined(CONFIG_BF542) #if !defined(CONFIG_BF542)
&i2c_bfin_twi1_device, &i2c_bfin_twi1_device,
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&ezkit_flash_device, &ezkit_flash_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s_pcm, &bfin_i2s_pcm,
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
&bfin_ac97_pcm, &bfin_ac97_pcm,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1980)
&bfin_ad1980_codec_device, &bfin_ad1980_codec_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s, &bfin_i2s,
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
&bfin_ac97, &bfin_ac97,
#endif #endif
}; };
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
*/ */
const char bfin_board_name[] = "Acvilon board"; const char bfin_board_name[] = "Acvilon board";
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
#include <linux/usb/isp1760.h> #include <linux/usb/isp1760.h>
static struct resource bfin_isp1760_resources[] = { static struct resource bfin_isp1760_resources[] = {
[0] = { [0] = {
...@@ -137,7 +137,7 @@ static struct i2c_board_info acvilon_i2c_devs[] __initdata = { ...@@ -137,7 +137,7 @@ static struct i2c_board_info acvilon_i2c_devs[] __initdata = {
}, },
}; };
#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) #if IS_ENABLED(CONFIG_MTD_PLATRAM)
static struct platdata_mtd_ram mtd_ram_data = { static struct platdata_mtd_ram mtd_ram_data = {
.mapname = "rootfs(RAM)", .mapname = "rootfs(RAM)",
.bankwidth = 4, .bankwidth = 4,
...@@ -160,7 +160,7 @@ static struct platform_device mtd_ram_device = { ...@@ -160,7 +160,7 @@ static struct platform_device mtd_ram_device = {
}; };
#endif #endif
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
static struct resource smsc911x_resources[] = { static struct resource smsc911x_resources[] = {
{ {
...@@ -194,7 +194,7 @@ static struct platform_device smsc911x_device = { ...@@ -194,7 +194,7 @@ static struct platform_device smsc911x_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -246,7 +246,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -246,7 +246,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
static struct mtd_partition bfin_plat_nand_partitions[] = { static struct mtd_partition bfin_plat_nand_partitions[] = {
{ {
...@@ -323,7 +323,7 @@ static void bfin_plat_nand_init(void) ...@@ -323,7 +323,7 @@ static void bfin_plat_nand_init(void)
} }
#endif #endif
#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) #if IS_ENABLED(CONFIG_MTD_DATAFLASH)
static struct mtd_partition bfin_spi_dataflash_partitions[] = { static struct mtd_partition bfin_spi_dataflash_partitions[] = {
{ {
.name = "bootloader", .name = "bootloader",
...@@ -369,7 +369,7 @@ static struct bfin5xx_spi_chip data_flash_chip_info = { ...@@ -369,7 +369,7 @@ static struct bfin5xx_spi_chip data_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -408,7 +408,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -408,7 +408,7 @@ static struct platform_device bfin_spi0_device = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -416,7 +416,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -416,7 +416,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 3, .chip_select = 3,
}, },
#endif #endif
#if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) #if IS_ENABLED(CONFIG_MTD_DATAFLASH)
{ /* DataFlash chip */ { /* DataFlash chip */
.modalias = "mtd_dataflash", .modalias = "mtd_dataflash",
.max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */
...@@ -472,11 +472,11 @@ static struct platform_device bfin_dpmc = { ...@@ -472,11 +472,11 @@ static struct platform_device bfin_dpmc = {
static struct platform_device *acvilon_devices[] __initdata = { static struct platform_device *acvilon_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -484,17 +484,17 @@ static struct platform_device *acvilon_devices[] __initdata = { ...@@ -484,17 +484,17 @@ static struct platform_device *acvilon_devices[] __initdata = {
&bfin_gpios_device, &bfin_gpios_device,
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
&smsc911x_device, &smsc911x_device,
#endif #endif
&bfin_i2c_pca_device, &bfin_i2c_pca_device,
#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_PLATFORM)
&bfin_async_nand_device, &bfin_async_nand_device,
#endif #endif
#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) #if IS_ENABLED(CONFIG_MTD_PLATRAM)
&mtd_ram_device, &mtd_ram_device,
#endif #endif
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
#endif #endif
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
*/ */
const char bfin_board_name[] = "Bluetechnix CM BF561"; const char bfin_board_name[] = "Bluetechnix CM BF561";
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* all SPI peripherals info goes here */ /* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
.name = "bootloader(spi)", .name = "bootloader(spi)",
...@@ -64,7 +64,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { ...@@ -64,7 +64,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if IS_ENABLED(CONFIG_MTD_M25P80)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -77,7 +77,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -77,7 +77,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -85,7 +85,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -85,7 +85,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = 4, .chip_select = 4,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if IS_ENABLED(CONFIG_MMC_SPI)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
...@@ -134,14 +134,14 @@ static struct platform_device bfin_spi0_device = { ...@@ -134,14 +134,14 @@ static struct platform_device bfin_spi0_device = {
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
static struct platform_device hitachi_fb_device = { static struct platform_device hitachi_fb_device = {
.name = "hitachi-tx09", .name = "hitachi-tx09",
}; };
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -173,7 +173,7 @@ static struct platform_device smc91x_device = { ...@@ -173,7 +173,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
static struct resource smsc911x_resources[] = { static struct resource smsc911x_resources[] = {
...@@ -208,7 +208,7 @@ static struct platform_device smsc911x_device = { ...@@ -208,7 +208,7 @@ static struct platform_device smsc911x_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x24000000, .start = 0x24000000,
...@@ -229,7 +229,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -229,7 +229,7 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
static struct resource isp1362_hcd_resources[] = { static struct resource isp1362_hcd_resources[] = {
{ {
.start = 0x24008000, .start = 0x24008000,
...@@ -268,7 +268,7 @@ static struct platform_device isp1362_hcd_device = { ...@@ -268,7 +268,7 @@ static struct platform_device isp1362_hcd_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -319,7 +319,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -319,7 +319,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -348,7 +348,7 @@ static struct platform_device bfin_sir0_device = { ...@@ -348,7 +348,7 @@ static struct platform_device bfin_sir0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
#define PATA_INT IRQ_PF46 #define PATA_INT IRQ_PF46
static struct pata_platform_info bfin_pata_platform_data = { static struct pata_platform_info bfin_pata_platform_data = {
...@@ -385,7 +385,7 @@ static struct platform_device bfin_pata_device = { ...@@ -385,7 +385,7 @@ static struct platform_device bfin_pata_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition para_partitions[] = { static struct mtd_partition para_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -456,54 +456,54 @@ static struct platform_device *cm_bf561_devices[] __initdata = { ...@@ -456,54 +456,54 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
&hitachi_fb_device, &hitachi_fb_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
&isp1362_hcd_device, &isp1362_hcd_device,
#endif #endif
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if IS_ENABLED(CONFIG_SMSC911X)
&smsc911x_device, &smsc911x_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
&bfin_pata_device, &bfin_pata_device,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&para_flash_device, &para_flash_device,
#endif #endif
}; };
static int __init net2272_init(void) static int __init net2272_init(void)
{ {
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
int ret; int ret;
ret = gpio_request(GPIO_PF46, "net2272"); ret = gpio_request(GPIO_PF46, "net2272");
...@@ -523,11 +523,11 @@ static int __init cm_bf561_init(void) ...@@ -523,11 +523,11 @@ static int __init cm_bf561_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices)); platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices));
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif #endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if IS_ENABLED(CONFIG_PATA_PLATFORM)
irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
#endif #endif
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
const char bfin_board_name[] = "ADI BF561-EZKIT"; const char bfin_board_name[] = "ADI BF561-EZKIT";
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
#include <linux/usb/isp1760.h> #include <linux/usb/isp1760.h>
static struct resource bfin_isp1760_resources[] = { static struct resource bfin_isp1760_resources[] = {
[0] = { [0] = {
...@@ -60,7 +60,7 @@ static struct platform_device bfin_isp1760_device = { ...@@ -60,7 +60,7 @@ static struct platform_device bfin_isp1760_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
#include <linux/usb/isp1362.h> #include <linux/usb/isp1362.h>
static struct resource isp1362_hcd_resources[] = { static struct resource isp1362_hcd_resources[] = {
...@@ -101,7 +101,7 @@ static struct platform_device isp1362_hcd_device = { ...@@ -101,7 +101,7 @@ static struct platform_device isp1362_hcd_device = {
}; };
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
static struct resource net2272_bfin_resources[] = { static struct resource net2272_bfin_resources[] = {
{ {
.start = 0x2C000000, .start = 0x2C000000,
...@@ -129,7 +129,7 @@ static struct platform_device net2272_bfin_device = { ...@@ -129,7 +129,7 @@ static struct platform_device net2272_bfin_device = {
* USB-LAN EzExtender board * USB-LAN EzExtender board
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
#include <linux/smc91x.h> #include <linux/smc91x.h>
static struct smc91x_platdata smc91x_info = { static struct smc91x_platdata smc91x_info = {
...@@ -163,7 +163,7 @@ static struct platform_device smc91x_device = { ...@@ -163,7 +163,7 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -214,7 +214,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -214,7 +214,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -243,7 +243,7 @@ static struct platform_device bfin_sir0_device = { ...@@ -243,7 +243,7 @@ static struct platform_device bfin_sir0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition ezkit_partitions[] = { static struct mtd_partition ezkit_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -291,7 +291,7 @@ static struct platform_device ezkit_flash_device = { ...@@ -291,7 +291,7 @@ static struct platform_device ezkit_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -330,8 +330,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -330,8 +330,7 @@ static struct platform_device bfin_spi0_device = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -341,7 +340,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -341,7 +340,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -351,7 +350,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -351,7 +350,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -375,7 +374,7 @@ static struct platform_device bfin_device_gpiokeys = { ...@@ -375,7 +374,7 @@ static struct platform_device bfin_device_gpiokeys = {
}; };
#endif #endif
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) #if IS_ENABLED(CONFIG_I2C_GPIO)
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
static struct i2c_gpio_platform_data i2c_gpio_data = { static struct i2c_gpio_platform_data i2c_gpio_data = {
...@@ -422,8 +421,7 @@ static struct platform_device bfin_dpmc = { ...@@ -422,8 +421,7 @@ static struct platform_device bfin_dpmc = {
}, },
}; };
#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
|| defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <media/blackfin/bfin_capture.h> #include <media/blackfin/bfin_capture.h>
#include <media/blackfin/ppi.h> #include <media/blackfin/ppi.h>
...@@ -443,8 +441,7 @@ static const struct ppi_info ppi_info = { ...@@ -443,8 +441,7 @@ static const struct ppi_info ppi_info = {
.pin_req = ppi_req, .pin_req = ppi_req,
}; };
#if defined(CONFIG_VIDEO_ADV7183) \ #if IS_ENABLED(CONFIG_VIDEO_ADV7183)
|| defined(CONFIG_VIDEO_ADV7183_MODULE)
#include <media/adv7183.h> #include <media/adv7183.h>
static struct v4l2_input adv7183_inputs[] = { static struct v4l2_input adv7183_inputs[] = {
{ {
...@@ -515,7 +512,7 @@ static struct platform_device bfin_capture_device = { ...@@ -515,7 +512,7 @@ static struct platform_device bfin_capture_device = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -523,7 +520,7 @@ static struct platform_device bfin_i2s = { ...@@ -523,7 +520,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
static struct platform_device bfin_ac97 = { static struct platform_device bfin_ac97 = {
.name = "bfin-ac97", .name = "bfin-ac97",
.id = CONFIG_SND_BF5XX_SPORT_NUM, .id = CONFIG_SND_BF5XX_SPORT_NUM,
...@@ -531,8 +528,7 @@ static struct platform_device bfin_ac97 = { ...@@ -531,8 +528,7 @@ static struct platform_device bfin_ac97 = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-i2s.0", "bfin-i2s.0",
"spi0.4", "spi0.4",
...@@ -550,72 +546,70 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -550,72 +546,70 @@ static struct platform_device *ezkit_devices[] __initdata = {
&bfin_dpmc, &bfin_dpmc,
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
&smc91x_device, &smc91x_device,
#endif #endif
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
&net2272_bfin_device, &net2272_bfin_device,
#endif #endif
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
&bfin_isp1760_device, &bfin_isp1760_device,
#endif #endif
#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
&bfin_spi0_device, &bfin_spi0_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) #if IS_ENABLED(CONFIG_I2C_GPIO)
&i2c_gpio_device, &i2c_gpio_device,
#endif #endif
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
&isp1362_hcd_device, &isp1362_hcd_device,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&ezkit_flash_device, &ezkit_flash_device,
#endif #endif
#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
|| defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
&bfin_capture_device, &bfin_capture_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s, &bfin_i2s,
#endif #endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
&bfin_ac97, &bfin_ac97,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
&bfin_ad1836_machine, &bfin_ad1836_machine,
#endif #endif
}; };
static int __init net2272_init(void) static int __init net2272_init(void)
{ {
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) #if IS_ENABLED(CONFIG_USB_NET2272)
int ret; int ret;
ret = gpio_request(GPIO_PF11, "net2272"); ret = gpio_request(GPIO_PF11, "net2272");
...@@ -641,12 +635,12 @@ static int __init ezkit_init(void) ...@@ -641,12 +635,12 @@ static int __init ezkit_init(void)
if (ret < 0) if (ret < 0)
return ret; return ret;
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) #if IS_ENABLED(CONFIG_SMC91X)
bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12)); bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12));
SSYNC(); SSYNC();
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15)); bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15));
bfin_write_FIO0_FLAG_S(1 << 15); bfin_write_FIO0_FLAG_S(1 << 15);
SSYNC(); SSYNC();
......
...@@ -42,7 +42,7 @@ static struct platform_device smc91x_device = { ...@@ -42,7 +42,7 @@ static struct platform_device smc91x_device = {
.resource = smc91x_resources, .resource = smc91x_resources,
}; };
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -93,7 +93,7 @@ static struct platform_device bfin_uart0_device = { ...@@ -93,7 +93,7 @@ static struct platform_device bfin_uart0_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -125,13 +125,13 @@ static struct platform_device bfin_sir0_device = { ...@@ -125,13 +125,13 @@ static struct platform_device bfin_sir0_device = {
static struct platform_device *tepla_devices[] __initdata = { static struct platform_device *tepla_devices[] __initdata = {
&smc91x_device, &smc91x_device,
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
......
...@@ -39,7 +39,7 @@ const char bfin_board_name[] = "ADI BF609-EZKIT"; ...@@ -39,7 +39,7 @@ const char bfin_board_name[] = "ADI BF609-EZKIT";
* Driver needs to know address, irq and flag pin. * Driver needs to know address, irq and flag pin.
*/ */
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
#include <linux/usb/isp1760.h> #include <linux/usb/isp1760.h>
static struct resource bfin_isp1760_resources[] = { static struct resource bfin_isp1760_resources[] = {
[0] = { [0] = {
...@@ -74,7 +74,7 @@ static struct platform_device bfin_isp1760_device = { ...@@ -74,7 +74,7 @@ static struct platform_device bfin_isp1760_device = {
}; };
#endif #endif
#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
#include <asm/bfin_rotary.h> #include <asm/bfin_rotary.h>
static struct bfin_rotary_platform_data bfin_rotary_data = { static struct bfin_rotary_platform_data bfin_rotary_data = {
...@@ -105,7 +105,7 @@ static struct platform_device bfin_rotary_device = { ...@@ -105,7 +105,7 @@ static struct platform_device bfin_rotary_device = {
}; };
#endif #endif
#if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE) #if IS_ENABLED(CONFIG_STMMAC_ETH)
#include <linux/stmmac.h> #include <linux/stmmac.h>
#include <linux/phy.h> #include <linux/phy.h>
...@@ -159,7 +159,7 @@ static struct platform_device bfin_eth_device = { ...@@ -159,7 +159,7 @@ static struct platform_device bfin_eth_device = {
}; };
#endif #endif
#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X)
#include <linux/input/adxl34x.h> #include <linux/input/adxl34x.h>
static const struct adxl34x_platform_data adxl34x_info = { static const struct adxl34x_platform_data adxl34x_info = {
.x_axis_offset = 0, .x_axis_offset = 0,
...@@ -198,14 +198,14 @@ static const struct adxl34x_platform_data adxl34x_info = { ...@@ -198,14 +198,14 @@ static const struct adxl34x_platform_data adxl34x_info = {
}; };
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
static struct platform_device rtc_device = { static struct platform_device rtc_device = {
.name = "rtc-bfin", .name = "rtc-bfin",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
static struct resource bfin_uart0_resources[] = { static struct resource bfin_uart0_resources[] = {
{ {
...@@ -355,7 +355,7 @@ static struct platform_device bfin_uart1_device = { ...@@ -355,7 +355,7 @@ static struct platform_device bfin_uart1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
static struct resource bfin_sir0_resources[] = { static struct resource bfin_sir0_resources[] = {
{ {
...@@ -408,7 +408,7 @@ static struct platform_device bfin_sir1_device = { ...@@ -408,7 +408,7 @@ static struct platform_device bfin_sir1_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
static struct resource musb_resources[] = { static struct resource musb_resources[] = {
[0] = { [0] = {
.start = 0xFFCC1000, .start = 0xFFCC1000,
...@@ -464,7 +464,7 @@ static struct platform_device musb_device = { ...@@ -464,7 +464,7 @@ static struct platform_device musb_device = {
}; };
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
static struct resource bfin_sport0_uart_resources[] = { static struct resource bfin_sport0_uart_resources[] = {
{ {
...@@ -569,7 +569,7 @@ static struct platform_device bfin_sport2_uart_device = { ...@@ -569,7 +569,7 @@ static struct platform_device bfin_sport2_uart_device = {
#endif #endif
#endif #endif
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
static unsigned short bfin_can0_peripherals[] = { static unsigned short bfin_can0_peripherals[] = {
P_CAN0_RX, P_CAN0_TX, 0 P_CAN0_RX, P_CAN0_TX, 0
...@@ -610,7 +610,7 @@ static struct platform_device bfin_can0_device = { ...@@ -610,7 +610,7 @@ static struct platform_device bfin_can0_device = {
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
static struct mtd_partition partition_info[] = { static struct mtd_partition partition_info[] = {
{ {
.name = "bootloader(nand)", .name = "bootloader(nand)",
...@@ -660,7 +660,7 @@ static struct platform_device bfin_nand_device = { ...@@ -660,7 +660,7 @@ static struct platform_device bfin_nand_device = {
}; };
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
static struct bfin_sd_host bfin_sdh_data = { static struct bfin_sd_host bfin_sdh_data = {
.dma_chan = CH_RSI, .dma_chan = CH_RSI,
...@@ -677,7 +677,7 @@ static struct platform_device bfin_sdh_device = { ...@@ -677,7 +677,7 @@ static struct platform_device bfin_sdh_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
static struct mtd_partition ezkit_partitions[] = { static struct mtd_partition ezkit_partitions[] = {
{ {
.name = "bootloader(nor)", .name = "bootloader(nor)",
...@@ -741,8 +741,7 @@ static struct platform_device ezkit_flash_device = { ...@@ -741,8 +741,7 @@ static struct platform_device ezkit_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
/* SPI flash chip (w25q32) */ /* SPI flash chip (w25q32) */
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
...@@ -773,21 +772,20 @@ static struct bfin_spi3_chip spi_flash_chip_info = { ...@@ -773,21 +772,20 @@ static struct bfin_spi3_chip spi_flash_chip_info = {
}; };
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
static struct bfin_spi3_chip spidev_chip_info = { static struct bfin_spi3_chip spidev_chip_info = {
.enable_dma = true, .enable_dma = true,
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
static struct platform_device bfin_i2s_pcm = { static struct platform_device bfin_i2s_pcm = {
.name = "bfin-i2s-pcm-audio", .name = "bfin-i2s-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
#if defined(CONFIG_SND_BF6XX_SOC_I2S) || \ #if IS_ENABLED(CONFIG_SND_BF6XX_SOC_I2S)
defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
#include <asm/bfin_sport3.h> #include <asm/bfin_sport3.h>
static struct resource bfin_snd_resources[] = { static struct resource bfin_snd_resources[] = {
{ {
...@@ -841,8 +839,7 @@ static struct platform_device bfin_i2s = { ...@@ -841,8 +839,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
|| defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
static const char * const ad1836_link[] = { static const char * const ad1836_link[] = {
"bfin-i2s.0", "bfin-i2s.0",
"spi0.76", "spi0.76",
...@@ -856,14 +853,13 @@ static struct platform_device bfin_ad1836_machine = { ...@@ -856,14 +853,13 @@ static struct platform_device bfin_ad1836_machine = {
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61)
defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
static struct platform_device adau1761_device = { static struct platform_device adau1761_device = {
.name = "bfin-eval-adau1x61", .name = "bfin-eval-adau1x61",
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_ADAU1761)
#include <sound/adau17x1.h> #include <sound/adau17x1.h>
static struct adau1761_platform_data adau1761_info = { static struct adau1761_platform_data adau1761_info = {
.lineout_mode = ADAU1761_OUTPUT_MODE_LINE, .lineout_mode = ADAU1761_OUTPUT_MODE_LINE,
...@@ -871,8 +867,7 @@ static struct adau1761_platform_data adau1761_info = { ...@@ -871,8 +867,7 @@ static struct adau1761_platform_data adau1761_info = {
}; };
#endif #endif
#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
|| defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <media/blackfin/bfin_capture.h> #include <media/blackfin/bfin_capture.h>
#include <media/blackfin/ppi.h> #include <media/blackfin/ppi.h>
...@@ -882,7 +877,7 @@ static const unsigned short ppi_req[] = { ...@@ -882,7 +877,7 @@ static const unsigned short ppi_req[] = {
P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7, P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11, P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11,
P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15, P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15,
#if !defined(CONFIG_VIDEO_VS6624) && !defined(CONFIG_VIDEO_VS6624_MODULE) #if !IS_ENABLED(CONFIG_VIDEO_VS6624)
P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19, P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19,
P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23, P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23,
#endif #endif
...@@ -898,8 +893,7 @@ static const struct ppi_info ppi_info = { ...@@ -898,8 +893,7 @@ static const struct ppi_info ppi_info = {
.pin_req = ppi_req, .pin_req = ppi_req,
}; };
#if defined(CONFIG_VIDEO_VS6624) \ #if IS_ENABLED(CONFIG_VIDEO_VS6624)
|| defined(CONFIG_VIDEO_VS6624_MODULE)
static struct v4l2_input vs6624_inputs[] = { static struct v4l2_input vs6624_inputs[] = {
{ {
.index = 0, .index = 0,
...@@ -936,8 +930,7 @@ static struct bfin_capture_config bfin_capture_data = { ...@@ -936,8 +930,7 @@ static struct bfin_capture_config bfin_capture_data = {
}; };
#endif #endif
#if defined(CONFIG_VIDEO_ADV7842) \ #if IS_ENABLED(CONFIG_VIDEO_ADV7842)
|| defined(CONFIG_VIDEO_ADV7842_MODULE)
#include <media/adv7842.h> #include <media/adv7842.h>
static struct v4l2_input adv7842_inputs[] = { static struct v4l2_input adv7842_inputs[] = {
...@@ -1067,8 +1060,7 @@ static struct platform_device bfin_capture_device = { ...@@ -1067,8 +1060,7 @@ static struct platform_device bfin_capture_device = {
}; };
#endif #endif
#if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_DISPLAY)
|| defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <media/blackfin/bfin_display.h> #include <media/blackfin/bfin_display.h>
#include <media/blackfin/ppi.h> #include <media/blackfin/ppi.h>
...@@ -1090,8 +1082,7 @@ static const struct ppi_info ppi_info = { ...@@ -1090,8 +1082,7 @@ static const struct ppi_info ppi_info = {
.pin_req = ppi_req_disp, .pin_req = ppi_req_disp,
}; };
#if defined(CONFIG_VIDEO_ADV7511) \ #if IS_ENABLED(CONFIG_VIDEO_ADV7511)
|| defined(CONFIG_VIDEO_ADV7511_MODULE)
#include <media/adv7511.h> #include <media/adv7511.h>
static struct v4l2_output adv7511_outputs[] = { static struct v4l2_output adv7511_outputs[] = {
...@@ -1313,7 +1304,7 @@ static struct platform_device bfin_crypto_crc_device = { ...@@ -1313,7 +1304,7 @@ static struct platform_device bfin_crypto_crc_device = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -1679,7 +1670,7 @@ static struct platform_device bfin_gpg_device = { ...@@ -1679,7 +1670,7 @@ static struct platform_device bfin_gpg_device = {
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
...@@ -1702,8 +1693,7 @@ static struct platform_device bfin_device_gpiokeys = { ...@@ -1702,8 +1693,7 @@ static struct platform_device bfin_device_gpiokeys = {
#endif #endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if IS_ENABLED(CONFIG_MTD_M25P80)
|| defined(CONFIG_MTD_M25P80_MODULE)
{ {
/* the modalias must be the same as spi device driver name */ /* the modalias must be the same as spi device driver name */
.modalias = "m25p80", /* Name of spi_driver for this device */ .modalias = "m25p80", /* Name of spi_driver for this device */
...@@ -1715,7 +1705,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1715,7 +1705,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if IS_ENABLED(CONFIG_TOUCHSCREEN_AD7877)
{ {
.modalias = "ad7877", .modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info, .platform_data = &bfin_ad7877_ts_info,
...@@ -1725,7 +1715,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1725,7 +1715,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.chip_select = MAX_CTRL_CS + GPIO_PC15, /* SPI_SSEL4 */ .chip_select = MAX_CTRL_CS + GPIO_PC15, /* SPI_SSEL4 */
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if IS_ENABLED(CONFIG_SPI_SPIDEV)
{ {
.modalias = "spidev", .modalias = "spidev",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
...@@ -1734,7 +1724,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -1734,7 +1724,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.controller_data = &spidev_chip_info, .controller_data = &spidev_chip_info,
}, },
#endif #endif
#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X_SPI)
{ {
.modalias = "adxl34x", .modalias = "adxl34x",
.platform_data = &adxl34x_info, .platform_data = &adxl34x_info,
...@@ -1818,7 +1808,7 @@ static struct platform_device bf60x_spi_master1 = { ...@@ -1818,7 +1808,7 @@ static struct platform_device bf60x_spi_master1 = {
}; };
#endif /* spi master and devices */ #endif /* spi master and devices */
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0}; static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
static struct resource bfin_twi0_resource[] = { static struct resource bfin_twi0_resource[] = {
...@@ -1871,20 +1861,20 @@ static struct platform_device i2c_bfin_twi1_device = { ...@@ -1871,20 +1861,20 @@ static struct platform_device i2c_bfin_twi1_device = {
#endif #endif
static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE) #if IS_ENABLED(CONFIG_INPUT_ADXL34X_I2C)
{ {
I2C_BOARD_INFO("adxl34x", 0x53), I2C_BOARD_INFO("adxl34x", 0x53),
.irq = IRQ_PC5, .irq = IRQ_PC5,
.platform_data = (void *)&adxl34x_info, .platform_data = (void *)&adxl34x_info,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_ADAU1761)
{ {
I2C_BOARD_INFO("adau1761", 0x38), I2C_BOARD_INFO("adau1761", 0x38),
.platform_data = (void *)&adau1761_info .platform_data = (void *)&adau1761_info
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE) #if IS_ENABLED(CONFIG_SND_SOC_SSM2602)
{ {
I2C_BOARD_INFO("ssm2602", 0x1b), I2C_BOARD_INFO("ssm2602", 0x1b),
}, },
...@@ -1942,11 +1932,11 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -1942,11 +1932,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
&bfin_gpg_device, &bfin_gpg_device,
#endif #endif
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
&rtc_device, &rtc_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN)
#ifdef CONFIG_SERIAL_BFIN_UART0 #ifdef CONFIG_SERIAL_BFIN_UART0
&bfin_uart0_device, &bfin_uart0_device,
#endif #endif
...@@ -1955,7 +1945,7 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -1955,7 +1945,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) #if IS_ENABLED(CONFIG_BFIN_SIR)
#ifdef CONFIG_BFIN_SIR0 #ifdef CONFIG_BFIN_SIR0
&bfin_sir0_device, &bfin_sir0_device,
#endif #endif
...@@ -1964,19 +1954,19 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -1964,19 +1954,19 @@ static struct platform_device *ezkit_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE) #if IS_ENABLED(CONFIG_STMMAC_ETH)
&bfin_eth_device, &bfin_eth_device,
#endif #endif
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) #if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
&musb_device, &musb_device,
#endif #endif
#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
&bfin_isp1760_device, &bfin_isp1760_device,
#endif #endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
&bfin_sport0_uart_device, &bfin_sport0_uart_device,
#endif #endif
...@@ -1988,15 +1978,15 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -1988,15 +1978,15 @@ static struct platform_device *ezkit_devices[] __initdata = {
#endif #endif
#endif #endif
#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) #if IS_ENABLED(CONFIG_CAN_BFIN)
&bfin_can0_device, &bfin_can0_device,
#endif #endif
#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) #if IS_ENABLED(CONFIG_MTD_NAND_BF5XX)
&bfin_nand_device, &bfin_nand_device,
#endif #endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE) #if IS_ENABLED(CONFIG_SDH_BFIN)
&bfin_sdh_device, &bfin_sdh_device,
#endif #endif
...@@ -2005,11 +1995,11 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -2005,11 +1995,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
&bf60x_spi_master1, &bf60x_spi_master1,
#endif #endif
#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE) #if IS_ENABLED(CONFIG_INPUT_BFIN_ROTARY)
&bfin_rotary_device, &bfin_rotary_device,
#endif #endif
#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
&i2c_bfin_twi0_device, &i2c_bfin_twi0_device,
#if !defined(CONFIG_BF542) #if !defined(CONFIG_BF542)
&i2c_bfin_twi1_device, &i2c_bfin_twi1_device,
...@@ -2024,34 +2014,29 @@ static struct platform_device *ezkit_devices[] __initdata = { ...@@ -2024,34 +2014,29 @@ static struct platform_device *ezkit_devices[] __initdata = {
&bfin_crypto_crc_device, &bfin_crypto_crc_device,
#endif #endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
&bfin_device_gpiokeys, &bfin_device_gpiokeys,
#endif #endif
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
&ezkit_flash_device, &ezkit_flash_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
&bfin_i2s_pcm, &bfin_i2s_pcm,
#endif #endif
#if defined(CONFIG_SND_BF6XX_SOC_I2S) || \ #if IS_ENABLED(CONFIG_SND_BF6XX_SOC_I2S)
defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
&bfin_i2s, &bfin_i2s,
#endif #endif
#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \ #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
&bfin_ad1836_machine, &bfin_ad1836_machine,
#endif #endif
#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \ #if IS_ENABLED(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61)
defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
&adau1761_device, &adau1761_device,
#endif #endif
#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
|| defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
&bfin_capture_device, &bfin_capture_device,
#endif #endif
#if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \ #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_DISPLAY)
|| defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
&bfin_display_device, &bfin_display_device,
#endif #endif
...@@ -2075,9 +2060,9 @@ static struct pinctrl_map __initdata bfin_pinmux_map[] = { ...@@ -2075,9 +2060,9 @@ static struct pinctrl_map __initdata bfin_pinmux_map[] = {
PIN_MAP_MUX_GROUP_DEFAULT("physmap-flash.0", "pinctrl-adi2.0", NULL, "smc0"), PIN_MAP_MUX_GROUP_DEFAULT("physmap-flash.0", "pinctrl-adi2.0", NULL, "smc0"),
PIN_MAP_MUX_GROUP_DEFAULT("bf609_nl8048.2", "pinctrl-adi2.0", NULL, "ppi2_16b"), PIN_MAP_MUX_GROUP_DEFAULT("bf609_nl8048.2", "pinctrl-adi2.0", NULL, "ppi2_16b"),
PIN_MAP_MUX_GROUP_DEFAULT("bfin_display.0", "pinctrl-adi2.0", NULL, "ppi0_16b"), PIN_MAP_MUX_GROUP_DEFAULT("bfin_display.0", "pinctrl-adi2.0", NULL, "ppi0_16b"),
#if defined(CONFIG_VIDEO_MT9M114) || defined(CONFIG_VIDEO_MT9M114_MODULE) #if IS_ENABLED(CONFIG_VIDEO_MT9M114)
PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_8b"), PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_8b"),
#elif defined(CONFIG_VIDEO_VS6624) || defined(CONFIG_VIDEO_VS6624_MODULE) #elif IS_ENABLED(CONFIG_VIDEO_VS6624)
PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_16b"), PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_16b"),
#else #else
PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_24b"), PIN_MAP_MUX_GROUP_DEFAULT("bfin_capture.0", "pinctrl-adi2.0", NULL, "ppi0_24b"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment