diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-01-10 08:54:40 -0500 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-04-08 00:16:38 -0400 |
commit | 24f9c539b9b7ef8fcc97741027a31f40ef399741 (patch) | |
tree | fb3139765071ebb015436f970ee9d19880c8f7c9 /drivers/hwmon/s3c-hwmon.c | |
parent | 692fe501da4b851cbb60edc672679ad1b41e1602 (diff) |
hwmon: Fix 'Macros with complex values' checkpatch errors
Fix:
ERROR: Macros with complex values should be enclosed in parenthesis
when it is seen due to complex code and not due to multi-line variable
declarations.
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Alistair John Strachan <alistair@devzero.co.uk>
Acked-by: Alistair John Strachan <alistair@devzero.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/s3c-hwmon.c')
-rw-r--r-- | drivers/hwmon/s3c-hwmon.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c index ff2ae0252a48..a9f7e804f1e4 100644 --- a/drivers/hwmon/s3c-hwmon.c +++ b/drivers/hwmon/s3c-hwmon.c | |||
@@ -107,17 +107,14 @@ static ssize_t s3c_hwmon_show_raw(struct device *dev, | |||
107 | return (ret < 0) ? ret : snprintf(buf, PAGE_SIZE, "%d\n", ret); | 107 | return (ret < 0) ? ret : snprintf(buf, PAGE_SIZE, "%d\n", ret); |
108 | } | 108 | } |
109 | 109 | ||
110 | #define DEF_ADC_ATTR(x) \ | 110 | static SENSOR_DEVICE_ATTR(adc0_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 0); |
111 | static SENSOR_DEVICE_ATTR(adc##x##_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, x) | 111 | static SENSOR_DEVICE_ATTR(adc1_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 1); |
112 | 112 | static SENSOR_DEVICE_ATTR(adc2_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 2); | |
113 | DEF_ADC_ATTR(0); | 113 | static SENSOR_DEVICE_ATTR(adc3_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 3); |
114 | DEF_ADC_ATTR(1); | 114 | static SENSOR_DEVICE_ATTR(adc4_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 4); |
115 | DEF_ADC_ATTR(2); | 115 | static SENSOR_DEVICE_ATTR(adc5_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 5); |
116 | DEF_ADC_ATTR(3); | 116 | static SENSOR_DEVICE_ATTR(adc6_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 6); |
117 | DEF_ADC_ATTR(4); | 117 | static SENSOR_DEVICE_ATTR(adc7_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 7); |
118 | DEF_ADC_ATTR(5); | ||
119 | DEF_ADC_ATTR(6); | ||
120 | DEF_ADC_ATTR(7); | ||
121 | 118 | ||
122 | static struct attribute *s3c_hwmon_attrs[9] = { | 119 | static struct attribute *s3c_hwmon_attrs[9] = { |
123 | &sensor_dev_attr_adc0_raw.dev_attr.attr, | 120 | &sensor_dev_attr_adc0_raw.dev_attr.attr, |