Message ID | 20221106124901.720785-6-martin@kaiser.cx |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1477225wru; Sun, 6 Nov 2022 04:51:55 -0800 (PST) X-Google-Smtp-Source: AMsMyM6sKMgHlTV/PmYnqW1HPh2+rRoLMTHowcqCfeu2o/HyWJYoKKI2z6ADJc2Pbx5kWXJmXs1f X-Received: by 2002:a05:6402:14ca:b0:462:e375:a1f4 with SMTP id f10-20020a05640214ca00b00462e375a1f4mr45975449edx.344.1667739115699; Sun, 06 Nov 2022 04:51:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667739115; cv=none; d=google.com; s=arc-20160816; b=yQQyKd5vK+BriAtQCUjpEdtjnUaKJ+hqgC5VSD1uynJ7Npt7OFYQ6uS0qLBRK/g/0a BhSITdaoLI1es5BSGeOazXyUG+z/2EZTJ/6eokl+sFkdLVoRvsCtZ8namXPy4SDWO+qp G+iYwnmUbbIT0JVsGDLAJ62ezSbK+C4oN+V0JWn549eJDockvVpc4weHP9WDBstH98Rp I4plQaIras58gDRABY1ayaRPyF4HtIBBcA+guCOJn9AOHIB+45tRyHcBR+oZ8JDZkfkF PjqeuF4hBLjhHcuktdEweryogbVEvJbtKMZBMSQ9+bex1RyXXqSsSTE8YDWUePfCJ4pE 27DQ== 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=MyJvvkuHk0VG4UCYFw7SBKsC24Wtu6t/lGt2R+4Qh7o=; b=wf+zZAagwztzz6dzMY6V265YchZ+atZo+Rt9mVLMDIKIDoVvbN8t6Gn3gbizEBQlRV 1XaXLvzeV5pPa3FaO/jlmXw+e09PYaRGlMMoy1giK4ZX0d9M/uPrmYzKE1JLEtL4DS8O f7wKKgapYL2DXkZSrgjDUZ+svV3HGW17OKQIYB4XrLUGJ+uPG3z+D5VpnGMwQF7AtYLw Im+uhX1lrq9WIDGICuaKJLa0MEBRNUodQugeanstmDPTcEOPcXckcZzeUBh8/y1Ailxn wDuFOTj/nLSOeQPyhDmOJq1LpWGAjznGqFZ+GmhglGErhIktOnTHUodjmbh+oLfBLOdt n2Hw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w18-20020a50fa92000000b00461d5afea01si5183088edr.165.2022.11.06.04.51.32; Sun, 06 Nov 2022 04:51:55 -0800 (PST) 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 S230012AbiKFMth (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Sun, 6 Nov 2022 07:49:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbiKFMtS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 6 Nov 2022 07:49:18 -0500 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 6152964FF for <linux-kernel@vger.kernel.org>; Sun, 6 Nov 2022 04:49:17 -0800 (PST) Received: from ipservice-092-217-068-220.092.217.pools.vodafone-ip.de ([92.217.68.220] 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 <martin@kaiser.cx>) id 1orf5M-0008Dj-20; Sun, 06 Nov 2022 13:49:12 +0100 From: Martin Kaiser <martin@kaiser.cx> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Larry Finger <Larry.Finger@lwfinger.net>, Phillip Potter <phil@philpotter.co.uk>, Michael Straube <straube.linux@gmail.com>, Pavel Skripkin <paskripkin@gmail.com>, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser <martin@kaiser.cx> Subject: [PATCH 5/9] staging: r8188eu: remove state checks in rtw_led_control Date: Sun, 6 Nov 2022 13:48:57 +0100 Message-Id: <20221106124901.720785-6-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221106124901.720785-1-martin@kaiser.cx> References: <20221106124901.720785-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748751211031289448?= X-GMAIL-MSGID: =?utf-8?q?1748751211031289448?= |
Series |
staging: r8188eu: another round of cleanups
|
|
Commit Message
Martin Kaiser
Nov. 6, 2022, 12:48 p.m. UTC
There's no need to check for bSurpriseRemoved or bDriverStopped in the
rtw_led_control function. This function schedules a delayed worker which
calls SwLedOn or SwLedOff (or the function calls SwLedOff directly).
SwLedOn and SwLedOff check bDriverStopped themselves or they initiate a
USB control transfer via usb_write, where bSurpriseRemoved is checked.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_led.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c index ce8de2eb7845..48725ce9d369 100644 --- a/drivers/staging/r8188eu/core/rtw_led.c +++ b/drivers/staging/r8188eu/core/rtw_led.c @@ -140,8 +140,7 @@ void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction) struct registry_priv *registry_par; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped) || - (!padapter->hw_init_completed)) + if (!padapter->hw_init_completed) return; if (!pLed->bRegUseLed)