提交 9bcfab20 编写于 作者: M Matthias Beyer 提交者: Greg Kroah-Hartman

Staging: bcm: led_control.c: Indentation/Whitespace/Line length cleanup

Signed-off-by: NMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 351e836f
......@@ -23,8 +23,12 @@ bool IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios)
return TRUE;
}
static INT LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLedIndex,
ULONG timeout, INT num_of_time, enum bcm_led_events currdriverstate)
static INT LED_Blink(struct bcm_mini_adapter *Adapter,
UINT GPIO_Num,
UCHAR uiLedIndex,
ULONG timeout,
INT num_of_time,
enum bcm_led_events currdriverstate)
{
int Status = STATUS_SUCCESS;
bool bInfinite = false;
......@@ -95,8 +99,11 @@ static INT ScaleRateofTransfer(ULONG rate)
static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_Num_tx,
UCHAR uiTxLedIndex, UCHAR GPIO_Num_rx, UCHAR uiRxLedIndex,
static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter,
UCHAR GPIO_Num_tx,
UCHAR uiTxLedIndex,
UCHAR GPIO_Num_rx,
UCHAR uiRxLedIndex,
enum bcm_led_events currdriverstate)
{
/* Initial values of TX and RX packets */
......@@ -261,7 +268,8 @@ static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_N
* <OSAL_STATUS_CODE>
* -----------------------------------------------------------------------------
*/
static INT ValidateDSDParamsChecksum(struct bcm_mini_adapter *Adapter, ULONG ulParamOffset,
static INT ValidateDSDParamsChecksum(struct bcm_mini_adapter *Adapter,
ULONG ulParamOffset,
USHORT usParamLen)
{
INT Status = STATUS_SUCCESS;
......@@ -347,7 +355,8 @@ static INT ValidateDSDParamsChecksum(struct bcm_mini_adapter *Adapter, ULONG ulP
* <OSAL_STATUS_CODE>
* -----------------------------------------------------------------------------
*/
static INT ValidateHWParmStructure(struct bcm_mini_adapter *Adapter, ULONG ulHwParamOffset)
static INT ValidateHWParmStructure(struct bcm_mini_adapter *Adapter,
ULONG ulHwParamOffset)
{
INT Status = STATUS_SUCCESS;
......@@ -387,7 +396,8 @@ static int ReadLEDInformationFromEEPROM(struct bcm_mini_adapter *Adapter,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
"usEEPROMVersion: Minor:0x%X Major:0x%x",
usEEPROMVersion&0xFF, ((usEEPROMVersion>>8)&0xFF));
usEEPROMVersion & 0xFF,
((usEEPROMVersion >> 8) & 0xFF));
if (((usEEPROMVersion>>8)&0xFF) < EEPROM_MAP5_MAJORVERSION) {
......@@ -437,8 +447,8 @@ static int ReadLEDInformationFromEEPROM(struct bcm_mini_adapter *Adapter,
* To read GPIO section, add GPIO offset further.
*/
dwReadValue +=
DSD_START_OFFSET; /* = start address of hw param section. */
dwReadValue += DSD_START_OFFSET;
/* = start address of hw param section. */
dwReadValue += GPIO_SECTION_START_OFFSET;
/* = GPIO start offset within HW Param section. */
......@@ -472,7 +482,8 @@ static int ReadLEDInformationFromEEPROM(struct bcm_mini_adapter *Adapter,
}
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
"GPIO's bit map correspond to LED :0x%X", Adapter->gpioBitMap);
"GPIO's bit map correspond to LED :0x%X",
Adapter->gpioBitMap);
return Status;
}
......@@ -490,7 +501,7 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
memset(GPIO_Array, DISABLE_GPIO_NUM, NUM_OF_LEDS+1);
if (!Adapter->pstargetparams || IS_ERR(Adapter->pstargetparams)) {
BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
DBG_LVL_ALL, "Target Params not Avail.\n");
return -ENOENT;
}
......@@ -555,7 +566,8 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
* dont launch the LED control thread.
*/
for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
if ((Adapter->LEDInfo.LEDState[uiIndex].LED_Type == DISABLE_GPIO_NUM) ||
if ((Adapter->LEDInfo.LEDState[uiIndex].LED_Type ==
DISABLE_GPIO_NUM) ||
(Adapter->LEDInfo.LEDState[uiIndex].LED_Type == 0x7f) ||
(Adapter->LEDInfo.LEDState[uiIndex].LED_Type == 0))
uiNum_of_LED_Type++;
......@@ -599,14 +611,17 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter)
}
if (wrmalt(Adapter, GPIO_MODE_REGISTER, &uiResetValue,
sizeof(uiResetValue)) < 0)
BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
DBG_LVL_ALL, "LED Thread: WRM Failed\n");
Adapter->LEDInfo.bIdle_led_off = false;
}
static INT BcmGetGPIOPinInfo(struct bcm_mini_adapter *Adapter, UCHAR *GPIO_num_tx,
UCHAR *GPIO_num_rx, UCHAR *uiLedTxIndex, UCHAR *uiLedRxIndex,
static INT BcmGetGPIOPinInfo(struct bcm_mini_adapter *Adapter,
UCHAR *GPIO_num_tx,
UCHAR *GPIO_num_rx,
UCHAR *uiLedTxIndex,
UCHAR *uiLedRxIndex,
enum bcm_led_events currdriverstate)
{
UINT uiIndex = 0;
......@@ -645,6 +660,7 @@ static INT BcmGetGPIOPinInfo(struct bcm_mini_adapter *Adapter, UCHAR *GPIO_num_t
}
return STATUS_SUCCESS;
}
static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
{
UINT uiIndex = 0;
......@@ -708,7 +724,8 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
currdriverstate = DRIVER_INIT;
/* Adapter->DriverState; */
BcmGetGPIOPinInfo(Adapter, &GPIO_num, &dummyGPIONum,
&uiLedIndex, &dummyIndex, currdriverstate);
&uiLedIndex, &dummyIndex,
currdriverstate);
if (GPIO_num != DISABLE_GPIO_NUM)
TURN_ON_LED(1 << GPIO_num, uiLedIndex);
......@@ -722,7 +739,8 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
*/
currdriverstate = FW_DOWNLOAD;
BcmGetGPIOPinInfo(Adapter, &GPIO_num, &dummyGPIONum,
&uiLedIndex, &dummyIndex, currdriverstate);
&uiLedIndex, &dummyIndex,
currdriverstate);
if (GPIO_num != DISABLE_GPIO_NUM) {
timeout = 50;
......@@ -733,7 +751,8 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
case FW_DOWNLOAD_DONE:
currdriverstate = FW_DOWNLOAD_DONE;
BcmGetGPIOPinInfo(Adapter, &GPIO_num, &dummyGPIONum,
&uiLedIndex, &dummyIndex, currdriverstate);
&uiLedIndex, &dummyIndex,
currdriverstate);
if (GPIO_num != DISABLE_GPIO_NUM)
TURN_ON_LED(1 << GPIO_num, uiLedIndex);
break;
......@@ -746,7 +765,8 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
case NO_NETWORK_ENTRY:
currdriverstate = NO_NETWORK_ENTRY;
BcmGetGPIOPinInfo(Adapter, &GPIO_num, &dummyGPIONum,
&uiLedIndex, &dummyGPIONum, currdriverstate);
&uiLedIndex, &dummyGPIONum,
currdriverstate);
if (GPIO_num != DISABLE_GPIO_NUM)
TURN_ON_LED(1 << GPIO_num, uiLedIndex);
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册