Re: [PATCH] GPIO: Add gpio_lookup

From: Andrew Morton
Date: Tue Oct 13 2009 - 14:07:16 EST


On Sat, 10 Oct 2009 13:48:14 -0600
Jonathan Corbet <corbet@xxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/