Skip to content

Commit

Permalink
net/rfkill/rfkill.c: fix unused rfkill_led_trigger() warning
Browse files Browse the repository at this point in the history
commit 4dec9b8 ("rfkill: strip pointless
notifier chain") removed the only user of rfkill_led_trigger() that was not
guarded by #ifdef CONFIG_RFKILL_LEDS. Therefore, move rfkill_led_trigger()
completely inside #ifdef CONFIG_RFKILL_LEDS and avoid the compile time
warning:

net/rfkill/rfkill.c:59: warning: 'rfkill_led_trigger' defined but not used

Signed-off-by: Simon Holm Thøgersen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Simon Holm Thøgersen authored and davem330 committed Jan 5, 2009
1 parent 939678f commit f32f8b7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/rfkill/rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ static unsigned long rfkill_states_lockdflt[BITS_TO_LONGS(RFKILL_TYPE_MAX)];
static bool rfkill_epo_lock_active;


#ifdef CONFIG_RFKILL_LEDS
static void rfkill_led_trigger(struct rfkill *rfkill,
enum rfkill_state state)
{
#ifdef CONFIG_RFKILL_LEDS
struct led_trigger *led = &rfkill->led_trigger;

if (!led->name)
Expand All @@ -66,10 +66,8 @@ static void rfkill_led_trigger(struct rfkill *rfkill,
led_trigger_event(led, LED_OFF);
else
led_trigger_event(led, LED_FULL);
#endif /* CONFIG_RFKILL_LEDS */
}

#ifdef CONFIG_RFKILL_LEDS
static void rfkill_led_trigger_activate(struct led_classdev *led)
{
struct rfkill *rfkill = container_of(led->trigger,
Expand Down

0 comments on commit f32f8b7

Please sign in to comment.