aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/gl518sm.c
diff options
context:
space:
mode:
authorYani Ioannou <yani.ioannou@gmail.com>2005-05-17 06:41:35 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:33 -0400
commit30f74292e50d6c4ae438dbee5cb45d77bf774351 (patch)
tree4bfa1b6715ecd597e196a9f448c825ef0c12d8e3 /drivers/i2c/chips/gl518sm.c
parent74880c063b06efd103c924abfe19d9d8fa4864c4 (diff)
[PATCH] Driver Core: drivers/i2c/chips/adm1031.c - lm75.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/chips/gl518sm.c')
-rw-r--r--drivers/i2c/chips/gl518sm.c12
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) \
167static ssize_t show_##suffix(struct device *dev, char *buf) \ 167static 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) \
174static ssize_t show_##suffix(struct device *dev, char *buf) \ 174static 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);
205show(BEEP_MASK, beep_mask, beep_mask); 205show(BEEP_MASK, beep_mask, beep_mask);
206 206
207#define set(type, suffix, value, reg) \ 207#define set(type, suffix, value, reg) \
208static ssize_t set_##suffix(struct device *dev, const char *buf, \ 208static 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) \
223static ssize_t set_##suffix(struct device *dev, const char *buf, \ 223static 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);
258set_bits(BOOL, beep_enable, beep_enable, GL518_REG_CONF, 0x04, 2); 258set_bits(BOOL, beep_enable, beep_enable, GL518_REG_CONF, 0x04, 2);
259set(BEEP_MASK, beep_mask, beep_mask, GL518_REG_ALARM); 259set(BEEP_MASK, beep_mask, beep_mask, GL518_REG_ALARM);
260 260
261static ssize_t set_fan_min1(struct device *dev, const char *buf, size_t count) 261static 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
287static ssize_t set_fan_min2(struct device *dev, const char *buf, size_t count) 287static 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);