All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Engelmayer <christian.engelmayer@frequentis.com>
To: <linux-kernel@vger.kernel.org>
Cc: <christian.engelmayer@frequentis.com>, <grant.likely@secretlab.ca>
Subject: [PATCH] gpio-pcf857x: avoid an empty kernel message in case no irq is configured
Date: Tue, 18 Sep 2012 16:50:06 +0200	[thread overview]
Message-ID: <20120918165006.3852c06d@frequentis.com> (raw)

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@frequentis.com>
---
--- 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.

                 reply	other threads:[~2012-09-18 15:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120918165006.3852c06d@frequentis.com \
    --to=christian.engelmayer@frequentis.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.