mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
394febc9d0
commit
7adbd54fb2
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue