mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 15:49:42 -04:00
staging: r8188eu: SwLedOff needs no padapter parameter
Remove the padapter parameter from the SwLedOff function. padapter can be derived from the pLed parameter. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221015151115.232095-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c16a98833a
commit
728a14bf8f
@@ -42,8 +42,10 @@ static void SwLedOn(struct led_priv *pLed)
|
||||
pLed->bLedOn = true;
|
||||
}
|
||||
|
||||
static void SwLedOff(struct adapter *padapter, struct led_priv *pLed)
|
||||
static void SwLedOff(struct led_priv *pLed)
|
||||
{
|
||||
struct adapter *padapter = container_of(pLed, struct adapter, ledpriv);
|
||||
|
||||
if (padapter->bDriverStopped)
|
||||
return;
|
||||
|
||||
@@ -61,13 +63,13 @@ static void blink_work(struct work_struct *work)
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
if (padapter->pwrctrlpriv.rf_pwrstate != rf_on) {
|
||||
SwLedOff(padapter, pLed);
|
||||
SwLedOff(pLed);
|
||||
ResetLedStatus(pLed);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pLed->bLedOn)
|
||||
SwLedOff(padapter, pLed);
|
||||
SwLedOff(pLed);
|
||||
else
|
||||
SwLedOn(pLed);
|
||||
|
||||
@@ -141,7 +143,7 @@ void rtl8188eu_DeInitSwLeds(struct adapter *padapter)
|
||||
|
||||
cancel_delayed_work_sync(&ledpriv->blink_work);
|
||||
ResetLedStatus(ledpriv);
|
||||
SwLedOff(padapter, ledpriv);
|
||||
SwLedOff(ledpriv);
|
||||
}
|
||||
|
||||
void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction)
|
||||
@@ -258,7 +260,7 @@ void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction)
|
||||
pLed->bLedWPSBlinkInProgress = false;
|
||||
pLed->bLedScanBlinkInProgress = false;
|
||||
cancel_delayed_work(&pLed->blink_work);
|
||||
SwLedOff(padapter, pLed);
|
||||
SwLedOff(pLed);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user