staging: vt6655: remove typedef void *TimerFunction
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 29 Oct 2014 17:56:02 +0000 (17:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 20:34:47 +0000 (13:34 -0700)
Covert functions TimerSQ3CallBack and TimerState1CallBack to
the correct type for struct timer_list.function to remove
the cast altogether.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/baseband.c
drivers/staging/vt6655/baseband.h
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/wmgr.h

index ed7850558c96a449a900c55a4dbe775b3ee6678d..b04dfd945d412dea75addfeaf8a81a441c39ff41 100644 (file)
@@ -2781,10 +2781,10 @@ void BBvAntennaDiversity(struct vnt_private *pDevice,
 
 void
 TimerSQ3CallBack(
-       void *hDeviceContext
+       unsigned long data
 )
 {
-       struct vnt_private *pDevice = hDeviceContext;
+       struct vnt_private *pDevice = (struct vnt_private *)data;
        unsigned long flags;
 
        pr_debug("TimerSQ3CallBack...\n");
@@ -2827,10 +2827,10 @@ TimerSQ3CallBack(
 
 void
 TimerState1CallBack(
-       void *hDeviceContext
+       unsigned long data
 )
 {
-       struct vnt_private *pDevice = hDeviceContext;
+       struct vnt_private *pDevice = (struct vnt_private *)data;
        unsigned long flags;
 
        pr_debug("TimerState1CallBack...\n");
index 2d7a3e236fd6781fa61049e9364a6b17b0e59aca..772ea0df84e27a58674701c1e82de0e409494f70 100644 (file)
@@ -103,12 +103,12 @@ void BBvExitDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID);
 
 void
 TimerSQ3CallBack(
-       void *hDeviceContext
+       unsigned long
 );
 
 void
 TimerState1CallBack(
-       void *hDeviceContext
+       unsigned long
 );
 
 void BBvAntennaDiversity(struct vnt_private *pDevice,
index 7892f861521e9ba61ae8f07619182af21339171b..5c91c2ff149193b961f2e57c72b62a4e8cd59a96 100644 (file)
@@ -625,17 +625,17 @@ static void device_init_diversity_timer(struct vnt_private *pDevice)
 {
        init_timer(&pDevice->TimerSQ3Tmax1);
        pDevice->TimerSQ3Tmax1.data = (unsigned long) pDevice;
-       pDevice->TimerSQ3Tmax1.function = (TimerFunction)TimerSQ3CallBack;
+       pDevice->TimerSQ3Tmax1.function = TimerSQ3CallBack;
        pDevice->TimerSQ3Tmax1.expires = RUN_AT(HZ);
 
        init_timer(&pDevice->TimerSQ3Tmax2);
        pDevice->TimerSQ3Tmax2.data = (unsigned long) pDevice;
-       pDevice->TimerSQ3Tmax2.function = (TimerFunction)TimerSQ3CallBack;
+       pDevice->TimerSQ3Tmax2.function = TimerSQ3CallBack;
        pDevice->TimerSQ3Tmax2.expires = RUN_AT(HZ);
 
        init_timer(&pDevice->TimerSQ3Tmax3);
        pDevice->TimerSQ3Tmax3.data = (unsigned long) pDevice;
-       pDevice->TimerSQ3Tmax3.function = (TimerFunction)TimerState1CallBack;
+       pDevice->TimerSQ3Tmax3.function = TimerState1CallBack;
        pDevice->TimerSQ3Tmax3.expires = RUN_AT(HZ);
 }
 
index 8f9748bf569d4cc3189d67d62bbef5cc00748102..74f1f16b915e4020a9bafd049646a8d9592e59ee 100644 (file)
@@ -72,6 +72,5 @@
 
 /*---------------------  Export Types  ------------------------------*/
 #define timer_expire(timer, next_tick)   mod_timer(&timer, RUN_AT(next_tick))
-typedef void (*TimerFunction)(unsigned long);
 
 #endif // __WMGR_H__