Messages in this thread | | | Date | Tue, 13 Oct 2009 11:05:07 -0700 | From | Andrew Morton <> | Subject | Re: [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.
| |