Messages in this thread | | | Date | Mon, 15 Dec 2008 12:03:23 -0800 | From | Randy Dunlap <> | Subject | Re: mmotm 2008-12-03-01-50 uploaded (sdhci) |
| |
Pierre Ossman wrote: > On Wed, 03 Dec 2008 12:53:24 -0800 > Randy Dunlap <randy.dunlap@oracle.com> wrote: > >> akpm@linux-foundation.org wrote: >>> The mm-of-the-moment snapshot 2008-12-03-01-50 has been uploaded to >>> >>> http://userweb.kernel.org/~akpm/mmotm/ >>> >>> It contains the following patches against 2.6.28-rc7: >> >> drivers/built-in.o: In function `sdhci_remove_host': >> (.text+0xd246a): undefined reference to `led_classdev_unregister' >> drivers/built-in.o: In function `sdhci_add_host': >> (.text+0xd5378): undefined reference to `led_classdev_register' >> make[1]: *** [.tmp_vmlinux1] Error 1 >> >> sdhci.c tries to handle the availability of led_()* without using >> Kconfig attributes. In this case, MMC_SDHCI=y and LEDS_CLASS=m, >> which sdhci.c doesn't handle. >> > > I'm not sure how to properly solve this. I'm not a big fan of adding a > specific Kconfig option for each and every optional feature. I'd prefer > if we get the correct thing<tm> based on just the MMC_SDHCI and > LEDS_CLASS options. > > -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) > +#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) > && !defined(CONFIG_MMC_SDHCI_MODULE)) > > perhaps?
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.
However, I'd prefer to see this done with Kconfig and then use empty stubs for the functions that wouldn't be called.
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.
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
HTH. ~Randy
| |