[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ae57f09-b803-6ae3-c734-87e733a56eb8@gmail.com>
Date: Mon, 24 May 2021 22:08:51 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH 01/13] 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@...il.com>
---
drivers/misc/eeprom/ee1004.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c
index 0950d4d9d..0613a5300 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;
--
2.31.1
Powered by blists - more mailing lists