diff options
author | Geliang Tang <geliangtang@163.com> | 2016-01-13 23:30:11 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-07 23:01:45 -0800 |
commit | 092462c2b52259edba80a6748acb3305f7f70423 (patch) | |
tree | b86f9014d3cce56618ab39b21337487f88cbd55c /drivers/misc/eeprom/eeprom.c | |
parent | 8c99d8e6de0474bf5a7004e41c044ac4dcacbae1 (diff) |
misc: eeprom: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom/eeprom.c')
-rw-r--r-- | drivers/misc/eeprom/eeprom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c index 7342fd637031..3d1d55157e5f 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; |