]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mfd: Use IS_ENABLED(CONFIG_FOO) instead of checking FOO || FOO_MODULE
authorJavier Martinez Canillas <javier@osg.samsung.com>
Wed, 20 Apr 2016 17:45:46 +0000 (13:45 -0400)
committerLee Jones <lee.jones@linaro.org>
Mon, 9 May 2016 07:23:56 +0000 (08:23 +0100)
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.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/dm355evm_msp.c
drivers/mfd/wm8400-core.c

index d7d59f8d9d06ea4f499b0953bd496658fbc0d18b..14661ec5ef7fe46beb514ff8b3a6e5822e989019 100644 (file)
  * This driver was tested with firmware revision A4.
  */
 
-#if defined(CONFIG_INPUT_DM355EVM) || defined(CONFIG_INPUT_DM355EVM_MODULE)
+#if IS_ENABLED(CONFIG_INPUT_DM355EVM)
 #define msp_has_keyboard()     true
 #else
 #define msp_has_keyboard()     false
 #endif
 
-#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+#if IS_ENABLED(CONFIG_LEDS_GPIO)
 #define msp_has_leds()         true
 #else
 #define msp_has_leds()         false
 #endif
 
-#if defined(CONFIG_RTC_DRV_DM355EVM) || defined(CONFIG_RTC_DRV_DM355EVM_MODULE)
+#if IS_ENABLED(CONFIG_RTC_DRV_DM355EVM)
 #define msp_has_rtc()          true
 #else
 #define msp_has_rtc()          false
 #endif
 
-#if defined(CONFIG_VIDEO_TVP514X) || defined(CONFIG_VIDEO_TVP514X_MODULE)
+#if IS_ENABLED(CONFIG_VIDEO_TVP514X)
 #define msp_has_tvp()          true
 #else
 #define msp_has_tvp()          false
index 81667762c3ad151417b3e8498203d67fb552024b..8a98a2fc74e11fa1204677ffffa9b57ca206b92e 100644 (file)
@@ -126,7 +126,7 @@ void wm8400_reset_codec_reg_cache(struct wm8400 *wm8400)
 }
 EXPORT_SYMBOL_GPL(wm8400_reset_codec_reg_cache);
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 static int wm8400_i2c_probe(struct i2c_client *i2c,
                            const struct i2c_device_id *id)
 {
@@ -165,7 +165,7 @@ static int __init wm8400_module_init(void)
 {
        int ret = -ENODEV;
 
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
        ret = i2c_add_driver(&wm8400_i2c_driver);
        if (ret != 0)
                pr_err("Failed to register I2C driver: %d\n", ret);
@@ -177,7 +177,7 @@ subsys_initcall(wm8400_module_init);
 
 static void __exit wm8400_module_exit(void)
 {
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
        i2c_del_driver(&wm8400_i2c_driver);
 #endif
 }