diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-07-21 12:11:01 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-07-26 02:44:56 -0400 |
commit | 175c7080f2747b96e4b5352e4c38ddf9a0eacfdb (patch) | |
tree | 0a368ebe90c45e9d80b516abdbce19fc6c22f940 /drivers/i2c | |
parent | b4cdaf32ce04366ec143c2255492918c35f58691 (diff) |
i2c: i801: use IS_ENABLED() instead of checking for built-in or module
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>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 68cec6128ac0..5ef9b733d153 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
@@ -98,8 +98,7 @@ | |||
98 | #include <linux/platform_data/itco_wdt.h> | 98 | #include <linux/platform_data/itco_wdt.h> |
99 | #include <linux/pm_runtime.h> | 99 | #include <linux/pm_runtime.h> |
100 | 100 | ||
101 | #if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ | 101 | #if IS_ENABLED(CONFIG_I2C_MUX_GPIO) && defined CONFIG_DMI |
102 | defined CONFIG_DMI | ||
103 | #include <linux/gpio.h> | 102 | #include <linux/gpio.h> |
104 | #include <linux/i2c-mux-gpio.h> | 103 | #include <linux/i2c-mux-gpio.h> |
105 | #endif | 104 | #endif |
@@ -255,8 +254,7 @@ struct i801_priv { | |||
255 | int len; | 254 | int len; |
256 | u8 *data; | 255 | u8 *data; |
257 | 256 | ||
258 | #if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ | 257 | #if IS_ENABLED(CONFIG_I2C_MUX_GPIO) && defined CONFIG_DMI |
259 | defined CONFIG_DMI | ||
260 | const struct i801_mux_config *mux_drvdata; | 258 | const struct i801_mux_config *mux_drvdata; |
261 | struct platform_device *mux_pdev; | 259 | struct platform_device *mux_pdev; |
262 | #endif | 260 | #endif |
@@ -1133,8 +1131,7 @@ static void __init input_apanel_init(void) {} | |||
1133 | static void i801_probe_optional_slaves(struct i801_priv *priv) {} | 1131 | static void i801_probe_optional_slaves(struct i801_priv *priv) {} |
1134 | #endif /* CONFIG_X86 && CONFIG_DMI */ | 1132 | #endif /* CONFIG_X86 && CONFIG_DMI */ |
1135 | 1133 | ||
1136 | #if (defined CONFIG_I2C_MUX_GPIO || defined CONFIG_I2C_MUX_GPIO_MODULE) && \ | 1134 | #if IS_ENABLED(CONFIG_I2C_MUX_GPIO) && defined CONFIG_DMI |
1137 | defined CONFIG_DMI | ||
1138 | static struct i801_mux_config i801_mux_config_asus_z8_d12 = { | 1135 | static struct i801_mux_config i801_mux_config_asus_z8_d12 = { |
1139 | .gpio_chip = "gpio_ich", | 1136 | .gpio_chip = "gpio_ich", |
1140 | .values = { 0x02, 0x03 }, | 1137 | .values = { 0x02, 0x03 }, |