mirror of https://gitee.com/openkylin/linux.git
leds: leds-tca6507: 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. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
This commit is contained in:
parent
1c57d9bd29
commit
09bfa5f683
|
@ -757,7 +757,7 @@ static int tca6507_probe(struct i2c_client *client,
|
|||
int err;
|
||||
int i = 0;
|
||||
|
||||
adapter = to_i2c_adapter(client->dev.parent);
|
||||
adapter = client->adapter;
|
||||
pdata = dev_get_platdata(&client->dev);
|
||||
|
||||
if (!i2c_check_functionality(adapter, I2C_FUNC_I2C))
|
||||
|
|
Loading…
Reference in New Issue