From: Arnd Bergmann <arnd@arndb.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Rachel Kim <rachel.kim@atmel.com>, Dean Lee <dean.lee@atmel.com>,
Chris Park <chris.park@atmel.com>,
devel@driverdev.osuosl.org, nicolas.ferre@atmel.com,
Johnny Kim <johnny.kim@atmel.com>,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 11/16] staging: wilc1000: clean up timer feature
Date: Fri, 29 May 2015 22:52:22 +0200 [thread overview]
Message-ID: <1432932747-3739705-12-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1432932747-3739705-1-git-send-email-arnd@arndb.de>
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>
---
drivers/staging/wilc1000/wilc_osconfig.h | 2 --
drivers/staging/wilc1000/wilc_oswrapper.h | 2 --
drivers/staging/wilc1000/wilc_platform.h | 4 ----
drivers/staging/wilc1000/wilc_timer.c | 6 ------
drivers/staging/wilc1000/wilc_timer.h | 27 ---------------------------
5 files changed, 41 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_osconfig.h b/drivers/staging/wilc1000/wilc_osconfig.h
index 6da42c837928..639160d1fa4e 100644
--- a/drivers/staging/wilc1000/wilc_osconfig.h
+++ b/drivers/staging/wilc1000/wilc_osconfig.h
@@ -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 */
diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h
index 2af32fff84aa..be6393cba8c2 100644
--- a/drivers/staging/wilc1000/wilc_oswrapper.h
+++ b/drivers/staging/wilc1000/wilc_oswrapper.h
@@ -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"
diff --git a/drivers/staging/wilc1000/wilc_platform.h b/drivers/staging/wilc1000/wilc_platform.h
index 2c66c3f3a2c5..d3f8fc6f2971 100644
--- a/drivers/staging/wilc1000/wilc_platform.h
+++ b/drivers/staging/wilc1000/wilc_platform.h
@@ -23,10 +23,6 @@
#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
diff --git a/drivers/staging/wilc1000/wilc_timer.c b/drivers/staging/wilc1000/wilc_timer.c
index 477986dcff0a..7d2e6f19c00b 100644
--- a/drivers/staging/wilc1000/wilc_timer.c
+++ b/drivers/staging/wilc1000/wilc_timer.c
@@ -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
diff --git a/drivers/staging/wilc1000/wilc_timer.h b/drivers/staging/wilc1000/wilc_timer.h
index 1080ce24a045..41c6784ab8e1 100644
--- a/drivers/staging/wilc1000/wilc_timer.h
+++ b/drivers/staging/wilc1000/wilc_timer.h
@@ -10,10 +10,6 @@
* @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,34 +20,11 @@ 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
* in the future.
--
2.1.0.rc2
next prev parent reply other threads:[~2015-05-29 20:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 20:52 [PATCH 00/16] wilc1000: dead code removal and other cleanup Arnd Bergmann
2015-05-29 20:52 ` [PATCH 01/16] staging: wilc1000: remove linux version checks Arnd Bergmann
2015-05-29 20:52 ` [PATCH 02/16] staging: wilc1000: remove platform " Arnd Bergmann
2015-05-29 20:52 ` [PATCH 03/16] staging: wilc1000: remove thread wrapper Arnd Bergmann
2015-05-29 20:52 ` [PATCH 04/16] staging: wilc1000: remove __DRIVER_VERSION__ macro Arnd Bergmann
2015-05-29 20:52 ` [PATCH 05/16] staging: wilc1000: remove time wrapper Arnd Bergmann
2015-05-30 6:39 ` Sudip Mukherjee
2015-05-30 23:58 ` Greg KH
2015-06-01 19:09 ` Arnd Bergmann
2015-05-29 20:52 ` [PATCH 06/16] staging: wilc1000: remove unused string functions Arnd Bergmann
2015-05-29 20:52 ` [PATCH 07/16] staging: wilc1000: simplify msgqueue code Arnd Bergmann
2015-05-29 20:52 ` [PATCH 08/16] staging: wilc1000: remove unused memory handling code Arnd Bergmann
2015-05-29 20:52 ` [PATCH 09/16] staging: wilc1000: simplify semaphore wrapper Arnd Bergmann
2015-05-29 20:52 ` [PATCH 10/16] staging: wilc1000: clean up sleep wrapper Arnd Bergmann
2015-05-29 20:52 ` Arnd Bergmann [this message]
2015-05-29 20:52 ` [PATCH 12/16] staging: wilc1000: remove unused OS abstraction features Arnd Bergmann
2015-05-29 20:52 ` [PATCH 13/16] staging: wilc1000: remove EXPORT_SYMTAB Arnd Bergmann
2015-05-29 20:52 ` [PATCH 14/16] staging: wilc1000: remove semaphore wrapper Arnd Bergmann
2015-05-30 6:46 ` Sudip Mukherjee
2015-05-29 20:52 ` [PATCH 15/16] staging: wilc1000: fix const cast warnings Arnd Bergmann
2015-05-29 20:52 ` [PATCH 16/16] staging: wilc1000: fix compiler warnings Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432932747-3739705-12-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=chris.park@atmel.com \
--cc=dean.lee@atmel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=johnny.kim@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=rachel.kim@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®