From: Wolfram Sang Date: Sat, 8 Jun 2019 10:55:44 +0000 (+0200) Subject: leds: leds-tca6507: simplify getting the adapter of a client X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=09bfa5f6833a62bd6669d3ba7f83105181287b92;p=openwrt%2Fstaging%2Fblogic.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 Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski --- diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c index 8f343afa4787..0352265b3c79 100644 --- a/drivers/leds/leds-tca6507.c +++ b/drivers/leds/leds-tca6507.c @@ -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))