staging: r8188eu: remove pm_netdev_open
authorMartin Kaiser <martin@kaiser.cx>
Fri, 26 Nov 2021 13:03:57 +0000 (14:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Dec 2021 14:12:07 +0000 (15:12 +0100)
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.

Reviewed-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211126130400.26151-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/include/usb_osintf.h
drivers/staging/r8188eu/os_dep/os_intfs.c
drivers/staging/r8188eu/os_dep/usb_intf.c

index 624298b..3e777ca 100644 (file)
@@ -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);
index 5a5f182..397981b 100644 (file)
@@ -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);
index ecd1167..6e08cca 100644 (file)
@@ -297,7 +297,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;
        }