From d8af6fff833d6ba23bc7a01fec8a496a34043b91 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 25 Jul 2013 11:02:03 -0500 Subject: [PATCH] rtl8188eu: Convert typedef for _workitem to struct work_struct Signed-off-by: Larry Finger --- core/rtw_cmd.c | 4 ++-- include/osdep_service.h | 10 +++------- include/rtw_cmd.h | 2 +- include/rtw_led.h | 5 +---- include/rtw_pwrctrl.h | 2 +- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 1ab43c4..975aa50 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -81,7 +81,7 @@ _func_exit_; } -static void c2h_wk_callback(_workitem *work); +static void c2h_wk_callback(struct work_struct *work); sint _rtw_init_evt_priv(struct evt_priv *pevtpriv) { @@ -2258,7 +2258,7 @@ exit: return ret; } -static void c2h_wk_callback(_workitem *work) +static void c2h_wk_callback(struct work_struct *work) { struct evt_priv *evtpriv = container_of(work, struct evt_priv, c2h_wk); _adapter *adapter = container_of(evtpriv, _adapter, evtpriv); diff --git a/include/osdep_service.h b/include/osdep_service.h index 59d9e15..c9b3b88 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -76,10 +76,6 @@ #define thread_exit() complete_and_exit(NULL, 0) - typedef void timer_hdl_return; - typedef void* timer_hdl_context; - typedef struct work_struct _workitem; - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) #endif @@ -200,7 +196,7 @@ __inline static void _cancel_timer(struct timer_list *ptimer,u8 *bcancelled) #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl #define RTW_DECLARE_TIMER_HDL(name) void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS) -__inline static void _init_workitem(_workitem *pwork, void *pfunc, void * cntx) +__inline static void _init_workitem(struct work_struct *pwork, void *pfunc, void * cntx) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) INIT_WORK(pwork, pfunc); @@ -209,12 +205,12 @@ __inline static void _init_workitem(_workitem *pwork, void *pfunc, void * cntx) #endif } -__inline static void _set_workitem(_workitem *pwork) +__inline static void _set_workitem(struct work_struct *pwork) { schedule_work(pwork); } -__inline static void _cancel_workitem_sync(_workitem *pwork) +__inline static void _cancel_workitem_sync(struct work_struct *pwork) { #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,22)) cancel_work_sync(pwork); diff --git a/include/rtw_cmd.h b/include/rtw_cmd.h index 5444801..4166259 100644 --- a/include/rtw_cmd.h +++ b/include/rtw_cmd.h @@ -66,7 +66,7 @@ struct cmd_priv { }; struct evt_priv { - _workitem c2h_wk; + struct work_struct c2h_wk; bool c2h_wk_alive; struct rtw_cbuf *c2h_queue; #define C2H_QUEUE_MAX_LEN 10 diff --git a/include/rtw_led.h b/include/rtw_led.h index cd12bbc..c205cdb 100644 --- a/include/rtw_led.h +++ b/include/rtw_led.h @@ -125,10 +125,7 @@ struct LED_871x { u8 bLedLinkBlinkInProgress; u8 bLedStartToLinkBlinkInProgress; u8 bLedScanBlinkInProgress; - - #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) - _workitem BlinkWorkItem; // Workitem used by BlinkTimer to manipulate H/W to blink LED. - #endif + struct work_struct BlinkWorkItem; // Workitem used by BlinkTimer to manipulate H/W to blink LED. }; #define IS_LED_WPS_BLINKING(_LED_871x) (((struct LED_871x *)_LED_871x)->CurrLedState==LED_BLINK_WPS \ diff --git a/include/rtw_pwrctrl.h b/include/rtw_pwrctrl.h index 245f308..2a938ae 100644 --- a/include/rtw_pwrctrl.h +++ b/include/rtw_pwrctrl.h @@ -185,7 +185,7 @@ struct pwrctrl_priv u8 bcn_ant_mode; u32 alives; - _workitem cpwm_event; + struct work_struct cpwm_event; u8 bpower_saving; u8 b_hw_radio_off;