Fixed some of the issues found by checkpatch.pl. The 80 character limit warnings were ignored due to the sheer amount of them, and that most changes would destroy readability. Signed-off-by: Jonathan Frederick <doublej472@xxxxxxxxx> --- drivers/staging/rtl8712/rtl8712_led.c | 48 +++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c index 9055827..2012d9e 100644 --- a/drivers/staging/rtl8712/rtl8712_led.c +++ b/drivers/staging/rtl8712/rtl8712_led.c @@ -58,14 +58,16 @@ enum _LED_STATE_871x { LED_POWER_ON_BLINK = 5, LED_SCAN_BLINK = 6, /* LED is blinking during scanning period, * the # of times to blink is depend on time - * for scanning. */ + * for scanning. + */ LED_NO_LINK_BLINK = 7, /* LED is blinking during no link state. */ LED_BLINK_StartToBlink = 8,/* Customized for Sercomm Printer - * Server case */ + * Server case + */ LED_BLINK_WPS = 9, /* LED is blinkg during WPS communication */ LED_TXRX_BLINK = 10, - LED_BLINK_WPS_STOP = 11, /*for ALPHA */ - LED_BLINK_WPS_STOP_OVERLAP = 12, /*for BELKIN */ + LED_BLINK_WPS_STOP = 11, /* for ALPHA */ + LED_BLINK_WPS_STOP_OVERLAP = 12, /* for BELKIN */ }; /*=========================================================================== @@ -110,7 +112,8 @@ static void DeInitLed871x(struct LED_871x *pLed) { del_timer_sync(&pLed->BlinkTimer); /* We should reset bLedBlinkInProgress if we cancel - * the LedControlTimer, */ + * the LedControlTimer, + */ pLed->bLedBlinkInProgress = false; } @@ -352,7 +355,7 @@ static void SwLedBlink1(struct LED_871x *pLed) } pLed->bLedScanBlinkInProgress = false; } else { - if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_OFF; else pLed->BlinkingLedState = LED_ON; @@ -387,7 +390,7 @@ static void SwLedBlink1(struct LED_871x *pLed) pLed->BlinkTimes = 0; pLed->bLedBlinkInProgress = false; } else { - if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_OFF; else pLed->BlinkingLedState = LED_ON; @@ -457,7 +460,7 @@ static void SwLedBlink2(struct LED_871x *pLed) } pLed->bLedScanBlinkInProgress = false; } else { - if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_OFF; else pLed->BlinkingLedState = LED_ON; @@ -664,7 +667,7 @@ static void SwLedBlink4(struct LED_871x *pLed) msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); pLed->bLedBlinkInProgress = false; } else { - if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_OFF; else pLed->BlinkingLedState = LED_ON; @@ -761,7 +764,7 @@ static void SwLedBlink5(struct LED_871x *pLed) msecs_to_jiffies(LED_BLINK_FASTER_INTERVAL_ALPHA)); pLed->bLedBlinkInProgress = false; } else { - if (pLed->bLedOn) + if (pLed->bLedOn) pLed->BlinkingLedState = LED_OFF; else pLed->BlinkingLedState = LED_ON; @@ -827,7 +830,8 @@ static void BlinkTimerCallback(unsigned long data) struct LED_871x *pLed = (struct LED_871x *)data; /* This fixed the crash problem on Fedora 12 when trying to do the - * insmod;ifconfig up;rmmod commands. */ + * insmod;ifconfig up;rmmod commands. + */ if (pLed->padapter->bSurpriseRemoved || pLed->padapter->bDriverStopped) return; schedule_work(&pLed->BlinkWorkItem); @@ -942,7 +946,7 @@ static void SwLedControlMode1(struct _adapter *padapter, if (psitesurveyctrl->traffic_busy && check_fwstate(pmlmepriv, _FW_LINKED)) ; /* dummy branch */ - else if (!pLed->bLedScanBlinkInProgress) { + else if (!pLed->bLedScanBlinkInProgress) { if (IS_LED_WPS_BLINKING(pLed)) return; if (pLed->bLedNoLinkBlinkInProgress) { @@ -965,8 +969,8 @@ static void SwLedControlMode1(struct _adapter *padapter, else pLed->BlinkingLedState = LED_ON; mod_timer(&pLed->BlinkTimer, jiffies + - msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); - } + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); + } break; case LED_CTL_TX: case LED_CTL_RX: @@ -996,7 +1000,7 @@ static void SwLedControlMode1(struct _adapter *padapter, case LED_CTL_START_WPS: /*wait until xinpin finish */ case LED_CTL_START_WPS_BOTTON: - if (!pLed->bLedWPSBlinkInProgress) { + if (!pLed->bLedWPSBlinkInProgress) { if (pLed->bLedNoLinkBlinkInProgress) { del_timer(&pLed->BlinkTimer); pLed->bLedNoLinkBlinkInProgress = false; @@ -1067,7 +1071,7 @@ static void SwLedControlMode1(struct _adapter *padapter, else pLed->BlinkingLedState = LED_ON; mod_timer(&pLed->BlinkTimer, jiffies + - msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); + msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); break; case LED_CTL_POWER_OFF: pLed->CurrLedState = LED_OFF; @@ -1109,9 +1113,9 @@ static void SwLedControlMode2(struct _adapter *padapter, switch (LedAction) { case LED_CTL_SITE_SURVEY: - if (pmlmepriv->sitesurveyctrl.traffic_busy) + if (pmlmepriv->sitesurveyctrl.traffic_busy) ; /* dummy branch */ - else if (!pLed->bLedScanBlinkInProgress) { + else if (!pLed->bLedScanBlinkInProgress) { if (IS_LED_WPS_BLINKING(pLed)) return; @@ -1127,8 +1131,8 @@ static void SwLedControlMode2(struct _adapter *padapter, else pLed->BlinkingLedState = LED_ON; mod_timer(&pLed->BlinkTimer, jiffies + - msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); - } + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA)); + } break; case LED_CTL_TX: @@ -1182,7 +1186,7 @@ static void SwLedControlMode2(struct _adapter *padapter, pLed->BlinkingLedState = LED_ON; mod_timer(&pLed->BlinkTimer, jiffies + msecs_to_jiffies(0)); - } + } break; case LED_CTL_STOP_WPS: @@ -1730,7 +1734,7 @@ static void SwLedControlMode6(struct _adapter *padapter, case LED_CTL_LINK: /*solid blue*/ case LED_CTL_SITE_SURVEY: if (IS_LED_WPS_BLINKING(pLed)) - return; + return; pLed->CurrLedState = LED_ON; pLed->BlinkingLedState = LED_ON; pLed->bLedBlinkInProgress = false; -- 2.8.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel