netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/rfkill/rfkill.c: fix unused rfkill_led_trigger() warning
@ 2008-12-31  9:09 Simon Holm Thøgersen
  2008-12-31  9:31 ` Ivo Van Doorn
  2009-01-05  1:11 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Holm Thøgersen @ 2008-12-31  9:09 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: netdev

commit 4dec9b807be757780ca3611a959ac22c28d292a7 ("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 <odie@cs.aau.dk>
---
 net/rfkill/rfkill.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index 3c94f76..3eaa394 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -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)
@@ -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,
-- 
1.6.0.2.526.g5c283


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-05  1:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-31  9:09 [PATCH] net/rfkill/rfkill.c: fix unused rfkill_led_trigger() warning Simon Holm Thøgersen
2008-12-31  9:31 ` Ivo Van Doorn
2009-01-05  1:11 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).