diff options
Diffstat (limited to 'drivers/i2c/chips/max1619.c')
| -rw-r--r-- | drivers/i2c/chips/max1619.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/chips/max1619.c b/drivers/i2c/chips/max1619.c index 5afa961a5e10..bf553dcd97d6 100644 --- a/drivers/i2c/chips/max1619.c +++ b/drivers/i2c/chips/max1619.c | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | #include <linux/config.h> | ||
| 30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
| 31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
| 32 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
| @@ -122,7 +121,7 @@ struct max1619_data { | |||
| 122 | */ | 121 | */ |
| 123 | 122 | ||
| 124 | #define show_temp(value) \ | 123 | #define show_temp(value) \ |
| 125 | static ssize_t show_##value(struct device *dev, char *buf) \ | 124 | static ssize_t show_##value(struct device *dev, struct device_attribute *attr, char *buf) \ |
| 126 | { \ | 125 | { \ |
| 127 | struct max1619_data *data = max1619_update_device(dev); \ | 126 | struct max1619_data *data = max1619_update_device(dev); \ |
| 128 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->value)); \ | 127 | return sprintf(buf, "%d\n", TEMP_FROM_REG(data->value)); \ |
| @@ -135,7 +134,7 @@ show_temp(temp_crit2); | |||
| 135 | show_temp(temp_hyst2); | 134 | show_temp(temp_hyst2); |
| 136 | 135 | ||
| 137 | #define set_temp2(value, reg) \ | 136 | #define set_temp2(value, reg) \ |
| 138 | static ssize_t set_##value(struct device *dev, const char *buf, \ | 137 | static ssize_t set_##value(struct device *dev, struct device_attribute *attr, const char *buf, \ |
| 139 | size_t count) \ | 138 | size_t count) \ |
| 140 | { \ | 139 | { \ |
| 141 | struct i2c_client *client = to_i2c_client(dev); \ | 140 | struct i2c_client *client = to_i2c_client(dev); \ |
| @@ -154,7 +153,7 @@ set_temp2(temp_high2, MAX1619_REG_W_REMOTE_HIGH); | |||
| 154 | set_temp2(temp_crit2, MAX1619_REG_W_REMOTE_CRIT); | 153 | set_temp2(temp_crit2, MAX1619_REG_W_REMOTE_CRIT); |
| 155 | set_temp2(temp_hyst2, MAX1619_REG_W_TCRIT_HYST); | 154 | set_temp2(temp_hyst2, MAX1619_REG_W_TCRIT_HYST); |
| 156 | 155 | ||
| 157 | static ssize_t show_alarms(struct device *dev, char *buf) | 156 | static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf) |
| 158 | { | 157 | { |
| 159 | struct max1619_data *data = max1619_update_device(dev); | 158 | struct max1619_data *data = max1619_update_device(dev); |
| 160 | return sprintf(buf, "%d\n", data->alarms); | 159 | return sprintf(buf, "%d\n", data->alarms); |
