summaryrefslogtreecommitdiffstats
path: root/drivers/misc/eeprom/eeprom_93xx46.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-01-13 16:30:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-08 08:01:45 +0100
commit092462c2b52259edba80a6748acb3305f7f70423 (patch)
treeb86f9014d3cce56618ab39b21337487f88cbd55c /drivers/misc/eeprom/eeprom_93xx46.c
parentmisc: apds990x, bh1770glc, lis3lv02d: use to_i2c_client (diff)
downloadlinux-092462c2b52259edba80a6748acb3305f7f70423.tar.xz
linux-092462c2b52259edba80a6748acb3305f7f70423.zip
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_93xx46.c')
-rw-r--r--drivers/misc/eeprom/eeprom_93xx46.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/eeprom/eeprom_93xx46.c b/drivers/misc/eeprom/eeprom_93xx46.c
index ff63f05edc76..473aa0a2eaf6 100644
--- a/drivers/misc/eeprom/eeprom_93xx46.c
+++ b/drivers/misc/eeprom/eeprom_93xx46.c
@@ -45,7 +45,7 @@ eeprom_93xx46_bin_read(struct file *filp, struct kobject *kobj,
int bits, ret;
u16 cmd_addr;
- dev = container_of(kobj, struct device, kobj);
+ dev = kobj_to_dev(kobj);
edev = dev_get_drvdata(dev);
cmd_addr = OP_READ << edev->addrlen;
@@ -190,7 +190,7 @@ eeprom_93xx46_bin_write(struct file *filp, struct kobject *kobj,
struct device *dev;
int i, ret, step = 1;
- dev = container_of(kobj, struct device, kobj);
+ dev = kobj_to_dev(kobj);
edev = dev_get_drvdata(dev);
/* only write even number of bytes on 16-bit devices */