mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
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>
This commit is contained in:
parent
1916ebfdfb
commit
1c57d9bd29
1 changed files with 1 additions and 1 deletions
|
@ -432,7 +432,7 @@ static int pca955x_probe(struct i2c_client *client,
|
||||||
int ngpios = 0;
|
int ngpios = 0;
|
||||||
|
|
||||||
chip = &pca955x_chipdefs[id->driver_data];
|
chip = &pca955x_chipdefs[id->driver_data];
|
||||||
adapter = to_i2c_adapter(client->dev.parent);
|
adapter = client->adapter;
|
||||||
pdata = dev_get_platdata(&client->dev);
|
pdata = dev_get_platdata(&client->dev);
|
||||||
if (!pdata) {
|
if (!pdata) {
|
||||||
pdata = pca955x_get_pdata(client, chip);
|
pdata = pca955x_get_pdata(client, chip);
|
||||||
|
|
Loading…
Reference in a new issue