Commit c5b0b3cb authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] radio-shark: remove a warning when CONFIG_PM is not defined

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: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 408679cd
...@@ -271,6 +271,7 @@ static void shark_unregister_leds(struct shark_device *shark) ...@@ -271,6 +271,7 @@ static void shark_unregister_leds(struct shark_device *shark)
cancel_work_sync(&shark->led_work); cancel_work_sync(&shark->led_work);
} }
#ifdef CONFIG_PM
static void shark_resume_leds(struct shark_device *shark) static void shark_resume_leds(struct shark_device *shark)
{ {
if (test_bit(BLUE_IS_PULSE, &shark->brightness_new)) if (test_bit(BLUE_IS_PULSE, &shark->brightness_new))
...@@ -280,6 +281,7 @@ static void shark_resume_leds(struct shark_device *shark) ...@@ -280,6 +281,7 @@ static void shark_resume_leds(struct shark_device *shark)
set_bit(RED_LED, &shark->brightness_new); set_bit(RED_LED, &shark->brightness_new);
schedule_work(&shark->led_work); schedule_work(&shark->led_work);
} }
#endif
#else #else
static int shark_register_leds(struct shark_device *shark, struct device *dev) static int shark_register_leds(struct shark_device *shark, struct device *dev)
{ {
......
...@@ -237,6 +237,7 @@ static void shark_unregister_leds(struct shark_device *shark) ...@@ -237,6 +237,7 @@ static void shark_unregister_leds(struct shark_device *shark)
cancel_work_sync(&shark->led_work); cancel_work_sync(&shark->led_work);
} }
#ifdef CONFIG_PM
static void shark_resume_leds(struct shark_device *shark) static void shark_resume_leds(struct shark_device *shark)
{ {
int i; int i;
...@@ -246,6 +247,7 @@ static void shark_resume_leds(struct shark_device *shark) ...@@ -246,6 +247,7 @@ static void shark_resume_leds(struct shark_device *shark)
schedule_work(&shark->led_work); schedule_work(&shark->led_work);
} }
#endif
#else #else
static int shark_register_leds(struct shark_device *shark, struct device *dev) static int shark_register_leds(struct shark_device *shark, struct device *dev)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment