]> Pileus Git - ~andy/linux/commitdiff
hwmon: (wm831x-hwmon) fix checkpatch issues
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>
Sun, 8 Jan 2012 18:34:19 +0000 (19:34 +0100)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Mon, 19 Mar 2012 01:26:33 +0000 (18:26 -0700)
fixed:
WARNING: static const char * array should probably be static const char * const
+static const char *input_names[] = {

not fixed (will probably provide separate fix later)
ERROR: Macros with multiple statements should be enclosed in a do - while loop
+#define WM831X_NAMED_VOLTAGE(id, name) \
+ WM831X_VOLTAGE(id, name); \
+ static SENSOR_DEVICE_ATTR(in##id##_label, S_IRUGO, show_label, \
+   NULL, name)

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/wm831x-hwmon.c

index 9b598ed26020563978f1142840c4b6a5f0ecad77..23b44de7674048f0895c02ceedeece4ba3ec4ee7 100644 (file)
@@ -40,7 +40,7 @@ static ssize_t show_name(struct device *dev,
        return sprintf(buf, "wm831x\n");
 }
 
-static const char *input_names[] = {
+static const char * const input_names[] = {
        [WM831X_AUX_SYSVDD]    = "SYSVDD",
        [WM831X_AUX_USB]       = "USB",
        [WM831X_AUX_BKUP_BATT] = "Backup battery",