diff options
author | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-07-09 11:58:49 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-07-28 18:31:18 -0400 |
commit | 2bd05bf4d2a5807dcc1c52788b842827e5ef0ee9 (patch) | |
tree | 127e69fe3152b4ac371983c63a28bffeef88ee82 /drivers/hwmon/pmbus | |
parent | e0455e380b5bdf8dff7c8e29423d2446d9f59040 (diff) |
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/pmbus')
-rw-r--r-- | drivers/hwmon/pmbus/pmbus_core.c | 10 |
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 @@ | |||
74 | #define PB_STATUS_INPUT_BASE (PB_STATUS_FAN34_BASE + PMBUS_PAGES) | 74 | #define PB_STATUS_INPUT_BASE (PB_STATUS_FAN34_BASE + PMBUS_PAGES) |
75 | #define PB_STATUS_TEMP_BASE (PB_STATUS_INPUT_BASE + 1) | 75 | #define PB_STATUS_TEMP_BASE (PB_STATUS_INPUT_BASE + 1) |
76 | 76 | ||
77 | #define PMBUS_NAME_SIZE 24 | ||
78 | |||
77 | struct pmbus_sensor { | 79 | struct pmbus_sensor { |
78 | char name[I2C_NAME_SIZE]; /* sysfs sensor name */ | 80 | char name[PMBUS_NAME_SIZE]; /* sysfs sensor name */ |
79 | struct sensor_device_attribute attribute; | 81 | struct sensor_device_attribute attribute; |
80 | u8 page; /* page number */ | 82 | u8 page; /* page number */ |
81 | u8 reg; /* register */ | 83 | u8 reg; /* register */ |
@@ -86,14 +88,14 @@ struct pmbus_sensor { | |||
86 | }; | 88 | }; |
87 | 89 | ||
88 | struct pmbus_boolean { | 90 | struct pmbus_boolean { |
89 | char name[I2C_NAME_SIZE]; /* sysfs boolean name */ | 91 | char name[PMBUS_NAME_SIZE]; /* sysfs boolean name */ |
90 | struct sensor_device_attribute attribute; | 92 | struct sensor_device_attribute attribute; |
91 | }; | 93 | }; |
92 | 94 | ||
93 | struct pmbus_label { | 95 | struct pmbus_label { |
94 | char name[I2C_NAME_SIZE]; /* sysfs label name */ | 96 | char name[PMBUS_NAME_SIZE]; /* sysfs label name */ |
95 | struct sensor_device_attribute attribute; | 97 | struct sensor_device_attribute attribute; |
96 | char label[I2C_NAME_SIZE]; /* label */ | 98 | char label[PMBUS_NAME_SIZE]; /* label */ |
97 | }; | 99 | }; |
98 | 100 | ||
99 | struct pmbus_data { | 101 | struct pmbus_data { |