提交 c52b4fc7 编写于 作者: F Fabio Estevam 提交者: Dmitry Torokhov

Input: ads7846 - use IS_ENABLED() macro

Using the IS_ENABLED() macro can make the code shorter and simpler
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 976358e2
......@@ -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) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册