Skip to contentSkip to conversation

gpio-pcf857x: avoid an empty kernel message in case no irq is configured

PATCH New Christian Engelmayer 1 participant 1 message Sep 18, 2012 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio-pcf857x: avoid an empty kernel message in case no irq is configured

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:

---

drivers/gpio/gpio-pcf857x.c +2 -2
@@ -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.