summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-07-09 17:58:49 +0200
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-07-29 00:31:18 +0200
commit2bd05bf4d2a5807dcc1c52788b842827e5ef0ee9 (patch)
tree127e69fe3152b4ac371983c63a28bffeef88ee82 /drivers/hwmon
parenthwmon: (pmbus) Add ADP4000, NCP4200 and NCP4208 to list of supported devices (diff)
downloadlinux-2bd05bf4d2a5807dcc1c52788b842827e5ef0ee9.tar.xz
linux-2bd05bf4d2a5807dcc1c52788b842827e5ef0ee9.zip
hwmon: (pmbus) Increase attribute name size
Some hwmon sysfs attributes have a length of 20 bytes (plus terminating 0). I2C_NAME_SIZE is defined as 20 and thus can not be used to define the length of hwmon sysfs attributes. Replace it with PMBUS_NAME_SIZE, set to 24. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/pmbus/pmbus_core.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index cef763c7da3f..8ff7ebf53380 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -74,8 +74,10 @@
#define PB_STATUS_INPUT_BASE (PB_STATUS_FAN34_BASE + PMBUS_PAGES)
#define PB_STATUS_TEMP_BASE (PB_STATUS_INPUT_BASE + 1)
+#define PMBUS_NAME_SIZE 24
+
struct pmbus_sensor {
- char name[I2C_NAME_SIZE]; /* sysfs sensor name */
+ char name[PMBUS_NAME_SIZE]; /* sysfs sensor name */
struct sensor_device_attribute attribute;
u8 page; /* page number */
u8 reg; /* register */
@@ -86,14 +88,14 @@ struct pmbus_sensor {
};
struct pmbus_boolean {
- char name[I2C_NAME_SIZE]; /* sysfs boolean name */
+ char name[PMBUS_NAME_SIZE]; /* sysfs boolean name */
struct sensor_device_attribute attribute;
};
struct pmbus_label {
- char name[I2C_NAME_SIZE]; /* sysfs label name */
+ char name[PMBUS_NAME_SIZE]; /* sysfs label name */
struct sensor_device_attribute attribute;
- char label[I2C_NAME_SIZE]; /* label */
+ char label[PMBUS_NAME_SIZE]; /* label */
};
struct pmbus_data {