From: Fabio Estevam Date: Mon, 2 Dec 2013 06:11:26 +0000 (-0800) Subject: Input: ads7846 - use IS_ENABLED() macro X-Git-Tag: firefly_0821_release~176^2~541^2~217^2~44 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c52b4fc7817579c88db55b2029db7bf2e9d4c934;p=firefly-linux-kernel-4.4.55.git Input: ads7846 - use IS_ENABLED() macro Using the IS_ENABLED() macro can make the code shorter and simpler Signed-off-by: Fabio Estevam Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index ea195360747e..569578638233 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -101,7 +101,7 @@ struct ads7846 { struct spi_device *spi; struct regulator *reg; -#if defined(CONFIG_HWMON) || defined(CONFIG_HWMON_MODULE) +#if IS_ENABLED(CONFIG_HWMON) struct attribute_group *attr_group; struct device *hwmon; #endif @@ -421,7 +421,7 @@ static int ads7845_read12_ser(struct device *dev, unsigned command) return status; } -#if defined(CONFIG_HWMON) || defined(CONFIG_HWMON_MODULE) +#if IS_ENABLED(CONFIG_HWMON) #define SHOW(name, var, adjust) static ssize_t \ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \