]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: wilc1000: clean up timer feature
authorArnd Bergmann <arnd@arndb.de>
Mon, 1 Jun 2015 19:06:40 +0000 (21:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jun 2015 04:45:22 +0000 (13:45 +0900)
The driver has a simple wrapper around timer_list, and an
optional but unused feature to make the timer periodic.

This removes support for the periodic timer and simplifies
the code around timers.

A follow-up should replace the remaining wrapper with
open-coded timers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_osconfig.h
drivers/staging/wilc1000/wilc_oswrapper.h
drivers/staging/wilc1000/wilc_platform.h
drivers/staging/wilc1000/wilc_timer.c
drivers/staging/wilc1000/wilc_timer.h

index 6da42c83792856db1362d054b9593d515c0ba471..639160d1fa4ecb4033726977c07a9ab5827f7742 100644 (file)
@@ -11,8 +11,6 @@
 /* OS features supported */
 
 /* #define CONFIG_WILC_SEMAPHORE_TIMEOUT 1 */
-#define CONFIG_WILC_TIMER_FEATURE 1
-/* #define CONFIG_WILC_TIMER_PERIODIC 1 */
 /* #define CONFIG_WILC_ASSERTION_SUPPORT 1 */
 /* #define CONFIG_WILC_FILE_OPERATIONS_FEATURE */
 /* #define CONFIG_WILC_FILE_OPERATIONS_STRING_API */
index 2af32fff84aaee324039614482442df81d792a11..be6393cba8c29c689f50a06b9088ec480dbb4123 100644 (file)
@@ -61,9 +61,7 @@ typedef WILC_Uint16 WILC_WideChar;
 #include "wilc_sleep.h"
 
 /* Timer support */
-#ifdef CONFIG_WILC_TIMER_FEATURE
 #include "wilc_timer.h"
-#endif
 
 /* Memory support */
 #include "wilc_memory.h"
index 2c66c3f3a2c5789126ca7b1cd0a914ed62dbd8c3..d3f8fc6f2971a24985bbe2bdcfe1555a1d827fca 100644 (file)
  #endif*/
 
 
-/* CONFIG_WILC_TIMER_FEATURE is implemented */
-
-/* CONFIG_WILC_TIMER_PERIODIC is implemented */
-
 /* remove the following block when implementing its feature */
 #ifdef CONFIG_WILC_ASSERTION_SUPPORT
 #error This feature is not supported by this OS
index 477986dcff0afb8cb104baeba0338da1eaf6afa0..7d2e6f19c00b2d4421709d3f1561576f30d10883 100644 (file)
@@ -1,10 +1,6 @@
 
 #include "wilc_oswrapper.h"
 
-#ifdef CONFIG_WILC_TIMER_FEATURE
-
-
-
 WILC_ErrNo WILC_TimerCreate(WILC_TimerHandle *pHandle,
        tpfWILC_TimerFunction pfCallback, tstrWILC_TimerAttrs *pstrAttrs)
 {
@@ -47,5 +43,3 @@ WILC_ErrNo WILC_TimerStop(WILC_TimerHandle *pHandle,
 
        return s32RetStatus;
 }
-
-#endif
index 1080ce24a045e6e12706fffe8ec5bb2b1fd49c49..41c6784ab8e18f51cb66ff645df95f8667141af1 100644 (file)
  *  @version   1.0
  */
 
-#ifndef CONFIG_WILC_TIMER_FEATURE
-#error the feature CONFIG_WILC_TIMER_FEATURE must be supported to include this file
-#endif
-
 typedef void (*tpfWILC_TimerFunction)(void *);
 
 /*!
@@ -24,33 +20,10 @@ typedef void (*tpfWILC_TimerFunction)(void *);
  *  @version           1.0
  */
 typedef struct {
-       /*!< if set to WILC_TRUE the callback function will be called
-        * periodically. */
-       #ifdef CONFIG_WILC_TIMER_PERIODIC
-       WILC_Bool bPeriodicTimer;
-       #endif
-
        /* a dummy member to avoid compiler errors*/
        WILC_Uint8 dummy;
 } tstrWILC_TimerAttrs;
 
-/*!
- *  @brief     Fills the WILC_TimerAttrs with default parameters
- *  @param[out]        pstrAttrs structure to be filled
- *  @sa                WILC_TimerAttrs
- *  @author    syounan
- *  @date      16 Aug 2010
- *  @version   1.0
- */
-
-static void WILC_TimerFillDefault(tstrWILC_TimerAttrs *pstrAttrs)
-{
-       #ifdef CONFIG_WILC_TIMER_PERIODIC
-       pstrAttrs->bPeriodicTimer = WILC_FALSE;
-       #endif
-}
-
-
 /*!
  *  @brief     Creates a new timer
  *  @details   Timers are a useful utility to execute some callback function