[PATCH] gpio-pcf857x: avoid an empty kernel message in case no irqis configured

From: Christian Engelmayer
Date: Tue Sep 18 2012 - 11:00:09 EST


Avoid a needless kernel message in case there is no client irq to be ignored.

[ 2.856058] gpiochip_add: registered GPIOs 248 to 255 on device: pcf8574
[ 2.862830] pcf857x 1-0020:

Signed-off-by: Christian Engelmayer <christian.engelmayer@xxxxxxxxxxxxxx>
---
--- a/drivers/gpio/gpio-pcf857x.c 2012-07-06 09:19:07.000000000 +0200
+++ b/drivers/gpio/gpio-pcf857x.c 2012-07-06 09:21:15.000000000 +0200
@@ -290,8 +290,8 @@ static int pcf857x_probe(struct i2c_clie
* methods can't be called from sleeping contexts.
*/

- dev_info(&client->dev, "%s\n",
- client->irq ? " (irq ignored)" : "");
+ if (client->irq)
+ dev_info(&client->dev, " (irq ignored)\n");

/* Let platform code set up the GPIOs and their users.
* Now is the first time anyone could use them.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/