summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/mc13783-adc.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-09-13 13:25:53 -0400
committerGuenter Roeck <linux@roeck-us.net>2013-10-13 19:16:26 -0400
commitae02e7418ffa2ba5d927869ef9eab4c87549d8e9 (patch)
treed49ba6edb6298e79f4230b04bb1dcf0bae0e5af1 /drivers/hwmon/mc13783-adc.c
parent45a5b3a183b43e07b7d1eaf1ef7c00fc87511b1b (diff)
hwmon: (mc13783-adc) Increase size of name string
smatch complains about mc13783_adc_probe() error: snprintf() chops off the last chars of 'id->name': 20 +vs 10 Use PLATFORM_NAME_SIZE instead of '10' as size when declaring the name variable. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/mc13783-adc.c')
-rw-r--r--drivers/hwmon/mc13783-adc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/mc13783-adc.c b/drivers/hwmon/mc13783-adc.c
index 982d8622c09b..ae00e60d856c 100644
--- a/drivers/hwmon/mc13783-adc.c
+++ b/drivers/hwmon/mc13783-adc.c
@@ -37,7 +37,7 @@
37struct mc13783_adc_priv { 37struct mc13783_adc_priv {
38 struct mc13xxx *mc13xxx; 38 struct mc13xxx *mc13xxx;
39 struct device *hwmon_dev; 39 struct device *hwmon_dev;
40 char name[10]; 40 char name[PLATFORM_NAME_SIZE];
41}; 41};
42 42
43static ssize_t mc13783_adc_show_name(struct device *dev, struct device_attribute 43static ssize_t mc13783_adc_show_name(struct device *dev, struct device_attribute