summaryrefslogtreecommitdiff
path: root/drivers/misc/eeprom
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2021-05-24 23:08:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-27 15:49:39 +0300
commit7adbd54fb23b38fd7bc28f679445ae93d3846c40 (patch)
treed716a5b79ab3f0b40d0599fb418b5f692482619b /drivers/misc/eeprom
parent394febc9d0a607d6310e14d8248af62125feb5d1 (diff)
downloadlinux-7adbd54fb23b38fd7bc28f679445ae93d3846c40.tar.xz
eeprom: ee1004: Use kobj_to_i2c_client to simplify the code
Switch to helper kobj_to_i2c_client() to simplify the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/4ae57f09-b803-6ae3-c734-87e733a56eb8@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/eeprom')
-rw-r--r--drivers/misc/eeprom/ee1004.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c
index 0950d4d9d9ce..0613a530099c 100644
--- a/drivers/misc/eeprom/ee1004.c
+++ b/drivers/misc/eeprom/ee1004.c
@@ -93,8 +93,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 device *dev = kobj_to_dev(kobj);
- struct i2c_client *client = to_i2c_client(dev);
+ struct i2c_client *client = kobj_to_i2c_client(kobj);
size_t requested = count;
int page;