staging: r8188eu: chip_type is write-only
authorMartin Kaiser <martin@kaiser.cx>
Tue, 5 Oct 2021 20:08:19 +0000 (22:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Oct 2021 12:55:28 +0000 (14:55 +0200)
chip_type in struct adapter is never read. Remove the component
and the code to initialise it.

Acked-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211005200821.19783-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/usb_ops_linux.c
drivers/staging/r8188eu/include/drv_types.h
drivers/staging/r8188eu/include/hal_intf.h
drivers/staging/r8188eu/include/usb_ops.h
drivers/staging/r8188eu/os_dep/usb_intf.c

index 9544300fab6573ae741a47426638151fc6dca706..4c1974cc9a16620bdaefbff14d0f8676c57192c7 100644 (file)
@@ -558,9 +558,3 @@ void rtl8188eu_xmit_tasklet(unsigned long priv)
                        break;
        }
 }
-
-void rtl8188eu_set_hw_type(struct adapter *adapt)
-{
-       adapt->chip_type = RTL8188E;
-       DBG_88E("CHIP TYPE: RTL8188E\n");
-}
index 9fa561ad340ba642fcd0ba09c5d4edb2c6731cfe..9b9f7d89519cde5b6a540ad9abd329678bd2cdf6 100644 (file)
@@ -205,7 +205,6 @@ struct adapter {
                             * replace module. */
        int     pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
        int     bDongle;/* build-in module or external dongle */
-       u16     chip_type;
        u16     interface_type;/* USB,SDIO,SPI,PCI */
 
        struct dvobj_priv *dvobj;
index ee8e67dafe7c0c32744f6205e6ff1c8bbd513e68..89bd6f4b06e2d36c755616fb6683d9054730e193 100644 (file)
@@ -15,16 +15,6 @@ enum RTL871X_HCI_TYPE {
        RTW_GSPI        = BIT(3),
 };
 
-enum _CHIP_TYPE {
-       NULL_CHIP_TYPE,
-       RTL8712_8188S_8191S_8192S,
-       RTL8188C_8192C,
-       RTL8192D,
-       RTL8723A,
-       RTL8188E,
-       MAX_CHIP_TYPE
-};
-
 enum hw_variables {
        HW_VAR_MEDIA_STATUS,
        HW_VAR_MEDIA_STATUS1,
index 1939b781b097c8d5d128087fa9c33df9eca00632..0a1155bbc7b85a61aea04fabbab7ef52c96badcd 100644 (file)
@@ -19,9 +19,6 @@
 
 #include "usb_ops_linux.h"
 
-void rtl8188eu_set_hw_type(struct adapter *padapter);
-#define hal_set_hw_type rtl8188eu_set_hw_type
-
 /*
  * Increase and check if the continual_urb_error of this @param dvobjprivei
  * is larger than MAX_CONTINUAL_URB_ERR
index b5e0c6561108c61505cf9eefaf729a6f39e9b7b2..193b5faac56afeced1ed74f3afdc77ea034cbf0f 100644 (file)
@@ -172,12 +172,6 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)
 
 }
 
-static void chip_by_usb_id(struct adapter *padapter)
-{
-       padapter->chip_type = NULL_CHIP_TYPE;
-       hal_set_hw_type(padapter);
-}
-
 static void usb_intf_start(struct adapter *padapter)
 {
        rtl8188eu_inirp_init(padapter);
@@ -387,7 +381,6 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 
        /* step 1-1., decide the chip_type via vid/pid */
        padapter->interface_type = RTW_USB;
-       chip_by_usb_id(padapter);
 
        if (rtw_handle_dualmac(padapter, 1) != _SUCCESS)
                goto free_adapter;