diff options
Diffstat (limited to 'drivers/i2c/chips/gl518sm.c')
-rw-r--r-- | drivers/i2c/chips/gl518sm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/i2c/chips/gl518sm.c b/drivers/i2c/chips/gl518sm.c index c82d6ce21205..4316a1562251 100644 --- a/drivers/i2c/chips/gl518sm.c +++ b/drivers/i2c/chips/gl518sm.c | |||
@@ -164,14 +164,14 @@ static struct i2c_driver gl518_driver = { | |||
164 | */ | 164 | */ |
165 | 165 | ||
166 | #define show(type, suffix, value) \ | 166 | #define show(type, suffix, value) \ |
167 | static ssize_t show_##suffix(struct device *dev, char *buf) \ | 167 | static ssize_t show_##suffix(struct device *dev, struct device_attribute *attr, char *buf) \ |
168 | { \ | 168 | { \ |
169 | struct gl518_data *data = gl518_update_device(dev); \ | 169 | struct gl518_data *data = gl518_update_device(dev); \ |
170 | return sprintf(buf, "%d\n", type##_FROM_REG(data->value)); \ | 170 | return sprintf(buf, "%d\n", type##_FROM_REG(data->value)); \ |
171 | } | 171 | } |
172 | 172 | ||
173 | #define show_fan(suffix, value, index) \ | 173 | #define show_fan(suffix, value, index) \ |
174 | static ssize_t show_##suffix(struct device *dev, char *buf) \ | 174 | static ssize_t show_##suffix(struct device *dev, struct device_attribute *attr, char *buf) \ |
175 | { \ | 175 | { \ |
176 | struct gl518_data *data = gl518_update_device(dev); \ | 176 | struct gl518_data *data = gl518_update_device(dev); \ |
177 | return sprintf(buf, "%d\n", FAN_FROM_REG(data->value[index], \ | 177 | return sprintf(buf, "%d\n", FAN_FROM_REG(data->value[index], \ |
@@ -205,7 +205,7 @@ show(BOOL, beep_enable, beep_enable); | |||
205 | show(BEEP_MASK, beep_mask, beep_mask); | 205 | show(BEEP_MASK, beep_mask, beep_mask); |
206 | 206 | ||
207 | #define set(type, suffix, value, reg) \ | 207 | #define set(type, suffix, value, reg) \ |
208 | static ssize_t set_##suffix(struct device *dev, const char *buf, \ | 208 | static ssize_t set_##suffix(struct device *dev, struct device_attribute *attr, const char *buf, \ |
209 | size_t count) \ | 209 | size_t count) \ |
210 | { \ | 210 | { \ |
211 | struct i2c_client *client = to_i2c_client(dev); \ | 211 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -220,7 +220,7 @@ static ssize_t set_##suffix(struct device *dev, const char *buf, \ | |||
220 | } | 220 | } |
221 | 221 | ||
222 | #define set_bits(type, suffix, value, reg, mask, shift) \ | 222 | #define set_bits(type, suffix, value, reg, mask, shift) \ |
223 | static ssize_t set_##suffix(struct device *dev, const char *buf, \ | 223 | static ssize_t set_##suffix(struct device *dev, struct device_attribute *attr, const char *buf, \ |
224 | size_t count) \ | 224 | size_t count) \ |
225 | { \ | 225 | { \ |
226 | struct i2c_client *client = to_i2c_client(dev); \ | 226 | struct i2c_client *client = to_i2c_client(dev); \ |
@@ -258,7 +258,7 @@ set_high(IN, in_max3, voltage_max[3], GL518_REG_VIN3_LIMIT); | |||
258 | set_bits(BOOL, beep_enable, beep_enable, GL518_REG_CONF, 0x04, 2); | 258 | set_bits(BOOL, beep_enable, beep_enable, GL518_REG_CONF, 0x04, 2); |
259 | set(BEEP_MASK, beep_mask, beep_mask, GL518_REG_ALARM); | 259 | set(BEEP_MASK, beep_mask, beep_mask, GL518_REG_ALARM); |
260 | 260 | ||
261 | static ssize_t set_fan_min1(struct device *dev, const char *buf, size_t count) | 261 | static ssize_t set_fan_min1(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
262 | { | 262 | { |
263 | struct i2c_client *client = to_i2c_client(dev); | 263 | struct i2c_client *client = to_i2c_client(dev); |
264 | struct gl518_data *data = i2c_get_clientdata(client); | 264 | struct gl518_data *data = i2c_get_clientdata(client); |
@@ -284,7 +284,7 @@ static ssize_t set_fan_min1(struct device *dev, const char *buf, size_t count) | |||
284 | return count; | 284 | return count; |
285 | } | 285 | } |
286 | 286 | ||
287 | static ssize_t set_fan_min2(struct device *dev, const char *buf, size_t count) | 287 | static ssize_t set_fan_min2(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
288 | { | 288 | { |
289 | struct i2c_client *client = to_i2c_client(dev); | 289 | struct i2c_client *client = to_i2c_client(dev); |
290 | struct gl518_data *data = i2c_get_clientdata(client); | 290 | struct gl518_data *data = i2c_get_clientdata(client); |