Commit 2e59e40d authored by Gnanachandran Dhanapal's avatar Gnanachandran Dhanapal Committed by Greg Kroah-Hartman

Staging: rtl8192e: Timer setup using macro rather assignment

This patch shall replaces user defined timer setup function with
standard timer setup macro. Also removes init_timer, because timer can
be initialized in setup_timer macro as well.
Signed-off-by: default avatarGnanachandran Dhanapal <gdhanapa@visteon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 47eae6dd
...@@ -1252,12 +1252,10 @@ static short rtl8192_init(struct net_device *dev) ...@@ -1252,12 +1252,10 @@ static short rtl8192_init(struct net_device *dev)
init_hal_dm(dev); init_hal_dm(dev);
init_timer(&priv->watch_dog_timer);
setup_timer(&priv->watch_dog_timer, setup_timer(&priv->watch_dog_timer,
watch_dog_timer_callback, watch_dog_timer_callback,
(unsigned long) dev); (unsigned long) dev);
init_timer(&priv->gpio_polling_timer);
setup_timer(&priv->gpio_polling_timer, setup_timer(&priv->gpio_polling_timer,
check_rfctrl_gpio_timer, check_rfctrl_gpio_timer,
(unsigned long)dev); (unsigned long)dev);
......
...@@ -2179,7 +2179,6 @@ static void dm_init_fsync(struct net_device *dev) ...@@ -2179,7 +2179,6 @@ static void dm_init_fsync(struct net_device *dev)
priv->rtllib->fsync_state = Default_Fsync; priv->rtllib->fsync_state = Default_Fsync;
priv->framesyncMonitor = 1; priv->framesyncMonitor = 1;
init_timer(&priv->fsync_timer);
setup_timer(&priv->fsync_timer, dm_fsync_timer_callback, setup_timer(&priv->fsync_timer, dm_fsync_timer_callback,
(unsigned long) dev); (unsigned long) dev);
} }
......
...@@ -67,7 +67,6 @@ struct rx_ts_record { ...@@ -67,7 +67,6 @@ struct rx_ts_record {
u8 num; u8 num;
}; };
void _setup_timer(struct timer_list *, void *, unsigned long);
#endif #endif
...@@ -154,22 +154,22 @@ void TSInitialize(struct rtllib_device *ieee) ...@@ -154,22 +154,22 @@ void TSInitialize(struct rtllib_device *ieee)
for (count = 0; count < TOTAL_TS_NUM; count++) { for (count = 0; count < TOTAL_TS_NUM; count++) {
pTxTS->num = count; pTxTS->num = count;
_setup_timer(&pTxTS->TsCommonInfo.SetupTimer, setup_timer(&pTxTS->TsCommonInfo.SetupTimer,
TsSetupTimeOut, TsSetupTimeOut,
(unsigned long) pTxTS); (unsigned long) pTxTS);
_setup_timer(&pTxTS->TsCommonInfo.InactTimer, setup_timer(&pTxTS->TsCommonInfo.InactTimer,
TsInactTimeout, TsInactTimeout,
(unsigned long) pTxTS); (unsigned long) pTxTS);
_setup_timer(&pTxTS->TsAddBaTimer, setup_timer(&pTxTS->TsAddBaTimer,
TsAddBaProcess, TsAddBaProcess,
(unsigned long) pTxTS); (unsigned long) pTxTS);
_setup_timer(&pTxTS->TxPendingBARecord.Timer, setup_timer(&pTxTS->TxPendingBARecord.Timer,
BaSetupTimeOut, BaSetupTimeOut,
(unsigned long) pTxTS); (unsigned long) pTxTS);
_setup_timer(&pTxTS->TxAdmittedBARecord.Timer, setup_timer(&pTxTS->TxAdmittedBARecord.Timer,
TxBaInactTimeout, TxBaInactTimeout,
(unsigned long) pTxTS); (unsigned long) pTxTS);
...@@ -186,19 +186,19 @@ void TSInitialize(struct rtllib_device *ieee) ...@@ -186,19 +186,19 @@ void TSInitialize(struct rtllib_device *ieee)
pRxTS->num = count; pRxTS->num = count;
INIT_LIST_HEAD(&pRxTS->RxPendingPktList); INIT_LIST_HEAD(&pRxTS->RxPendingPktList);
_setup_timer(&pRxTS->TsCommonInfo.SetupTimer, setup_timer(&pRxTS->TsCommonInfo.SetupTimer,
TsSetupTimeOut, TsSetupTimeOut,
(unsigned long) pRxTS); (unsigned long) pRxTS);
_setup_timer(&pRxTS->TsCommonInfo.InactTimer, setup_timer(&pRxTS->TsCommonInfo.InactTimer,
TsInactTimeout, TsInactTimeout,
(unsigned long) pRxTS); (unsigned long) pRxTS);
_setup_timer(&pRxTS->RxAdmittedBARecord.Timer, setup_timer(&pRxTS->RxAdmittedBARecord.Timer,
RxBaInactTimeout, RxBaInactTimeout,
(unsigned long) pRxTS); (unsigned long) pRxTS);
_setup_timer(&pRxTS->RxPktPendingTimer, setup_timer(&pRxTS->RxPktPendingTimer,
RxPktPendingTimeout, RxPktPendingTimeout,
(unsigned long) pRxTS); (unsigned long) pRxTS);
......
...@@ -57,12 +57,6 @@ u32 rt_global_debug_component = COMP_ERR; ...@@ -57,12 +57,6 @@ u32 rt_global_debug_component = COMP_ERR;
EXPORT_SYMBOL(rt_global_debug_component); EXPORT_SYMBOL(rt_global_debug_component);
void _setup_timer(struct timer_list *ptimer, void *fun, unsigned long data)
{
ptimer->function = fun;
ptimer->data = data;
init_timer(ptimer);
}
static inline int rtllib_networks_allocate(struct rtllib_device *ieee) static inline int rtllib_networks_allocate(struct rtllib_device *ieee)
{ {
......
...@@ -3019,11 +3019,11 @@ void rtllib_softmac_init(struct rtllib_device *ieee) ...@@ -3019,11 +3019,11 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
ieee->tx_pending.txb = NULL; ieee->tx_pending.txb = NULL;
_setup_timer(&ieee->associate_timer, setup_timer(&ieee->associate_timer,
rtllib_associate_abort_cb, rtllib_associate_abort_cb,
(unsigned long) ieee); (unsigned long) ieee);
_setup_timer(&ieee->beacon_timer, setup_timer(&ieee->beacon_timer,
rtllib_send_beacon_cb, rtllib_send_beacon_cb,
(unsigned long) ieee); (unsigned long) ieee);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment