]> err.no Git - linux-2.6/blobdiff - drivers/i2c/chips/lm83.c
[PATCH] I2C: fix up some sysfs device attribute file parameters
[linux-2.6] / drivers / i2c / chips / lm83.c
index 3dafe60766ad9de9848dbe48df1cea8507bb4033..442dc17cdb77fc71fa2026ab62a70a479891005b 100644 (file)
@@ -27,7 +27,6 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
@@ -81,7 +80,7 @@ SENSORS_INSMOD_1(lm83);
 
 /*
  * Conversions and various macros
- * The LM83 uses signed 8-bit values with LSB = 1 degree Celcius.
+ * The LM83 uses signed 8-bit values with LSB = 1 degree Celsius.
  */
 
 #define TEMP_FROM_REG(val)     ((val) * 1000)
@@ -155,7 +154,7 @@ struct lm83_data {
  */
 
 #define show_temp(suffix, value) \
-static ssize_t show_temp_##suffix(struct device *dev, char *buf) \
+static ssize_t show_temp_##suffix(struct device *dev, struct device_attribute *attr, char *buf) \
 { \
        struct lm83_data *data = lm83_update_device(dev); \
        return sprintf(buf, "%d\n", TEMP_FROM_REG(data->value)); \
@@ -171,7 +170,7 @@ show_temp(high4, temp_high[3]);
 show_temp(crit, temp_crit);
 
 #define set_temp(suffix, value, reg) \
-static ssize_t set_temp_##suffix(struct device *dev, const char *buf, \
+static ssize_t set_temp_##suffix(struct device *dev, struct device_attribute *attr, const char *buf, \
        size_t count) \
 { \
        struct i2c_client *client = to_i2c_client(dev); \
@@ -190,7 +189,7 @@ set_temp(high3, temp_high[2], LM83_REG_W_REMOTE2_HIGH);
 set_temp(high4, temp_high[3], LM83_REG_W_REMOTE3_HIGH);
 set_temp(crit, temp_crit, LM83_REG_W_TCRIT);
 
-static ssize_t show_alarms(struct device *dev, char *buf)
+static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf)
 {
        struct lm83_data *data = lm83_update_device(dev);
        return sprintf(buf, "%d\n", data->alarms);