From ad60073d21b119d2c965476c74bcf302513b7bb8 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 25 Feb 2015 22:07:13 -0600 Subject: [PATCH] rtl8188eu: Remove CONFIG_USB_VENDOR_REQ_MUTEX This symbol is always defined. Signed-off-by: Larry Finger --- hal/usb_ops_linux.c | 5 ----- include/autoconf.h | 1 - include/drv_conf.h | 13 ------------- include/drv_types.h | 2 -- include/usb_ops_linux.h | 2 +- os_dep/usb_intf.c | 5 ----- 6 files changed, 1 insertion(+), 27 deletions(-) diff --git a/hal/usb_ops_linux.c b/hal/usb_ops_linux.c index d04e5e3..955348e 100755 --- a/hal/usb_ops_linux.c +++ b/hal/usb_ops_linux.c @@ -59,10 +59,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u goto exit; } - #ifdef CONFIG_USB_VENDOR_REQ_MUTEX _enter_critical_mutex(&pdvobjpriv->usb_vendor_req_mutex, NULL); - #endif - /* Acquire IO memory for vendorreq */ #ifdef CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC @@ -159,9 +156,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u #endif release_mutex: - #ifdef CONFIG_USB_VENDOR_REQ_MUTEX _exit_critical_mutex(&pdvobjpriv->usb_vendor_req_mutex, NULL); - #endif exit: return status; diff --git a/include/autoconf.h b/include/autoconf.h index fafcff9..8429a25 100755 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -105,7 +105,6 @@ */ #define CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC -#define CONFIG_USB_VENDOR_REQ_MUTEX #define CONFIG_VENDOR_REQ_RETRY /* diff --git a/include/drv_conf.h b/include/drv_conf.h index d8aa8c5..116970a 100755 --- a/include/drv_conf.h +++ b/include/drv_conf.h @@ -55,17 +55,4 @@ #endif #endif -//About USB VENDOR REQ -#if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX) - #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC automatically" - #define CONFIG_USB_VENDOR_REQ_MUTEX -#endif -#if defined(CONFIG_VENDOR_REQ_RETRY) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX) - #warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_VENDOR_REQ_RETRY automatically" - #define CONFIG_USB_VENDOR_REQ_MUTEX -#endif - - -//#include - #endif // __DRV_CONF_H__ diff --git a/include/drv_types.h b/include/drv_types.h index a25d22d..d99cc43 100755 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -274,9 +274,7 @@ struct dvobj_priv _sema usb_suspend_sema; -#ifdef CONFIG_USB_VENDOR_REQ_MUTEX _mutex usb_vendor_req_mutex; -#endif #ifdef CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC u8 * usb_alloc_vendor_req_buf; diff --git a/include/usb_ops_linux.h b/include/usb_ops_linux.h index d3a5507..b2dd4f0 100755 --- a/include/usb_ops_linux.h +++ b/include/usb_ops_linux.h @@ -25,7 +25,7 @@ #define RTW_USB_CONTROL_MSG_TIMEOUT_TEST 10//ms #define RTW_USB_CONTROL_MSG_TIMEOUT 500//ms -#if defined(CONFIG_VENDOR_REQ_RETRY) && defined(CONFIG_USB_VENDOR_REQ_MUTEX) +#if defined(CONFIG_VENDOR_REQ_RETRY) /* vendor req retry should be in the situation when each vendor req is atomically submitted from others */ #define MAX_USBCTRL_VENDORREQ_TIMES 10 #else diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index c8b7e16..2af16c9 100755 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -226,10 +226,7 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj) { u8 rst = _SUCCESS; - #ifdef CONFIG_USB_VENDOR_REQ_MUTEX _rtw_mutex_init(&dvobj->usb_vendor_req_mutex); - #endif - #ifdef CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC dvobj->usb_alloc_vendor_req_buf = rtw_zmalloc(MAX_USB_IO_CTL_SIZE); @@ -256,9 +253,7 @@ static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj) rtw_mfree(dvobj->usb_alloc_vendor_req_buf, MAX_USB_IO_CTL_SIZE); #endif - #ifdef CONFIG_USB_VENDOR_REQ_MUTEX _rtw_mutex_free(&dvobj->usb_vendor_req_mutex); - #endif return rst; }