mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 18:24:14 +08:00
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:
parent
08d09d8099
commit
e67776cc30
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user