Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bcfab20 authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman
Browse files

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

parent 351e836f
Loading
Loading
Loading
Loading
+79 −59
Original line number Diff line number Diff line
@@ -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 @@ exit:
 *  <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;
}

@@ -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++;
@@ -605,8 +617,11 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter)
	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;