diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2019-11-27 09:42:47 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-12-12 11:36:13 +0100 |
commit | ddd8891e01ecd87c81c04f6eb169be193868b884 (patch) | |
tree | 5d0e3ca60839ba0b2512ef4c7283b3bd70c3bb98 /drivers/gpio/gpiolib-sysfs.c | |
parent | e42617b825f8073569da76dc4510bfa019b1c35a (diff) | |
download | linux-ddd8891e01ecd87c81c04f6eb169be193868b884.tar.bz2 |
gpiolib: Add GPIOCHIP_NAME definition
The string literal "gpiochip" is used in several places.
Add a definition for it, and use it everywhere, to make sure everything
stays in sync.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20191127084253.16356-2-geert+renesas@glider.be
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-sysfs.c')
-rw-r--r-- | drivers/gpio/gpiolib-sysfs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c index fbf6b1a0a4fa..23e3d335cd54 100644 --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c @@ -762,10 +762,9 @@ int gpiochip_sysfs_register(struct gpio_device *gdev) parent = &gdev->dev; /* use chip->base for the ID; it's already known to be unique */ - dev = device_create_with_groups(&gpio_class, parent, - MKDEV(0, 0), - chip, gpiochip_groups, - "gpiochip%d", chip->base); + dev = device_create_with_groups(&gpio_class, parent, MKDEV(0, 0), chip, + gpiochip_groups, GPIOCHIP_NAME "%d", + chip->base); if (IS_ERR(dev)) return PTR_ERR(dev); |