diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-06-08 13:55:43 +0300 |
---|---|---|
committer | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2019-06-09 14:11:04 +0300 |
commit | 1c57d9bd29f63996b301fe92190713e39730d6ca (patch) | |
tree | c586e6dcd646bb39e633ce6b8cd21f32b4812b18 /drivers/leds | |
parent | 1916ebfdfbacd3fa9a6fce72032cf612375c1183 (diff) | |
download | linux-1c57d9bd29f63996b301fe92190713e39730d6ca.tar.xz |
leds: leds-pca955x: 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-pca955x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c index a9f5dad55956..460626d81c6a 100644 --- a/drivers/leds/leds-pca955x.c +++ b/drivers/leds/leds-pca955x.c @@ -432,7 +432,7 @@ static int pca955x_probe(struct i2c_client *client, int ngpios = 0; chip = &pca955x_chipdefs[id->driver_data]; - adapter = to_i2c_adapter(client->dev.parent); + adapter = client->adapter; pdata = dev_get_platdata(&client->dev); if (!pdata) { pdata = pca955x_get_pdata(client, chip); |