Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (lm90) simplify getting the adapter of a client

We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.

Reported-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Wolfram Sang and committed by
Guenter Roeck
e67776cc 08d09d80

+1 -1
+1 -1
drivers/hwmon/lm90.c
··· 1718 1718 const struct i2c_device_id *id) 1719 1719 { 1720 1720 struct device *dev = &client->dev; 1721 - struct i2c_adapter *adapter = to_i2c_adapter(dev->parent); 1721 + struct i2c_adapter *adapter = client->adapter; 1722 1722 struct hwmon_channel_info *info; 1723 1723 struct regulator *regulator; 1724 1724 struct device *hwmon_dev;