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

Staging: bcm: Move directives for the preprocessor statement to enum value in led_control.h

DRIVER_HALT is a driver state that was originally
defined as a #define statement. This patch moves
it to the LedEvents type as an enumerated
value for the purpose of removing a compile time warning:

drivers/staging/bcm/led_control.c: In function ‘LEDControlThread’:
drivers/staging/bcm/led_control.c:817:3: warning: case value ‘255’ not in enumerated type ‘LedEventInfo_t’ [-Wswitch]

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kevin McKinney and committed by
Greg Kroah-Hartman
00da8edd 5fa5a901

+2 -4
+2 -4
drivers/staging/bcm/led_control.h
··· 63 63 IDLEMODE_CONTINUE = 0x40, 64 64 IDLEMODE_EXIT = 0x80, 65 65 LED_THREAD_INACTIVE = 0x100, /* Makes the LED thread Inactivce. It wil be equivallent to putting the thread on hold. */ 66 - LED_THREAD_ACTIVE = 0x200 /* Makes the LED Thread Active back. */ 66 + LED_THREAD_ACTIVE = 0x200, /* Makes the LED Thread Active back. */ 67 + DRIVER_HALT = 0xff 67 68 } LedEventInfo_t; /* Enumerated values of different driver states */ 68 - 69 - #define DRIVER_HALT 0xff 70 - 71 69 72 70 /* 73 71 * Structure which stores the information of different LED types