diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2014-05-16 10:04:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-16 11:34:33 -0700 |
commit | 596f85adaac5259b2019d41a0e34292efe8df511 (patch) | |
tree | 12395fe25db19650508f27d28e833d844626b79e /drivers | |
parent | c174eae6f71bf3da736460e7872cdfc23c854fbc (diff) |
staging: rtl8723au: Call usb_intf_{start,stop} directly
Rip out multiple layer of useless wrappers
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8723au/include/drv_types.h | 3 | ||||
-rw-r--r-- | drivers/staging/rtl8723au/include/osdep_intf.h | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8723au/include/usb_ops.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723au/os_dep/os_intfs.c | 9 | ||||
-rw-r--r-- | drivers/staging/rtl8723au/os_dep/usb_intf.c | 15 |
5 files changed, 9 insertions, 24 deletions
diff --git a/drivers/staging/rtl8723au/include/drv_types.h b/drivers/staging/rtl8723au/include/drv_types.h index b652754efb2..6724c58b1ed 100644 --- a/drivers/staging/rtl8723au/include/drv_types.h +++ b/drivers/staging/rtl8723au/include/drv_types.h @@ -251,9 +251,6 @@ struct rtw_adapter { u8 init_adpt_in_progress; u8 bHaltInProgress; - void (*intf_start)(struct rtw_adapter *adapter); - void (*intf_stop)(struct rtw_adapter *adapter); - struct net_device *pnetdev; /* used by rtw_rereg_nd_name related function */ diff --git a/drivers/staging/rtl8723au/include/osdep_intf.h b/drivers/staging/rtl8723au/include/osdep_intf.h index 9e77156d51d..33afa62f31b 100644 --- a/drivers/staging/rtl8723au/include/osdep_intf.h +++ b/drivers/staging/rtl8723au/include/osdep_intf.h @@ -41,4 +41,8 @@ void rtw_ips_pwr_down23a(struct rtw_adapter *padapter); int rtw_drv_register_netdev(struct rtw_adapter *padapter); void rtw_ndev_destructor(struct net_device *ndev); +int rtl8723au_inirp_init(struct rtw_adapter *Adapter); +int rtl8723au_inirp_deinit(struct rtw_adapter *Adapter); +void rtl8723a_usb_intf_stop(struct rtw_adapter *padapter); + #endif /* _OSDEP_INTF_H_ */ diff --git a/drivers/staging/rtl8723au/include/usb_ops.h b/drivers/staging/rtl8723au/include/usb_ops.h index 58878dc36e7..a5fd432be91 100644 --- a/drivers/staging/rtl8723au/include/usb_ops.h +++ b/drivers/staging/rtl8723au/include/usb_ops.h @@ -91,8 +91,6 @@ static inline u8 rtw_usb_bulk_size_boundary(struct rtw_adapter *padapter, return rst; } -int rtl8723au_inirp_init(struct rtw_adapter *Adapter); -int rtl8723au_inirp_deinit(struct rtw_adapter *Adapter); void rtl8723au_chip_configure(struct rtw_adapter *padapter); #endif /* __USB_OPS_H_ */ diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c index 590028322c4..9161e5cda9a 100644 --- a/drivers/staging/rtl8723au/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c @@ -693,8 +693,7 @@ int netdev_open23a(struct net_device *pnetdev) goto netdev_open23a_error; } - if (padapter->intf_start) - padapter->intf_start(padapter); + rtl8723au_inirp_init(padapter); rtw_cfg80211_init_wiphy(padapter); @@ -756,8 +755,7 @@ static int ips_netdrv_open(struct rtw_adapter *padapter) goto netdev_open23a_error; } - if (padapter->intf_start) - padapter->intf_start(padapter); + rtl8723au_inirp_init(padapter); rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv); mod_timer(&padapter->mlmepriv.dynamic_chk_timer, @@ -811,8 +809,7 @@ void rtw_ips_dev_unload23a(struct rtw_adapter *padapter) { rtl8723a_fifo_cleanup(padapter); - if (padapter->intf_stop) - padapter->intf_stop(padapter); + rtl8723a_usb_intf_stop(padapter); /* s5. */ if (!padapter->bSurpriseRemoved) diff --git a/drivers/staging/rtl8723au/os_dep/usb_intf.c b/drivers/staging/rtl8723au/os_dep/usb_intf.c index 556b97659f7..38f2af3badb 100644 --- a/drivers/staging/rtl8723au/os_dep/usb_intf.c +++ b/drivers/staging/rtl8723au/os_dep/usb_intf.c @@ -275,14 +275,7 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf) usb_put_dev(interface_to_usbdev(usb_intf)); } -static void usb_intf_start(struct rtw_adapter *padapter) -{ - RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+usb_intf_start\n")); - rtl8723au_inirp_init(padapter); - RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-usb_intf_start\n")); -} - -static void usb_intf_stop(struct rtw_adapter *padapter) +void rtl8723a_usb_intf_stop(struct rtw_adapter *padapter) { RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+usb_intf_stop\n")); @@ -318,8 +311,7 @@ static void rtw_dev_unload(struct rtw_adapter *padapter) RTW_SCTX_DONE_DRV_STOP); /* s3. */ - if (padapter->intf_stop) - padapter->intf_stop(padapter); + rtl8723a_usb_intf_stop(padapter); /* s4. */ if (!padapter->pwrctrlpriv.bInternalAutoSuspend) @@ -609,9 +601,6 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, if (!padapter->HalData) goto free_wdev; - padapter->intf_start = &usb_intf_start; - padapter->intf_stop = &usb_intf_stop; - rtl8723au_set_intf_ops(padapter); /* step read_chip_version */ |