Re: mmotm 2008-12-03-01-50 uploaded (sdhci)
From: Pierre Ossman
Date: Sun Dec 21 2008 - 10:54:37 EST
On Mon, 15 Dec 2008 12:03:23 -0800
Randy Dunlap <randy.dunlap@xxxxxxxxxx> wrote:
>
> Hi Pierre,
>
> If I change the last line above to
> && defined(CONFIG_MMC_SDHCI_MODULE)
> then it builds OK. Using !defined still has build errors...
> and I think that my small change is also correct.
>
Indeed. My bad.
> However, I'd prefer to see this done with Kconfig and then use
> empty stubs for the functions that wouldn't be called.
>
I don't like using Kconfig as a way to clean up the code. But if people
would like the ability to compile out this functionality, then that's
another matter. I have no seen any such requests though.
>
> I think that you should audit the other uses of
> #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
>
> in sdhci.c as well.
>
Right. I'll queue up a cleaned up version.
> Also, in sdhci_add_host(), why is the call to free_irq() inside the
> CONFIG_LEDS block:
>
> #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> reset:
> sdhci_reset(host, SDHCI_RESET_ALL);
> free_irq(host->irq, host);
> #endif
>
Because without the leds class registration, there is no failure mode
that requires freeing the interrupt.
Rgds
--
-- Pierre Ossman
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
Attachment:
signature.asc
Description: PGP signature