diff options
author | Yani Ioannou <yani.ioannou@gmail.com> | 2005-05-17 06:41:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 15:15:33 -0700 |
commit | 30f74292e50d6c4ae438dbee5cb45d77bf774351 (patch) | |
tree | 4bfa1b6715ecd597e196a9f448c825ef0c12d8e3 /drivers/i2c/chips/fscpos.c | |
parent | 74880c063b06efd103c924abfe19d9d8fa4864c4 (diff) | |
download | lwn-30f74292e50d6c4ae438dbee5cb45d77bf774351.tar.gz lwn-30f74292e50d6c4ae438dbee5cb45d77bf774351.zip |
[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.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/i2c/chips/fscpos.c b/drivers/i2c/chips/fscpos.c index 2cac79145c75..3beaa6191ef4 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) /* Volts */ #define VOLT_FROM_REG(val, mult) ((val) * (mult) / 255) -static ssize_t show_volt_12(struct device *dev, char *buf) +static ssize_t show_volt_12(struct device *dev, struct device_attribute *attr, char *buf) { struct fscpos_data *data = fscpos_update_device(dev); return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[0], 14200)); } -static ssize_t show_volt_5(struct device *dev, char *buf) +static ssize_t show_volt_5(struct device *dev, struct device_attribute *attr, char *buf) { struct fscpos_data *data = fscpos_update_device(dev); return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[1], 6600)); } -static ssize_t show_volt_batt(struct device *dev, char *buf) +static ssize_t show_volt_batt(struct device *dev, struct device_attribute *attr, char *buf) { struct fscpos_data *data = fscpos_update_device(dev); 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 } /* Event */ -static ssize_t show_event(struct device *dev, char *buf) +static ssize_t show_event(struct device *dev, struct device_attribute *attr, char *buf) { /* bits 5..7 reserved => mask with 0x1f */ struct fscpos_data *data = fscpos_update_device(dev); @@ -338,14 +338,14 @@ static ssize_t show_event(struct device *dev, char *buf) * Sysfs stuff */ #define create_getter(kind, sub) \ - static ssize_t sysfs_show_##kind##sub(struct device *dev, char *buf) \ + static ssize_t sysfs_show_##kind##sub(struct device *dev, struct device_attribute *attr, char *buf) \ { \ struct fscpos_data *data = fscpos_update_device(dev); \ return show_##kind##sub(data, buf); \ } #define create_getter_n(kind, offset, sub) \ - static ssize_t sysfs_show_##kind##offset##sub(struct device *dev, char\ + static ssize_t sysfs_show_##kind##offset##sub(struct device *dev, struct device_attribute *attr, char\ *buf) \ { \ struct fscpos_data *data = fscpos_update_device(dev); \ @@ -353,7 +353,7 @@ static ssize_t show_event(struct device *dev, char *buf) } #define create_setter(kind, sub, reg) \ - static ssize_t sysfs_set_##kind##sub (struct device *dev, const char \ + static ssize_t sysfs_set_##kind##sub (struct device *dev, struct device_attribute *attr, const char \ *buf, size_t count) \ { \ struct i2c_client *client = to_i2c_client(dev); \ @@ -362,7 +362,7 @@ static ssize_t show_event(struct device *dev, char *buf) } #define create_setter_n(kind, offset, sub, reg) \ - static ssize_t sysfs_set_##kind##offset##sub (struct device *dev, \ + static ssize_t sysfs_set_##kind##offset##sub (struct device *dev, struct device_attribute *attr, \ const char *buf, size_t count) \ { \ struct i2c_client *client = to_i2c_client(dev); \ |