From: Jes Sorensen Date: Tue, 15 Apr 2014 17:44:37 +0000 (+0200) Subject: staging: rtl8188eu: usb_intf.c: No point processing an empty table X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b809fc44c6220d5dd33796022d28f4c4fc461485;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: rtl8188eu: usb_intf.c: No point processing an empty table In addition, this would globally disable HT if one device in the system would mark it unsupported. If any device ended up requiring this, it should be handled on a per-instance basis. Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 2e49cd583212..49a4ce44ada6 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -62,10 +62,6 @@ static struct usb_device_id rtw_usb_id_tbl[] = { MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl); -static struct specific_device_id specific_device_id_tbl[] = { - {} /* empty table for now */ -}; - struct rtw_usb_drv { struct usb_driver usbdrv; int drv_registered; @@ -360,28 +356,6 @@ static void rtw_dev_unload(struct adapter *padapter) RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-rtw_dev_unload\n")); } -static void process_spec_devid(const struct usb_device_id *pdid) -{ - u16 vid, pid; - u32 flags; - int i; - int num = sizeof(specific_device_id_tbl) / - sizeof(struct specific_device_id); - - for (i = 0; i < num; i++) { - vid = specific_device_id_tbl[i].idVendor; - pid = specific_device_id_tbl[i].idProduct; - flags = specific_device_id_tbl[i].flags; - - if ((pdid->idVendor == vid) && (pdid->idProduct == pid) && - (flags&SPEC_DEV_ID_DISABLE_HT)) { - rtw_ht_enable = 0; - rtw_cbw40_enable = 0; - rtw_ampdu_enable = 0; - } - } -} - int rtw_hw_suspend(struct adapter *padapter) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; @@ -781,9 +755,6 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_drv_init\n")); - /* step 0. */ - process_spec_devid(pdid); - /* Initialize dvobj_priv */ dvobj = usb_dvobj_init(pusb_intf); if (dvobj == NULL) {