]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/i2c/chips/eeprom.c
sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binar...
[mirror_ubuntu-bionic-kernel.git] / drivers / i2c / chips / eeprom.c
index cec3a0c3894dda7912024c769e04057d2a47c5ad..3328164311058dfe59070165fd834fa386077d0c 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-#include <linux/sched.h>
 #include <linux/jiffies.h>
 #include <linux/i2c.h>
 #include <linux/mutex.h>
@@ -111,7 +110,8 @@ exit:
        mutex_unlock(&data->update_lock);
 }
 
-static ssize_t eeprom_read(struct kobject *kobj, char *buf, loff_t off, size_t count)
+static ssize_t eeprom_read(struct kobject *kobj, struct bin_attribute *bin_attr,
+                          char *buf, loff_t off, size_t count)
 {
        struct i2c_client *client = to_i2c_client(container_of(kobj, struct device, kobj));
        struct eeprom_data *data = i2c_get_clientdata(client);
@@ -144,7 +144,6 @@ static struct bin_attribute eeprom_attr = {
        .attr = {
                .name = "eeprom",
                .mode = S_IRUGO,
-               .owner = THIS_MODULE,
        },
        .size = EEPROM_SIZE,
        .read = eeprom_read,