aboutsummaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorWolfram Sang2019-06-08 12:55:44 +0200
committerJacek Anaszewski2019-06-09 13:11:44 +0200
commit09bfa5f6833a62bd6669d3ba7f83105181287b92 (patch)
treecd48533eeeeaacffbf016fe69e6eef15d346dc18 /drivers/leds
parent1c57d9bd29f63996b301fe92190713e39730d6ca (diff)
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>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-tca6507.c2
1 files changed, 1 insertions, 1 deletions
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))