]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: OMAP1: use IS_ENABLED() instead of checking for built-in or module
authorJavier Martinez Canillas <javier@osg.samsung.com>
Thu, 11 Aug 2016 19:29:44 +0000 (15:29 -0400)
committerTony Lindgren <tony@atomide.com>
Fri, 26 Aug 2016 15:41:59 +0000 (08:41 -0700)
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
built-in or as a module, use that macro instead of open coding the same.

Using the macro makes the code more readable by helping abstract away some
of the Kconfig built-in and module enable details.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 files changed:
arch/arm/mach-omap1/board-h2-mmc.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3-mmc.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-htcherald.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-sx1-mmc.c
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/fb.c
arch/arm/mach-omap1/include/mach/usb.h
arch/arm/mach-omap1/mmc.h
arch/arm/mach-omap1/usb.c

index 7119ef28e0adf2e7869da0d4238fe0b30ea677c7..357be2debc9da8334d232c49fc75f82c1bd3a23a 100644 (file)
@@ -19,7 +19,7 @@
 #include "board-h2.h"
 #include "mmc.h"
 
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_MMC_OMAP)
 
 static int mmc_set_power(struct device *dev, int slot, int power_on,
                                int vdd)
index cd146ed0538df60c1208450dbd7db9dae5d519cf..675254ee4b1e936365fde71402bd9f4a256f74e5 100644 (file)
@@ -349,7 +349,7 @@ static struct omap_usb_config h2_usb_config __initdata = {
 #if IS_ENABLED(CONFIG_USB_OMAP)
        .hmc_mode       = 19,   /* 0:host(off) 1:dev|otg 2:disabled */
        /* .hmc_mode    = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */
-#elif  defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+#elif  IS_ENABLED(CONFIG_USB_OHCI_HCD)
        /* needs OTG cable, or NONSTANDARD (B-to-MiniB) */
        .hmc_mode       = 20,   /* 1:dev|otg(off) 1:host 2:disabled */
 #endif
index 43aab63cbc39da2903fc600faf0fbdbbfbb9d8d6..4f58bfa5e7549ec8eeb3188f932b1b9d3287a9ed 100644 (file)
@@ -20,7 +20,7 @@
 #include "board-h3.h"
 #include "mmc.h"
 
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_MMC_OMAP)
 
 static int mmc_set_power(struct device *dev, int slot, int power_on,
                                int vdd)
index f7c8c63dd53288744cfe59eaf4cf6df4d11efe99..e62f9d454f100546ccd02fbf0fbcd5bcf30a0208 100644 (file)
@@ -368,7 +368,7 @@ static struct omap_usb_config h3_usb_config __initdata = {
 
 #if IS_ENABLED(CONFIG_USB_OMAP)
        .hmc_mode       = 19,   /* 0:host(off) 1:dev|otg 2:disabled */
-#elif  defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+#elif IS_ENABLED(CONFIG_USB_OHCI_HCD)
        /* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
        .hmc_mode       = 20,   /* 1:dev|otg(off) 1:host 2:disabled */
 #endif
index 9525ef9bc6c0db1b3e706a58b4348980b8843712..e424df901dbd7ee6a914f0b171526a5a8533298a 100644 (file)
@@ -401,7 +401,7 @@ static struct platform_device lcd_device = {
 };
 
 /* MMC Card */
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_MMC_OMAP)
 static struct omap_mmc_platform_data htc_mmc1_data = {
        .nr_slots                       = 1,
        .switch_slot                    = NULL,
@@ -586,7 +586,7 @@ static void __init htcherald_init(void)
 
        omap_register_i2c_bus(1, 100, NULL, 0);
 
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_MMC_OMAP)
        htc_mmc_data[0] = &htc_mmc1_data;
        omap1_init_mmc(htc_mmc_data, 1);
 #endif
index ae90bd02b3bf3ca8af38d8115a413d4e26a86ff3..67e1882716434bc8f8a19c036f695f8c44fcc4a0 100644 (file)
@@ -315,7 +315,7 @@ static struct omap_usb_config h2_usb_config __initdata = {
 #if IS_ENABLED(CONFIG_USB_OMAP)
        .hmc_mode       = 19,   /* 0:host(off) 1:dev|otg 2:disabled */
        /* .hmc_mode    = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */
-#elif  defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+#elif  IS_ENABLED(CONFIG_USB_OHCI_HCD)
        /* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
        .hmc_mode       = 20,   /* 1:dev|otg(off) 1:host 2:disabled */
 #endif
@@ -328,7 +328,7 @@ static struct omap_lcd_config innovator1610_lcd_config __initdata = {
 };
 #endif
 
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_MMC_OMAP)
 
 static int mmc_set_power(struct device *dev, int slot, int power_on,
                                int vdd)
index dd3a3ad797ea4ab191e5e87f642eb5c5eefa5985..ee8d9f553db448d2770d12c4afd04ed6b1f92904 100644 (file)
@@ -159,7 +159,7 @@ static struct omap_usb_config nokia770_usb_config __initdata = {
        .extcon         = "tahvo-usb",
 };
 
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_MMC_OMAP)
 
 #define NOKIA770_GPIO_MMC_POWER                41
 #define NOKIA770_GPIO_MMC_SWITCH       23
@@ -216,7 +216,7 @@ static inline void nokia770_mmc_init(void)
 }
 #endif
 
-#if defined(CONFIG_I2C_CBUS_GPIO) || defined(CONFIG_I2C_CBUS_GPIO_MODULE)
+#if IS_ENABLED(CONFIG_I2C_CBUS_GPIO)
 static struct i2c_cbus_platform_data nokia770_cbus_data = {
        .clk_gpio = OMAP_MPUIO(9),
        .dat_gpio = OMAP_MPUIO(10),
index a9373570bbb146fff4b841195f795ca597c24f44..79f0af8bfae07aa5b1a8be5e0115da3857ed3c6e 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "mmc.h"
 
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_MMC_OMAP)
 
 static int mmc_set_power(struct device *dev, int slot, int power_on,
                                int vdd)
index 8c8be861fff233d23cb116fd6bd5e5c9a5b900cd..baaf902b7016539e0eb07da47750b95119a2fdf8 100644 (file)
@@ -33,7 +33,7 @@
 #include "mmc.h"
 #include "sram.h"
 
-#if defined(CONFIG_RTC_DRV_OMAP) || defined(CONFIG_RTC_DRV_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_RTC_DRV_OMAP)
 
 #define        OMAP_RTC_BASE           0xfffb4800
 
@@ -72,7 +72,7 @@ static inline void omap_init_mbox(void) { }
 
 /*-------------------------------------------------------------------------*/
 
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_MMC_OMAP)
 
 static inline void omap1_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
                        int controller_nr)
@@ -230,7 +230,7 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
 /*-------------------------------------------------------------------------*/
 
 /* OMAP7xx SPI support */
-#if defined(CONFIG_SPI_OMAP_100K) || defined(CONFIG_SPI_OMAP_100K_MODULE)
+#if IS_ENABLED(CONFIG_SPI_OMAP_100K)
 
 struct platform_device omap_spi1 = {
        .name           = "omap1_spi100k",
@@ -312,7 +312,7 @@ static inline void omap_init_sti(void) {}
  * mcbsp1..3   = 5..7
  */
 
-#if defined(CONFIG_SPI_OMAP_UWIRE) || defined(CONFIG_SPI_OMAP_UWIRE_MODULE)
+#if IS_ENABLED(CONFIG_SPI_OMAP_UWIRE)
 
 #define        OMAP_UWIRE_BASE         0xfffb3000
 
@@ -418,7 +418,7 @@ static int __init omap1_init_devices(void)
 }
 arch_initcall(omap1_init_devices);
 
-#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
+#if IS_ENABLED(CONFIG_OMAP_WATCHDOG)
 
 static struct resource wdt_resources[] = {
        {
index c770d45c72262f427b8518d8fad8891d08b68e22..ddab04087b7ac78d1c2b0d07672a9f9d00c5ebd4 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <asm/mach/map.h>
 
-#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_FB_OMAP)
 
 static bool omapfb_lcd_configured;
 static struct omapfb_platform_data omapfb_config;
index 2c263051dc518ba6e822e17acb7a031d6cfc838f..a7c5559caef2c0ca4dfe73826749b7fda7f83327 100644 (file)
@@ -12,7 +12,7 @@
 
 void omap_otg_init(struct omap_usb_config *config);
 
-#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)
+#if IS_ENABLED(CONFIG_USB)
 void omap1_usb_init(struct omap_usb_config *pdata);
 #else
 static inline void omap1_usb_init(struct omap_usb_config *pdata)
index 39c2b13de884c7c2c3ea257fd9031797f90f10bb..d7b46880e4ca50538dd62c13c655b586a4c43cad 100644 (file)
@@ -7,7 +7,7 @@
 #define OMAP1_MMC1_BASE                0xfffb7800
 #define OMAP1_MMC2_BASE                0xfffb7c00      /* omap16xx only */
 
-#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
+#if IS_ENABLED(CONFIG_MMC_OMAP)
 void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
                                int nr_controllers);
 #else
index 4118db50d5e863ce3ec6d58c353a1fac20af2032..2506e598a06747b5791cdcd05390c5e9e22051a7 100644 (file)
@@ -136,7 +136,7 @@ omap_otg_init(struct omap_usb_config *config)
        }
 #endif
 
-#if    defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+#if    IS_ENABLED(CONFIG_USB_OHCI_HCD)
        if (config->otg || config->register_host) {
                struct platform_device *ohci_device = config->ohci_device;
                int status;
@@ -221,7 +221,7 @@ static inline void udc_device_init(struct omap_usb_config *pdata)
 
 #endif
 
-#if    defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+#if    IS_ENABLED(CONFIG_USB_OHCI_HCD)
 
 /* The dmamask must be set for OHCI to work */
 static u64 ohci_dmamask = ~(u32)0;
@@ -612,7 +612,7 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config)
        }
 #endif
 
-#if    defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+#if    IS_ENABLED(CONFIG_USB_OHCI_HCD)
        if (config->register_host) {
                int status;