--- zzzz-none-000/linux-3.10.107/arch/blackfin/mach-bf533/boards/H8606.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/blackfin/mach-bf533/boards/H8606.c 2021-02-04 17:41:59.000000000 +0000 @@ -14,7 +14,7 @@ #include #include #include -#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) +#if IS_ENABLED(CONFIG_USB_ISP1362_HCD) #include #endif #include @@ -29,7 +29,7 @@ */ 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 = { .name = "rtc-bfin", .id = -1, @@ -39,7 +39,7 @@ /* * 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[] = { [0] = { .start = 0x20300000, @@ -67,7 +67,7 @@ }; #endif -#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) +#if IS_ENABLED(CONFIG_SMC91X) #include static struct smc91x_platdata smc91x_info = { @@ -104,7 +104,7 @@ }; #endif -#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) +#if IS_ENABLED(CONFIG_USB_NET2272) static struct resource net2272_bfin_resources[] = { { .start = 0x20300000, @@ -125,10 +125,10 @@ }; #endif -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) /* 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[] = { { .name = "bootloader (spi)", @@ -166,7 +166,7 @@ /* Notice: for blackfin, the speed_hz is the value of register * SPI_BAUD, not the real baudrate */ 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 */ .modalias = "m25p80", /* Name of spi_driver for this device */ @@ -180,7 +180,7 @@ }, #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", .max_speed_hz = 16, @@ -229,7 +229,7 @@ }; #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 static struct resource bfin_uart0_resources[] = { { @@ -280,7 +280,7 @@ #endif #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 static struct resource bfin_sir0_resources[] = { { @@ -309,7 +309,7 @@ #endif #endif -#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_8250) #include #include @@ -353,7 +353,7 @@ #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, @@ -382,43 +382,43 @@ #endif 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, #endif -#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) +#if IS_ENABLED(CONFIG_DM9000) &dm9000_device, #endif -#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) +#if IS_ENABLED(CONFIG_SMC91X) &smc91x_device, #endif -#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) +#if IS_ENABLED(CONFIG_USB_NET2272) &net2272_bfin_device, #endif -#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) +#if IS_ENABLED(CONFIG_SPI_BFIN5XX) &bfin_spi0_device, #endif -#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_BFIN) #ifdef CONFIG_SERIAL_BFIN_UART0 &bfin_uart0_device, #endif #endif -#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) +#if IS_ENABLED(CONFIG_SERIAL_8250) &serial8250_device, #endif -#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) +#if IS_ENABLED(CONFIG_BFIN_SIR) #ifdef CONFIG_BFIN_SIR0 &bfin_sir0_device, #endif #endif -#if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) +#if IS_ENABLED(CONFIG_KEYBOARD_OPENCORES) &opencores_kbd_device, #endif }; @@ -428,7 +428,7 @@ printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n"); printk(KERN_INFO "%s(): registering device resources\n", __func__); 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)); #endif return 0;