misc: eeprom: use helper to get i2c_client from kobj
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 19 Sep 2020 06:56:15 +0000 (08:56 +0200)
committerWolfram Sang <wsa@kernel.org>
Mon, 21 Sep 2020 09:45:43 +0000 (11:45 +0200)
Slightly easier to read.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/misc/eeprom/eeprom.c

index 226b5efa6a776a7480077d06fa553bebad6574d4..34fa385dfd4b087c25ae9c670e61701797f57876 100644 (file)
@@ -76,7 +76,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(kobj_to_dev(kobj));
+       struct i2c_client *client = kobj_to_i2c_client(kobj);
        struct eeprom_data *data = i2c_get_clientdata(client);
        u8 slice;