lkml.org 
[lkml]   [2009]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] GPIO: Add gpio_lookup
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.


\
 
 \ /
  Last update: 2009-10-13 20:21    [W:0.113 / U:12.392 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site