mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
staging: r8188eu: remove the global DriverState
DriverState in struct adapter is never set. It remains 0 (DRIVER_NORMAL) all the time, DriverState != DRIVER_DISAPPEAR is always true. Both DriverState and the check can be removed. enum driver_state contains the possible values of DriverState. This enum can be removed as well. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220206161809.423031-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3c4b62e381
commit
de424be4e9
@@ -159,15 +159,7 @@ static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
||||
return &dvobj->pusbintf->dev;
|
||||
};
|
||||
|
||||
enum driver_state {
|
||||
DRIVER_NORMAL = 0,
|
||||
DRIVER_DISAPPEAR = 1,
|
||||
DRIVER_REPLACE_DONGLE = 2,
|
||||
};
|
||||
|
||||
struct adapter {
|
||||
int DriverState;/* for disable driver using module, use dongle toi
|
||||
* replace module. */
|
||||
int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
|
||||
int bDongle;/* build-in module or external dongle */
|
||||
|
||||
|
||||
@@ -454,11 +454,9 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
|
||||
|
||||
free_mlme_ap_info(if1);
|
||||
|
||||
if (if1->DriverState != DRIVER_DISAPPEAR) {
|
||||
if (pnetdev) {
|
||||
/* will call netdev_close() */
|
||||
unregister_netdev(pnetdev);
|
||||
}
|
||||
if (pnetdev) {
|
||||
/* will call netdev_close() */
|
||||
unregister_netdev(pnetdev);
|
||||
}
|
||||
rtw_cancel_all_timer(if1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user