Skip to content

Commit 5128f8d

Browse files
linuswstorulf
authored andcommitted
gpio: name PCA953x gpio chips after device name
Instead of using the name directly from the I2C client to name the gpio_chip, use dev_name() on the client->dev, so we get the sometimes more unique device name, as I2C has a mechanism for naming its devices explicitly in e.g. board data. This is a prerequisite for being able to reference uniquely any I2C GPIO expander defined in a board file when setting up GPIO descriptor tables. Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent d2951df commit 5128f8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpio-pca953x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
449449

450450
gc->base = chip->gpio_start;
451451
gc->ngpio = gpios;
452-
gc->label = chip->client->name;
452+
gc->label = dev_name(&chip->client->dev);
453453
gc->parent = &chip->client->dev;
454454
gc->owner = THIS_MODULE;
455455
gc->names = chip->names;

0 commit comments

Comments
 (0)