diff options
author | Martin Kaiser <martin@kaiser.cx> | 2023-02-06 23:17:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-07 10:41:03 +0300 |
commit | 49c41602a37b5fcad1203270eb95541e773bba0b (patch) | |
tree | 6978e14fd143baee0f6b7f40bdff8eb44ba5d123 | |
parent | a0b3a1c269d32a0d96b50de4b2a301add847b3cf (diff) | |
download | linux-49c41602a37b5fcad1203270eb95541e773bba0b.tar.xz |
staging: r8188eu: remove intf_start pointer
Remove the intf_start pointer that points to a media-specific start
function (pci, usb, sdio, ...). The r8188eu driver supports only usb.
We could call usb_intf_start directly instead of going through the
function pointer. usb_intf_start is just a call to rtl8188eu_inirp_init so
we can directly replace the intf_start pointer with rtl8188eu_inirp_init.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230206201800.139195-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/r8188eu/include/drv_types.h | 1 | ||||
-rw-r--r-- | drivers/staging/r8188eu/os_dep/os_intfs.c | 6 | ||||
-rw-r--r-- | drivers/staging/r8188eu/os_dep/usb_intf.c | 6 |
3 files changed, 2 insertions, 11 deletions
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h index 7b170eed66b3..40f13f185895 100644 --- a/drivers/staging/r8188eu/include/drv_types.h +++ b/drivers/staging/r8188eu/include/drv_types.h @@ -171,7 +171,6 @@ struct adapter { s8 signal_strength; void *cmdThread; - void (*intf_start)(struct adapter *adapter); void (*intf_stop)(struct adapter *adapter); struct net_device *pnetdev; diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c index 4130e8fe2952..e48dbdfefedb 100644 --- a/drivers/staging/r8188eu/os_dep/os_intfs.c +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c @@ -631,8 +631,7 @@ static int _netdev_open(struct net_device *pnetdev) pr_info("can't init mlme_ext_priv\n"); goto netdev_open_error; } - if (padapter->intf_start) - padapter->intf_start(padapter); + rtl8188eu_inirp_init(padapter); rtw_led_control(padapter, LED_CTL_NO_LINK); @@ -684,8 +683,7 @@ static int ips_netdrv_open(struct adapter *padapter) if (status == _FAIL) goto netdev_open_error; - if (padapter->intf_start) - padapter->intf_start(padapter); + rtl8188eu_inirp_init(padapter); rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv); _set_timer(&padapter->mlmepriv.dynamic_chk_timer, 5000); diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c index 1f114b1fc4d5..ca9a7c0e5159 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -152,11 +152,6 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf) } -static void usb_intf_start(struct adapter *padapter) -{ - rtl8188eu_inirp_init(padapter); -} - static void usb_intf_stop(struct adapter *padapter) { /* cancel in irp */ @@ -313,7 +308,6 @@ static int rtw_usb_if1_init(struct dvobj_priv *dvobj, struct usb_interface *pusb SET_NETDEV_DEV(pnetdev, dvobj_to_dev(dvobj)); padapter = rtw_netdev_priv(pnetdev); - padapter->intf_start = &usb_intf_start; padapter->intf_stop = &usb_intf_stop; /* step read_chip_version */ |