mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
e0822cf9b8
commit
c47d9e1b73
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue