Received: from viti.kaiser.cx (viti.kaiser.cx [85.214.81.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B49DD2C82 for ; Thu, 25 Nov 2021 16:48:00 +0000 (UTC) Received: from dslb-188-097-211-055.188.097.pools.vodafone-ip.de ([188.97.211.55] 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 1mqHuf-0006ye-4A; Thu, 25 Nov 2021 17:47:57 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 1/4] staging: r8188eu: remove pm_netdev_open Date: Thu, 25 Nov 2021 17:47:42 +0100 Message-Id: <20211125164745.8188-2-martin@kaiser.cx> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211125164745.8188-1-martin@kaiser.cx> References: <20211125164745.8188-1-martin@kaiser.cx> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The only caller of pm_netdev_open sets bnormal to true. In this case, pm_netdev_open just calls netdev_open. Remove pm_netdev_open and call netdev_open directly. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/include/usb_osintf.h | 1 - drivers/staging/r8188eu/os_dep/os_intfs.c | 11 ----------- drivers/staging/r8188eu/os_dep/usb_intf.c | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/staging/r8188eu/include/usb_osintf.h b/drivers/staging/r8188eu/include/usb_osintf.h index 624298b4bd0b..3e777ca52745 100644 --- a/drivers/staging/r8188eu/include/usb_osintf.h +++ b/drivers/staging/r8188eu/include/usb_osintf.h @@ -16,7 +16,6 @@ extern int rtw_mc2u_disable; u8 usbvendorrequest(struct dvobj_priv *pdvobjpriv, enum bt_usb_request brequest, enum rt_usb_wvalue wvalue, u8 windex, void *data, u8 datalen, u8 isdirectionin); -int pm_netdev_open(struct net_device *pnetdev, u8 bnormal); void netdev_br_init(struct net_device *netdev); void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb); void *scdb_findEntry(struct adapter *priv, unsigned char *ipAddr); diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index 5a5f182d30c9..397981bc9a62 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -760,17 +760,6 @@ void rtw_ips_dev_unload(struct adapter *padapter) rtw_hal_deinit(padapter); } -int pm_netdev_open(struct net_device *pnetdev, u8 bnormal) -{ - int status; - - if (bnormal) - status = netdev_open(pnetdev); - else - status = (_SUCCESS == ips_netdrv_open((struct adapter *)rtw_netdev_priv(pnetdev))) ? (0) : (-1); - return status; -} - int netdev_close(struct net_device *pnetdev) { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev); diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c index eca1036a721f..984e408f9366 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -298,7 +298,7 @@ static int rtw_resume(struct usb_interface *pusb_intf) pwrpriv->bkeepfwalive = false; DBG_88E("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive); - if (pm_netdev_open(pnetdev, true) != 0) { + if (netdev_open(pnetdev) != 0) { mutex_unlock(&pwrpriv->lock); goto exit; } -- 2.20.1