Re: mmotm 2010-10-13-17-13 uploaded (leds)

From: Randy Dunlap
Date: Thu Oct 14 2010 - 12:15:40 EST


On 10/14/10 04:38, Johannes Berg wrote:
> On Thu, 2010-10-14 at 05:29 +0100, Randy Dunlap wrote:
>
>> When # CONFIG_LEDS_CLASS is not set
>> & CONFIG_LEDS_TRIGGERS=y:
>>
>> drivers/built-in.o: In function `led_trigger_set':
>> (.text+0x4737b): undefined reference to `led_brightness_set'
>
> Curious. Why is that even possible?
>
> config LEDS_CLASS
> ...
> if LEDS_CLASS
> ...
> config LEDS_TRIGGERS
> ...
> endif # LEDS_TRIGGERS
>
> endif # LEDS_CLASS
> ...
>
> Are there dependencies missing? I was under the impression that this
> shouldn't be happening. And what's the point in having triggers, but
> nothing to trigger...? How about the patch below?

It seems to be due to net/mac80211/Kconfig:

config MAC80211_LEDS
bool "Enable LED triggers"
depends on MAC80211
select NEW_LEDS
select LEDS_TRIGGERS



> johannes
>
>
> Subject: leds: fix up dependencies
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
>
> It's not useful to build LED triggers when
> there's no LEDs that can be triggered by
> them. Therefore, fix up the dependencies
> so that this cannot happen, and fix a few
> users that select triggers to depend on
> LEDS_CLASS as well (there is also one user
> that also selects LEDS_CLASS, which is OK).
>
> As a result, we can now make everything a
> module again if desired (including the LED
> triggers, that previously could only be
> built in) -- and add back the warning in
> rt2x00's Kconfig I previously removed.
>
> Reported-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>

The patch does not apply cleanly to mmotm, but it seems
like a good plan...


--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
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/