Re: [PATCH] at91_mci: use generic GPIO calls

From: David Brownell
Date: Tue Feb 05 2008 - 05:08:21 EST


On Tuesday 05 February 2008, Marc Pignat wrote:
> Hi all!
>
> > /*
> > @@ -946,9 +986,10 @@ static int __exit at91_mci_remove(struct
> > host = mmc_priv(mmc);
> >
> > if (host->board->det_pin) {
> > + if (device_can_wakeup(&pdev->dev))
> > + free_irq(gpio_to_irq(host->board->det_pin), host);
>
> Seems strange to use device_can_wakeup(&pdev->dev) as
> have_we_requested_this_irq(gpio_to_irq(host->board->det_pin))... but seems to
> work.

Yeah ... it only works because the device_init_wakeup() is
done in the driver (sigh) instead of the device setup code.
Now that's only done if that IRQ was correctly requested,
so that bit does double duty.

Previously the driver always freeed that IRQ, even if it
hadn't actually managed to request it ... ;)


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