summaryrefslogtreecommitdiff
path: root/drivers/misc/eeprom/at24.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-01-13 23:30:11 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-07 23:01:45 -0800
commit092462c2b52259edba80a6748acb3305f7f70423 (patch)
treeb86f9014d3cce56618ab39b21337487f88cbd55c /drivers/misc/eeprom/at24.c
parent8c99d8e6de0474bf5a7004e41c044ac4dcacbae1 (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/at24.c')
-rw-r--r--drivers/misc/eeprom/at24.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 5d7c0900fa1b..d105c2564400 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -289,7 +289,7 @@ static ssize_t at24_bin_read(struct file *filp, struct kobject *kobj,
{
struct at24_data *at24;
- at24 = dev_get_drvdata(container_of(kobj, struct device, kobj));
+ at24 = dev_get_drvdata(kobj_to_dev(kobj));
return at24_read(at24, buf, off, count);
}
@@ -420,7 +420,7 @@ static ssize_t at24_bin_write(struct file *filp, struct kobject *kobj,
{
struct at24_data *at24;
- at24 = dev_get_drvdata(container_of(kobj, struct device, kobj));
+ at24 = dev_get_drvdata(kobj_to_dev(kobj));
return at24_write(at24, buf, off, count);
}