Skip to contentSkip to conversation

gpiolib: change a warning to debug message when failing to get gpio

PATCH In review Heikki Krogerus 2 participants 2 messages Nov 29, 2013 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gpiolib: change a warning to debug message when failing to get gpio

It's the drivers responsibility to react on failure to get the gpio descriptors and not the frameworks. Since there are some common peripherals that may or may not have certain pins connected to gpio lines, depending on the platform, printing the warning there may end up generating useless bug reports.

---
 drivers/gpio/gpiolib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpiolib.c +1 -1
index ac53a95..297318f 100644
@@ -2437,7 +2437,7 @@ struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
 	}
 
 	if (IS_ERR(desc)) {
-		dev_warn(dev, "lookup for GPIO %s failed\n", con_id);
+		dev_dbg(dev, "lookup for GPIO %s failed\n", con_id);
 		return desc;
 	}
 
Signature · 1 line
1.8.4.4
#1 lore raw
Quoted 8 lines · Heikki Krogerus

It's the drivers responsibility to react on failure to get the gpio descriptors and not the frameworks. Since there are some common peripherals that may or may not have certain pins connected to gpio lines, depending on the platform, printing the warning there may end up generating useless bug reports.

Applied for fixes, thanks Heikki!

Yours,
Linus Walleij