From: Andrew Morton <akpm@linux-foundation.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
David Brownell <dbrownell@users.sourceforge.net>
Subject: Re: [PATCH] GPIO: Add gpio_lookup
Date: Tue, 13 Oct 2009 11:05:07 -0700 [thread overview]
Message-ID: <20091013110507.a576310a.akpm@linux-foundation.org> (raw)
In-Reply-To: <20091010134814.0bac8624@bike.lwn.net>
On Sat, 10 Oct 2009 13:48:14 -0600
Jonathan Corbet <corbet@lwn.net> wrote:
> +int gpio_lookup(const char *name)
> +{
> + int i;
> +
> + for (i = 0; i < ARCH_NR_GPIOS; i++) {
> + struct gpio_chip *chip = gpio_desc[i].chip;
> +
> + if (chip == NULL || chip->names == NULL)
> + continue;
> + if (!strcmp (name, chip->names[i - chip->base])) {
> + printk(KERN_NOTICE "grbn found %d\n", i);
> + return i;
> + }
> + }
> + return -EINVAL;
> +}
> +EXPORT_SYMBOL_GPL(gpio_lookup);
I'll assume the printk wasn't supposed to be there.
next prev parent reply other threads:[~2009-10-13 18:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-10 19:48 [PATCH] GPIO: Add gpio_lookup Jonathan Corbet
2009-10-10 19:53 ` [PATCH v2] " Jonathan Corbet
2009-10-12 6:11 ` Ben Nizette
2009-10-12 15:23 ` Jonathan Corbet
2009-10-13 8:31 ` Ben Nizette
2009-10-13 22:13 ` David Brownell
2009-10-13 22:06 ` David Brownell
2009-10-13 22:05 ` David Brownell
2009-10-13 21:10 ` David Brownell
2009-10-13 22:28 ` Jonathan Corbet
2009-10-13 22:53 ` David Brownell
2009-10-14 12:53 ` Mark Brown
2009-10-13 18:05 ` Andrew Morton [this message]
2009-10-13 18:19 ` [PATCH] " Jonathan Corbet
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=20091013110507.a576310a.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=dbrownell@users.sourceforge.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox