summaryrefslogtreecommitdiff
path: root/drivers/misc/eeprom/eeprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/eeprom/eeprom.c')
-rw-r--r--drivers/misc/eeprom/eeprom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c
index 7342fd637..3d1d55157 100644
--- a/drivers/misc/eeprom/eeprom.c
+++ b/drivers/misc/eeprom/eeprom.c
@@ -84,7 +84,7 @@ static ssize_t eeprom_read(struct file *filp, 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 i2c_client *client = to_i2c_client(kobj_to_dev(kobj));
struct eeprom_data *data = i2c_get_clientdata(client);
u8 slice;