Staging: bcm: fix CodingStyle warnings/errors reported by checkpatch.pl in led_control.h
This is a patch to the led_control.h file that fixes numerous warnings and errors reported by the checkpatch.pl tool. There still remain a few more, but as this is my first attempt at a commit, I'm not going to be too adventurous! Signed-off-by: Gerard Ryan <gerard@ryan.lt> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
073863432f
Коммит
242501ce5d
|
@ -4,11 +4,11 @@
|
|||
/*************************TYPE DEF**********************/
|
||||
#define NUM_OF_LEDS 4
|
||||
|
||||
#define DSD_START_OFFSET 0x0200
|
||||
#define EEPROM_VERSION_OFFSET 0x020E
|
||||
#define EEPROM_HW_PARAM_POINTER_ADDRESS 0x0218
|
||||
#define EEPROM_HW_PARAM_POINTER_ADDRRES_MAP5 0x0220
|
||||
#define GPIO_SECTION_START_OFFSET 0x03
|
||||
#define DSD_START_OFFSET 0x0200
|
||||
#define EEPROM_VERSION_OFFSET 0x020E
|
||||
#define EEPROM_HW_PARAM_POINTER_ADDRESS 0x0218
|
||||
#define EEPROM_HW_PARAM_POINTER_ADDRRES_MAP5 0x0220
|
||||
#define GPIO_SECTION_START_OFFSET 0x03
|
||||
|
||||
#define COMPATIBILITY_SECTION_LENGTH 42
|
||||
#define COMPATIBILITY_SECTION_LENGTH_MAP5 84
|
||||
|
@ -18,27 +18,27 @@
|
|||
#define EEPROM_MAP5_MINORVERSION 0
|
||||
|
||||
|
||||
#define MAX_NUM_OF_BLINKS 10
|
||||
#define NUM_OF_GPIO_PINS 16
|
||||
#define MAX_NUM_OF_BLINKS 10
|
||||
#define NUM_OF_GPIO_PINS 16
|
||||
|
||||
#define DISABLE_GPIO_NUM 0xFF
|
||||
#define EVENT_SIGNALED 1
|
||||
#define DISABLE_GPIO_NUM 0xFF
|
||||
#define EVENT_SIGNALED 1
|
||||
|
||||
#define MAX_FILE_NAME_BUFFER_SIZE 100
|
||||
#define MAX_FILE_NAME_BUFFER_SIZE 100
|
||||
|
||||
#define TURN_ON_LED(GPIO, index) do{ \
|
||||
#define TURN_ON_LED(GPIO, index) do { \
|
||||
UINT gpio_val = GPIO; \
|
||||
(Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ? \
|
||||
wrmaltWithLock(Adapter,BCM_GPIO_OUTPUT_SET_REG, &gpio_val ,sizeof(gpio_val)) : \
|
||||
wrmaltWithLock(Adapter,BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)); \
|
||||
}while(0);
|
||||
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)) : \
|
||||
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)); \
|
||||
} while (0);
|
||||
|
||||
#define TURN_OFF_LED(GPIO, index) do { \
|
||||
UINT gpio_val = GPIO; \
|
||||
(Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ? \
|
||||
wrmaltWithLock(Adapter,BCM_GPIO_OUTPUT_CLR_REG,&gpio_val ,sizeof(gpio_val)) : \
|
||||
wrmaltWithLock(Adapter,BCM_GPIO_OUTPUT_SET_REG,&gpio_val ,sizeof(gpio_val)); \
|
||||
}while(0);
|
||||
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)) : \
|
||||
wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)); \
|
||||
} while (0);
|
||||
|
||||
#define B_ULONG32 unsigned long
|
||||
|
||||
|
@ -50,7 +50,7 @@ typedef enum _LEDColors{
|
|||
BLUE_LED = 2,
|
||||
YELLOW_LED = 3,
|
||||
GREEN_LED = 4
|
||||
} LEDColors; /*Enumerated values of different LED types*/
|
||||
} LEDColors; /*Enumerated values of different LED types*/
|
||||
|
||||
typedef enum LedEvents {
|
||||
SHUTDOWN_EXIT = 0x00,
|
||||
|
@ -62,43 +62,41 @@ typedef enum LedEvents {
|
|||
LOWPOWER_MODE_ENTER = 0x20,
|
||||
IDLEMODE_CONTINUE = 0x40,
|
||||
IDLEMODE_EXIT = 0x80,
|
||||
LED_THREAD_INACTIVE = 0x100, //Makes the LED thread Inactivce. It wil be equivallent to putting the thread on hold.
|
||||
LED_THREAD_ACTIVE = 0x200 //Makes the LED Thread Active back.
|
||||
} LedEventInfo_t; /*Enumerated values of different driver states*/
|
||||
LED_THREAD_INACTIVE = 0x100, /* Makes the LED thread Inactivce. It wil be equivallent to putting the thread on hold. */
|
||||
LED_THREAD_ACTIVE = 0x200 /* Makes the LED Thread Active back. */
|
||||
} LedEventInfo_t; /* Enumerated values of different driver states */
|
||||
|
||||
#define DRIVER_HALT 0xff
|
||||
|
||||
|
||||
/*Structure which stores the information of different LED types
|
||||
* and corresponding LED state information of driver states*/
|
||||
typedef struct LedStateInfo_t
|
||||
{
|
||||
/*
|
||||
* Structure which stores the information of different LED types
|
||||
* and corresponding LED state information of driver states
|
||||
*/
|
||||
typedef struct LedStateInfo_t {
|
||||
UCHAR LED_Type; /* specify GPIO number - use 0xFF if not used */
|
||||
UCHAR LED_On_State; /* Bits set or reset for different states */
|
||||
UCHAR LED_Blink_State; /* Bits set or reset for blinking LEDs for different states */
|
||||
UCHAR GPIO_Num;
|
||||
UCHAR BitPolarity; /*To represent whether H/W is normal polarity or reverse
|
||||
polarity*/
|
||||
}LEDStateInfo, *pLEDStateInfo;
|
||||
UCHAR BitPolarity; /* To represent whether H/W is normal polarity or reverse polarity */
|
||||
} LEDStateInfo, *pLEDStateInfo;
|
||||
|
||||
|
||||
typedef struct _LED_INFO_STRUCT
|
||||
{
|
||||
typedef struct _LED_INFO_STRUCT {
|
||||
LEDStateInfo LEDState[NUM_OF_LEDS];
|
||||
BOOLEAN bIdleMode_tx_from_host; /*Variable to notify whether driver came out
|
||||
from idlemode due to Host or target*/
|
||||
BOOLEAN bIdleMode_tx_from_host; /* Variable to notify whether driver came out from idlemode due to Host or target*/
|
||||
BOOLEAN bIdle_led_off;
|
||||
wait_queue_head_t notify_led_event;
|
||||
wait_queue_head_t idleModeSyncEvent;
|
||||
struct task_struct *led_cntrl_threadid;
|
||||
int led_thread_running;
|
||||
struct task_struct *led_cntrl_threadid;
|
||||
int led_thread_running;
|
||||
BOOLEAN bLedInitDone;
|
||||
|
||||
} LED_INFO_STRUCT, *PLED_INFO_STRUCT;
|
||||
//LED Thread state.
|
||||
#define BCM_LED_THREAD_DISABLED 0 //LED Thread is not running.
|
||||
#define BCM_LED_THREAD_RUNNING_ACTIVELY 1 //LED thread is running.
|
||||
#define BCM_LED_THREAD_RUNNING_INACTIVELY 2 //LED thread has been put on hold
|
||||
/* LED Thread state. */
|
||||
#define BCM_LED_THREAD_DISABLED 0 /* LED Thread is not running. */
|
||||
#define BCM_LED_THREAD_RUNNING_ACTIVELY 1 /* LED thread is running. */
|
||||
#define BCM_LED_THREAD_RUNNING_INACTIVELY 2 /*LED thread has been put on hold*/
|
||||
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче