From 09bfa5f6833a62bd6669d3ba7f83105181287b92 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Sat, 8 Jun 2019 12:55:44 +0200 Subject: 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 --- drivers/leds/leds-tca6507.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/leds/leds-tca6507.c') 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)) -- cgit v1.2.3