From: Frans Meulenbroeks Date: Sun, 8 Jan 2012 18:34:19 +0000 (+0100) Subject: hwmon: (wm831x-hwmon) fix checkpatch issues X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6100f6b49bf8e30c42add718db47f7c39392f5b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git hwmon: (wm831x-hwmon) fix checkpatch issues 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 Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/wm831x-hwmon.c b/drivers/hwmon/wm831x-hwmon.c index 9b598ed26020..23b44de76740 100644 --- a/drivers/hwmon/wm831x-hwmon.c +++ b/drivers/hwmon/wm831x-hwmon.c @@ -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",