aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/fscpos.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/fscpos.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/fscpos.c')
-rw-r--r--drivers/i2c/chips/fscpos.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/i2c/chips/fscpos.c b/drivers/i2c/chips/fscpos.c
index 2cac79145c7..3beaa6191ef 100644
--- a/drivers/i2c/chips/fscpos.c
+++ b/drivers/i2c/chips/fscpos.c
@@ -245,19 +245,19 @@ static void reset_fan_alarm(struct i2c_client *client, int nr)
245/* Volts */ 245/* Volts */
246#define VOLT_FROM_REG(val, mult) ((val) * (mult) / 255) 246#define VOLT_FROM_REG(val, mult) ((val) * (mult) / 255)
247 247
248static ssize_t show_volt_12(struct device *dev, char *buf) 248static ssize_t show_volt_12(struct device *dev, struct device_attribute *attr, char *buf)
249{ 249{
250 struct fscpos_data *data = fscpos_update_device(dev); 250 struct fscpos_data *data = fscpos_update_device(dev);
251 return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[0], 14200)); 251 return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[0], 14200));
252} 252}
253 253
254static ssize_t show_volt_5(struct device *dev, char *buf) 254static ssize_t show_volt_5(struct device *dev, struct device_attribute *attr, char *buf)
255{ 255{
256 struct fscpos_data *data = fscpos_update_device(dev); 256 struct fscpos_data *data = fscpos_update_device(dev);
257 return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[1], 6600)); 257 return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[1], 6600));
258} 258}
259 259
260static ssize_t show_volt_batt(struct device *dev, char *buf) 260static ssize_t show_volt_batt(struct device *dev, struct device_attribute *attr, char *buf)
261{ 261{
262 struct fscpos_data *data = fscpos_update_device(dev); 262 struct fscpos_data *data = fscpos_update_device(dev);
263 return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[2], 3300)); 263 return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[2], 3300));
@@ -327,7 +327,7 @@ static ssize_t set_wdog_preset(struct i2c_client *client, struct fscpos_data
327} 327}
328 328
329/* Event */ 329/* Event */
330static ssize_t show_event(struct device *dev, char *buf) 330static ssize_t show_event(struct device *dev, struct device_attribute *attr, char *buf)
331{ 331{
332 /* bits 5..7 reserved => mask with 0x1f */ 332 /* bits 5..7 reserved => mask with 0x1f */
333 struct fscpos_data *data = fscpos_update_device(dev); 333 struct fscpos_data *data = fscpos_update_device(dev);
@@ -338,14 +338,14 @@ static ssize_t show_event(struct device *dev, char *buf)
338 * Sysfs stuff 338 * Sysfs stuff
339 */ 339 */
340#define create_getter(kind, sub) \ 340#define create_getter(kind, sub) \
341 static ssize_t sysfs_show_##kind##sub(struct device *dev, char *buf) \ 341 static ssize_t sysfs_show_##kind##sub(struct device *dev, struct device_attribute *attr, char *buf) \
342 { \ 342 { \
343 struct fscpos_data *data = fscpos_update_device(dev); \ 343 struct fscpos_data *data = fscpos_update_device(dev); \
344 return show_##kind##sub(data, buf); \ 344 return show_##kind##sub(data, buf); \
345 } 345 }
346 346
347#define create_getter_n(kind, offset, sub) \ 347#define create_getter_n(kind, offset, sub) \
348 static ssize_t sysfs_show_##kind##offset##sub(struct device *dev, char\ 348 static ssize_t sysfs_show_##kind##offset##sub(struct device *dev, struct device_attribute *attr, char\
349 *buf) \ 349 *buf) \
350 { \ 350 { \
351 struct fscpos_data *data = fscpos_update_device(dev); \ 351 struct fscpos_data *data = fscpos_update_device(dev); \
@@ -353,7 +353,7 @@ static ssize_t show_event(struct device *dev, char *buf)
353 } 353 }
354 354
355#define create_setter(kind, sub, reg) \ 355#define create_setter(kind, sub, reg) \
356 static ssize_t sysfs_set_##kind##sub (struct device *dev, const char \ 356 static ssize_t sysfs_set_##kind##sub (struct device *dev, struct device_attribute *attr, const char \
357 *buf, size_t count) \ 357 *buf, size_t count) \
358 { \ 358 { \
359 struct i2c_client *client = to_i2c_client(dev); \ 359 struct i2c_client *client = to_i2c_client(dev); \
@@ -362,7 +362,7 @@ static ssize_t show_event(struct device *dev, char *buf)
362 } 362 }
363 363
364#define create_setter_n(kind, offset, sub, reg) \ 364#define create_setter_n(kind, offset, sub, reg) \
365 static ssize_t sysfs_set_##kind##offset##sub (struct device *dev, \ 365 static ssize_t sysfs_set_##kind##offset##sub (struct device *dev, struct device_attribute *attr, \
366 const char *buf, size_t count) \ 366 const char *buf, size_t count) \
367 { \ 367 { \
368 struct i2c_client *client = to_i2c_client(dev); \ 368 struct i2c_client *client = to_i2c_client(dev); \