upstream: [media] radio-shark: remove a warning when CONFIG_PM is not defined
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 1 Nov 2013 15:44:54 +0000 (12:44 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:52:14 +0000 (11:52 +0900)
On alpha, allyesconfig doesn't have CONFIG_PM, and produces the following warnings:
drivers/media/radio/radio-shark.c:274:13: warning: 'shark_resume_leds' defined but not used [-Wunused-function]
drivers/media/radio/radio-shark2.c:240:13: warning: 'shark_resume_leds' defined but not used [-Wunused-function]
That's because those functions are used only at device resume.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/radio/radio-shark.c
drivers/media/radio/radio-shark2.c

index b914772..3db8a8c 100644 (file)
@@ -271,6 +271,7 @@ static void shark_unregister_leds(struct shark_device *shark)
        cancel_work_sync(&shark->led_work);
 }
 
+#ifdef CONFIG_PM
 static void shark_resume_leds(struct shark_device *shark)
 {
        if (test_bit(BLUE_IS_PULSE, &shark->brightness_new))
@@ -280,6 +281,7 @@ static void shark_resume_leds(struct shark_device *shark)
        set_bit(RED_LED, &shark->brightness_new);
        schedule_work(&shark->led_work);
 }
+#endif
 #else
 static int shark_register_leds(struct shark_device *shark, struct device *dev)
 {
index 9fb6697..d86d90d 100644 (file)
@@ -237,6 +237,7 @@ static void shark_unregister_leds(struct shark_device *shark)
        cancel_work_sync(&shark->led_work);
 }
 
+#ifdef CONFIG_PM
 static void shark_resume_leds(struct shark_device *shark)
 {
        int i;
@@ -246,6 +247,7 @@ static void shark_resume_leds(struct shark_device *shark)
 
        schedule_work(&shark->led_work);
 }
+#endif
 #else
 static int shark_register_leds(struct shark_device *shark, struct device *dev)
 {