mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
misc: eeprom: use helper to get i2c_client from kobj
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>
This commit is contained in:
parent
b1d4dc15b2
commit
8ce98dd21f
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj,
|
||||||
struct bin_attribute *bin_attr,
|
struct bin_attribute *bin_attr,
|
||||||
char *buf, loff_t off, size_t count)
|
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);
|
struct eeprom_data *data = i2c_get_clientdata(client);
|
||||||
u8 slice;
|
u8 slice;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue