From: James A Shackleford Date: Wed, 9 Jul 2014 19:10:45 +0000 (-0400) Subject: staging: rtl8712: remove wrapper function _init_workitem() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9f952489fd05b376f4f1e2518dac20b996f8f096;p=linux-beck.git staging: rtl8712: remove wrapper function _init_workitem() The inline function _init_workitem() is just a wrapper around INIT_WORK(). Oddly, this wrapper accepts 3 parameters while INIT_WORK() only accepts 2. The third parameter is unused. Signed-off-by: James A Shackleford Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h index 67c53d569be6..2cf9a0200141 100644 --- a/drivers/staging/rtl8712/osdep_service.h +++ b/drivers/staging/rtl8712/osdep_service.h @@ -81,11 +81,6 @@ static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled) *bcancelled = true; /*true ==1; false==0*/ } -static inline void _init_workitem(_workitem *pwork, void *pfunc, void *cntx) -{ - INIT_WORK(pwork, pfunc); -} - static inline void _set_workitem(_workitem *pwork) { schedule_work(pwork); diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c index 6cb1a0af5177..a84ae2f27497 100644 --- a/drivers/staging/rtl8712/rtl8712_led.c +++ b/drivers/staging/rtl8712/rtl8712_led.c @@ -98,7 +98,7 @@ static void InitLed871x(struct _adapter *padapter, struct LED_871x *pLed, pLed->BlinkTimes = 0; pLed->BlinkingLedState = LED_UNKNOWN; _init_timer(&(pLed->BlinkTimer), nic, BlinkTimerCallback, pLed); - _init_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed); + INIT_WORK(&pLed->BlinkWorkItem, BlinkWorkItemCallback); } /* diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.c b/drivers/staging/rtl8712/rtl871x_pwrctrl.c index 9fd2ec7596cc..6cf051fcb382 100644 --- a/drivers/staging/rtl8712/rtl871x_pwrctrl.c +++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.c @@ -184,10 +184,8 @@ void r8712_init_pwrctrl_priv(struct _adapter *padapter) pwrctrlpriv->tog = 0x80; /* clear RPWM to ensure driver and fw back to initial state. */ r8712_write8(padapter, 0x1025FE58, 0); - _init_workitem(&(pwrctrlpriv->SetPSModeWorkItem), - SetPSModeWorkItemCallback, padapter); - _init_workitem(&(pwrctrlpriv->rpwm_workitem), - rpwm_workitem_callback, padapter); + INIT_WORK(&pwrctrlpriv->SetPSModeWorkItem, SetPSModeWorkItemCallback); + INIT_WORK(&pwrctrlpriv->rpwm_workitem, rpwm_workitem_callback); _init_timer(&(pwrctrlpriv->rpwm_check_timer), padapter->pnetdev, rpwm_check_handler, (u8 *)padapter); } diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c index a104b7722815..b985edc158b9 100644 --- a/drivers/staging/rtl8712/rtl871x_xmit.c +++ b/drivers/staging/rtl8712/rtl871x_xmit.c @@ -148,7 +148,7 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv, pxmitbuf++; } pxmitpriv->free_xmitbuf_cnt = NR_XMITBUFF; - _init_workitem(&padapter->wkFilterRxFF0, r8712_SetFilter, padapter); + INIT_WORK(&padapter->wkFilterRxFF0, r8712_SetFilter); alloc_hwxmits(padapter); init_hwxmits(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry); tasklet_init(&pxmitpriv->xmit_tasklet,