]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/i2c/chips/max6875.c
Merge branches 'pxa' and 'orion-fixes1'
[linux-2.6-omap-h63xx.git] / drivers / i2c / chips / max6875.c
index 76645c1429776e182b87e3d2578adc40222cffa1..fb7ea5637ecaef03f3ccdf0338232431da118087 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/mutex.h>
 
 /* Do not scan - the MAX6875 access method will write to some EEPROM chips */
-static unsigned short normal_i2c[] = {I2C_CLIENT_END};
+static const unsigned short normal_i2c[] = { I2C_CLIENT_END };
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_1(max6875);
@@ -106,6 +106,7 @@ static void max6875_update_slice(struct i2c_client *client, int slice)
                                            I2C_FUNC_SMBUS_READ_I2C_BLOCK)) {
                        if (i2c_smbus_read_i2c_block_data(client,
                                                          MAX6875_CMD_BLK_READ,
+                                                         SLICE_SIZE,
                                                          buf) != SLICE_SIZE) {
                                goto exit_up;
                        }
@@ -125,8 +126,9 @@ exit_up:
        mutex_unlock(&data->update_lock);
 }
 
-static ssize_t max6875_read(struct kobject *kobj, char *buf, loff_t off,
-                           size_t count)
+static ssize_t max6875_read(struct kobject *kobj,
+                           struct bin_attribute *bin_attr,
+                           char *buf, loff_t off, size_t count)
 {
        struct i2c_client *client = kobj_to_i2c_client(kobj);
        struct max6875_data *data = i2c_get_clientdata(client);
@@ -152,7 +154,6 @@ static struct bin_attribute user_eeprom_attr = {
        .attr = {
                .name = "eeprom",
                .mode = S_IRUGO,
-               .owner = THIS_MODULE,
        },
        .size = USER_EEPROM_SIZE,
        .read = max6875_read,