Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2121051rwi; Sat, 15 Oct 2022 08:15:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+VybtgK+ROjsQZqy7U1pupd7qsC5We0RWQkWJpnZtWk+J5GU63tVCcGSDqxvsHe5i/UFm X-Received: by 2002:a17:906:8a4a:b0:78d:5ff6:7507 with SMTP id gx10-20020a1709068a4a00b0078d5ff67507mr2353203ejc.194.1665846901789; Sat, 15 Oct 2022 08:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665846901; cv=none; d=google.com; s=arc-20160816; b=Ouc0bpMF1hs0mJj6NZxhiYVngZQD1PpXAT3s4DYjnNR9Ww1ZE6NVAv28v4XmjxMn+a Um5zfz6VYV1SczHxV7wFZ5wN6vn2nqh8ikKGcgywB9WyivVOST3xVICgRSsuP01igkx6 SET89YnChN9mHDcuvjFqoRWsXLkJwP5/vgvGsPIKGHK+YtsTt7SvAsruenSdjMqSJuJj Njtfo2NLirDkekRCjmX5dpA63GVmxSGTUDk82f8L/a2PMS7WRSkwyKy31iWs8xPCNAHD HVANQk20wNz5o74DvOpp3J0uvYXJgapOwQ0BceyIDu6vYVKB1McJEOx7XLpvdpCoSPx0 kGaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fAWs7X3fA932yxN4uqwgOFM/fbZUojY1lEBWaA8/F+U=; b=D4reDQ27p9BnFH7j46akp/ZVtj9i59osztj1jy0lB+J1KAMEjfdYI2k1eM9yCOtWqt kWQyJE4bDlGMknhMnWDmKnbtVO/4ZHL1H41RfDDn6LesL9JTkYCk7FGpcoUJ6AcoOdkb O5YTPLbYYqBmm8EgeyXfSAy5Mx1CMTGStgtKFfJpMcUFOLKWO6Z0/jY698/RMIXdCWgt /OOEqOaXbEwndrIcXH/G0O3jrhwAO96eBLQ6rDGtX7seg3ICie8DWOX9WHvHMHeTciJ/ 16RhoZXwKozBadEqkfDiYkkOpEW03M0AZQyHqkqEKUuIAJsWkHnWK0LIcjPVvzhl2iD/ PREw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t11-20020a056402524b00b0045c1782d77fsi5359889edd.40.2022.10.15.08.14.35; Sat, 15 Oct 2022 08:15:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbiJOPMB (ORCPT + 99 others); Sat, 15 Oct 2022 11:12:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbiJOPLo (ORCPT ); Sat, 15 Oct 2022 11:11:44 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85BB446847 for ; Sat, 15 Oct 2022 08:11:40 -0700 (PDT) Received: from ipservice-092-217-066-135.092.217.pools.vodafone-ip.de ([92.217.66.135] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1ojip5-0006sp-9a; Sat, 15 Oct 2022 17:11:35 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 05/10] staging: r8188eu: SwLedOff needs no padapter parameter Date: Sat, 15 Oct 2022 17:11:10 +0200 Message-Id: <20221015151115.232095-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221015151115.232095-1-martin@kaiser.cx> References: <20221015151115.232095-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the padapter parameter from the SwLedOff function. padapter can be derived from the pLed parameter. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_led.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c index aa8f41edfade..56f043d8ff38 100644 --- a/drivers/staging/r8188eu/core/rtw_led.c +++ b/drivers/staging/r8188eu/core/rtw_led.c @@ -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; -- 2.30.2