summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorEnrico Weigelt <info@metux.net>2020-12-02 16:37:54 +0300
committerLinus Walleij <linus.walleij@linaro.org>2020-12-06 01:27:01 +0300
commitc47d9e1b734361a5d809fae02a268b85ab0f95ee (patch)
treef10742281d2ff603cc04756246ec140c59167049 /drivers/gpio
parente0822cf9b892ed051830daaf57896aca48c8567b (diff)
downloadlinux-c47d9e1b734361a5d809fae02a268b85ab0f95ee.tar.xz
gpio: just plain warning when nonexisting gpio requested
When trying to export an nonexisting gpio ID, the kernel prints out a big warning w/ stacktrace, sounding like a huge problem. In fact it's a pretty normal situation, like file or device not found. So, just print a more relaxed warning instead. changes v2: drop defining pr_fmt() Signed-off-by: Enrico Weigelt <info@metux.net> Link: https://lore.kernel.org/r/20201202133754.32045-1-info@metux.net Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index c6db72d5420e..fd622c05cbd5 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+
#include <linux/bitmap.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -119,7 +120,7 @@ struct gpio_desc *gpio_to_desc(unsigned gpio)
spin_unlock_irqrestore(&gpio_lock, flags);
if (!gpio_is_valid(gpio))
- WARN(1, "invalid GPIO %d\n", gpio);
+ pr_warn("invalid GPIO %d\n", gpio);
return NULL;
}