Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] radio-shark2: Mark shark_resume_leds() inline to kill compiler warning

This mirrors the patch to the radio-shark driver by Geert Uytterhoeven.
If SHARK_USE_LEDS=1, but CONFIG_PM=n:
drivers/media/radio/radio-shark2.c:240: warning: ‘shark_resume_leds’ defined but not used
Instead of making the #ifdef logic even more complicated (there are already
two definitions of shark_resume_leds()), mark shark_resume_leds() inline to
kill the compiler warning. shark_resume_leds() is small and it has only one
caller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>

authored by

Hans de Goede and committed by
Mauro Carvalho Chehab
d8eec74a c6f8e557

+1 -3
+1 -3
drivers/media/radio/radio-shark2.c
··· 237 237 cancel_work_sync(&shark->led_work); 238 238 } 239 239 240 - #ifdef CONFIG_PM 241 - static void shark_resume_leds(struct shark_device *shark) 240 + static inline void shark_resume_leds(struct shark_device *shark) 242 241 { 243 242 int i; 244 243 ··· 246 247 247 248 schedule_work(&shark->led_work); 248 249 } 249 - #endif 250 250 #else 251 251 static int shark_register_leds(struct shark_device *shark, struct device *dev) 252 252 {