diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-10-20 11:31:54 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-09 11:09:30 +0100 |
commit | 34ffd85d9c46cde3dc987cac82bff370a937ac4b (patch) | |
tree | 35f44623a855c33a483bb8eb4edabd13d2d1526f /drivers/gpio/gpiolib.h | |
parent | gpio: make the gpiochip a real device (diff) | |
download | linux-34ffd85d9c46cde3dc987cac82bff370a937ac4b.tar.xz linux-34ffd85d9c46cde3dc987cac82bff370a937ac4b.zip |
gpio: refer to gpio device in prints and debugfs
We use the new struct device inside gpio_chip to related debug
prints and warnings, and we also add it to the debugfs dump.
Cc: Johan Hovold <johan@kernel.org>
Cc: Michael Welling <mwelling@ieee.org>
Cc: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/gpio/gpiolib.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h index feea2c823e47..3f329c922f5b 100644 --- a/drivers/gpio/gpiolib.h +++ b/drivers/gpio/gpiolib.h @@ -174,17 +174,17 @@ static int __maybe_unused gpio_chip_hwgpio(const struct gpio_desc *desc) /* With chip prefix */ #define chip_emerg(chip, fmt, ...) \ - pr_emerg("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__) + dev_emerg(&chip->gpiodev->dev, "(%s): " fmt, chip->label, ##__VA_ARGS__) #define chip_crit(chip, fmt, ...) \ - pr_crit("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__) + dev_crit(&chip->gpiodev->dev, "(%s): " fmt, chip->label, ##__VA_ARGS__) #define chip_err(chip, fmt, ...) \ - pr_err("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__) + dev_err(&chip->gpiodev->dev, "(%s): " fmt, chip->label, ##__VA_ARGS__) #define chip_warn(chip, fmt, ...) \ - pr_warn("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__) + dev_warn(&chip->gpiodev->dev, "(%s): " fmt, chip->label, ##__VA_ARGS__) #define chip_info(chip, fmt, ...) \ - pr_info("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__) + dev_info(&chip->gpiodev->dev, "(%s): " fmt, chip->label, ##__VA_ARGS__) #define chip_dbg(chip, fmt, ...) \ - pr_debug("GPIO chip %s: " fmt, chip->label, ##__VA_ARGS__) + dev_dbg(&chip->gpiodev->dev, "(%s): " fmt, chip->label, ##__VA_ARGS__) #ifdef CONFIG_GPIO_SYSFS |