Re: [PATCH 3/3 v2] at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board

From: Haavard Skinnemoen
Date: Tue Oct 27 2009 - 20:36:27 EST


Andrew Victor <avictor.za@xxxxxxxxx> wrote:
> > +static struct mci_platform_data __initdata mci0_data = {
> > + Â Â Â .slot[0] = {
> > +        .bus_width   Â= 4,
> > +        .detect_pin   = AT91_PIN_PD10,
> > +        .wp_pin     = -1,
> > + Â Â Â },
>
> Causes at91_set_gpio_input() to be called for pin -1. Which shouldn't be valid.
> AT91 platforms use 0 to indicate an un-connected GPIO pin, so the
> assignment of "wp_pin" should probably just be removed.

The mci driver expects non-existent pins to have a negative value, as
do all other drivers which use gpio_is_valid().

Haavard
--
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/