gpiolib: Improve kernel messages
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 24 Apr 2020 14:14:32 +0000 (16:14 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 28 Apr 2020 13:48:16 +0000 (15:48 +0200)
commit262b90116619ecab0734a3d931851e1fa1e89a7d
tree568c6ad4e1d4fd5816c57b9211982f90fffe3a93
parent1475b6293af2e240294c09182872b18e47495f37
gpiolib: Improve kernel messages

Simplify the printing of kernel messages and make the messages more
accurate by using the most appropriate {dev,chip,gpiod}_*() helpers.

Sample impact:

    -gpiochip_setup_dev: registered GPIOs 496 to 511 on device: gpiochip0 (e6050000.gpio)
    +gpio gpiochip0: registered GPIOs 496 to 511 on e6050000.gpio

    -no flags found for gpios
    +gpio-953 (?): no flags found for gpios

    -GPIO line 355 (PCIE/SATA switch) hogged as output/low
    +gpio-355 (PCIE/SATA switch): hogged as output/low

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200424141432.11400-1-geert+renesas@glider.be
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c