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>
This commit is contained in:
Wolfram Sang 2019-06-10 11:51:54 +02:00 коммит произвёл Guenter Roeck
Родитель 08d09d8099
Коммит e67776cc30
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;