diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-06-10 11:51:54 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-06-23 18:33:01 -0700 |
commit | e67776cc30894d2840fc0b93fc3b3647677ef0b3 (patch) | |
tree | 12e01a679ce171f2a53792fe273a0acaffedda4f /drivers/hwmon/lm90.c | |
parent | 08d09d8099a7556d49ba0e770c32345cc79566b3 (diff) | |
download | linux-stable-e67776cc30894d2840fc0b93fc3b3647677ef0b3.tar.gz linux-stable-e67776cc30894d2840fc0b93fc3b3647677ef0b3.tar.bz2 linux-stable-e67776cc30894d2840fc0b93fc3b3647677ef0b3.zip |
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>
Diffstat (limited to 'drivers/hwmon/lm90.c')
-rw-r--r-- | drivers/hwmon/lm90.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index e562a578f20e..2ebcab8b0a9b 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -1718,7 +1718,7 @@ static int lm90_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; - struct i2c_adapter *adapter = to_i2c_adapter(dev->parent); + struct i2c_adapter *adapter = client->adapter; struct hwmon_channel_info *info; struct regulator *regulator; struct device *hwmon_dev; |