diff options
Diffstat (limited to 'drivers/i2c/chips/lm77.c')
-rw-r--r-- | drivers/i2c/chips/lm77.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/i2c/chips/lm77.c b/drivers/i2c/chips/lm77.c index f56b7a37de7..9d15cd5189f 100644 --- a/drivers/i2c/chips/lm77.c +++ b/drivers/i2c/chips/lm77.c @@ -103,7 +103,7 @@ static inline int LM77_TEMP_FROM_REG(u16 reg) /* read routines for temperature limits */ #define show(value) \ -static ssize_t show_##value(struct device *dev, char *buf) \ +static ssize_t show_##value(struct device *dev, struct device_attribute *attr, char *buf) \ { \ struct lm77_data *data = lm77_update_device(dev); \ return sprintf(buf, "%d\n", data->value); \ @@ -116,17 +116,17 @@ show(temp_max); show(alarms); /* read routines for hysteresis values */ -static ssize_t show_temp_crit_hyst(struct device *dev, char *buf) +static ssize_t show_temp_crit_hyst(struct device *dev, struct device_attribute *attr, char *buf) { struct lm77_data *data = lm77_update_device(dev); return sprintf(buf, "%d\n", data->temp_crit - data->temp_hyst); } -static ssize_t show_temp_min_hyst(struct device *dev, char *buf) +static ssize_t show_temp_min_hyst(struct device *dev, struct device_attribute *attr, char *buf) { struct lm77_data *data = lm77_update_device(dev); return sprintf(buf, "%d\n", data->temp_min + data->temp_hyst); } -static ssize_t show_temp_max_hyst(struct device *dev, char *buf) +static ssize_t show_temp_max_hyst(struct device *dev, struct device_attribute *attr, char *buf) { struct lm77_data *data = lm77_update_device(dev); return sprintf(buf, "%d\n", data->temp_max - data->temp_hyst); @@ -134,7 +134,7 @@ static ssize_t show_temp_max_hyst(struct device *dev, char *buf) /* write routines */ #define set(value, reg) \ -static ssize_t set_##value(struct device *dev, const char *buf, size_t count) \ +static ssize_t set_##value(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \ { \ struct i2c_client *client = to_i2c_client(dev); \ struct lm77_data *data = i2c_get_clientdata(client); \ @@ -152,7 +152,7 @@ set(temp_max, LM77_REG_TEMP_MAX); /* hysteresis is stored as a relative value on the chip, so it has to be converted first */ -static ssize_t set_temp_crit_hyst(struct device *dev, const char *buf, size_t count) +static ssize_t set_temp_crit_hyst(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct i2c_client *client = to_i2c_client(dev); struct lm77_data *data = i2c_get_clientdata(client); @@ -167,7 +167,7 @@ static ssize_t set_temp_crit_hyst(struct device *dev, const char *buf, size_t co } /* preserve hysteresis when setting T_crit */ -static ssize_t set_temp_crit(struct device *dev, const char *buf, size_t count) +static ssize_t set_temp_crit(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct i2c_client *client = to_i2c_client(dev); struct lm77_data *data = i2c_get_clientdata(client); |