linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH v2 06/12] staging: wilc1000: clean up sleep wrapper
Date: Mon,  1 Jun 2015 21:06:39 +0200	[thread overview]
Message-ID: <1433185605-2492600-7-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1433185605-2492600-1-git-send-email-arnd@arndb.de>

The driver has a simple wrapper around msleep, as well as
a more advanced sleep function that is unused. This removes
the unused code and the options to turn the feature on or
off.

A follow-up should rework the code to use msleep directly.

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  |  6 ------
 drivers/staging/wilc1000/wilc_sleep.c     | 10 ----------
 drivers/staging/wilc1000/wilc_sleep.h     | 30 +-----------------------------
 5 files changed, 1 insertion(+), 49 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_osconfig.h b/drivers/staging/wilc1000/wilc_osconfig.h
index d0bf08f89906..6da42c837928 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_SLEEP_FEATURE 1
-#define CONFIG_WILC_SLEEP_HI_RES 1
 #define CONFIG_WILC_TIMER_FEATURE 1
 /* #define CONFIG_WILC_TIMER_PERIODIC 1 */
 /* #define CONFIG_WILC_ASSERTION_SUPPORT 1 */
diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h
index 32fe48a6034b..2af32fff84aa 100644
--- a/drivers/staging/wilc1000/wilc_oswrapper.h
+++ b/drivers/staging/wilc1000/wilc_oswrapper.h
@@ -58,9 +58,7 @@ typedef WILC_Uint16 WILC_WideChar;
 #include "wilc_semaphore.h"
 
 /* Sleep support */
-#ifdef CONFIG_WILC_SLEEP_FEATURE
 #include "wilc_sleep.h"
-#endif
 
 /* Timer support */
 #ifdef CONFIG_WILC_TIMER_FEATURE
diff --git a/drivers/staging/wilc1000/wilc_platform.h b/drivers/staging/wilc1000/wilc_platform.h
index 36e2e707354b..2c66c3f3a2c5 100644
--- a/drivers/staging/wilc1000/wilc_platform.h
+++ b/drivers/staging/wilc1000/wilc_platform.h
@@ -22,12 +22,6 @@
  * #error This feature is not supported by this OS
  #endif*/
 
-/* CONFIG_WILC_SLEEP_FEATURE is implemented */
-
-/* remove the following block when implementing its feature */
-/* #ifdef CONFIG_WILC_SLEEP_HI_RES */
-/* #error This feature is not supported by this OS */
-/* #endif */
 
 /* CONFIG_WILC_TIMER_FEATURE is implemented */
 
diff --git a/drivers/staging/wilc1000/wilc_sleep.c b/drivers/staging/wilc1000/wilc_sleep.c
index b8f45146956b..98a079f3d6c9 100644
--- a/drivers/staging/wilc1000/wilc_sleep.c
+++ b/drivers/staging/wilc1000/wilc_sleep.c
@@ -1,8 +1,6 @@
 
 #include "wilc_oswrapper.h"
 
-#ifdef CONFIG_WILC_SLEEP_FEATURE
-
 /*
  *  @author	mdaftedar
  *  @date	10 Aug 2010
@@ -18,11 +16,3 @@ void WILC_Sleep(WILC_Uint32 u32TimeMilliSec)
 	}
 
 }
-#endif
-
-/* #ifdef CONFIG_WILC_SLEEP_HI_RES */
-void WILC_SleepMicrosec(WILC_Uint32 u32TimeMicoSec)
-{
-	usleep_range(u32TimeMicoSec, u32TimeMicoSec);
-}
-/* #endif */
diff --git a/drivers/staging/wilc1000/wilc_sleep.h b/drivers/staging/wilc1000/wilc_sleep.h
index d640fb553aca..2865c8e44346 100644
--- a/drivers/staging/wilc1000/wilc_sleep.h
+++ b/drivers/staging/wilc1000/wilc_sleep.h
@@ -2,19 +2,6 @@
 #define __WILC_SLEEP_H__
 
 /*!
- *  @file		wilc_sleep.h
- *  @brief		Sleep OS Wrapper functionality
- *  @author		syounan
- *  @sa			wilc_oswrapper.h top level OS wrapper file
- *  @date		10 Aug 2010
- *  @version		1.0
- */
-
-#ifndef CONFIG_WILC_SLEEP_FEATURE
-#error the feature WILC_OS_FEATURE_SLEEP must be supported to include this file
-#endif
-
-/*!
  *  @brief	forces the current thread to sleep until the given time has elapsed
  *  @param[in]	u32TimeMilliSec Time to sleep in Milli seconds
  *  @sa		WILC_SleepMicrosec
@@ -24,22 +11,7 @@
  *  @note	This function offers a relatively innacurate and low resolution
  *              sleep, for accurate high resolution sleep use u32TimeMicoSec
  */
+/* TODO: remove and open-code in callers */
 void WILC_Sleep(WILC_Uint32 u32TimeMilliSec);
 
-#ifdef CONFIG_WILC_SLEEP_HI_RES
-/*!
- *  @brief	forces the current thread to sleep until the given time has elapsed
- *  @param[in]	u32TimeMicoSec Time to sleep in Micro seconds
- *  @sa		WILC_Sleep
- *  @author	syounan
- *  @date	10 Aug 2010
- *  @version	1.0
- *  @note	This function offers an acurare high resolution sleep, depends on
- *              the feature WILC_OS_FEATURE_SLEEP_HI_RES and may not be supported
- *              on all Operating Systems
- */
-void WILC_SleepMicrosec(WILC_Uint32 u32TimeMicoSec);
-#endif
-
-
 #endif
-- 
2.1.0.rc2


  parent reply	other threads:[~2015-06-01 19:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 19:06 [PATCH v3 00/12] wilc1000: dead code removal and other cleanup Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 01/12] staging: wilc1000: remove time wrapper Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 02/12] staging: wilc1000: remove unused string functions Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 03/12] staging: wilc1000: simplify msgqueue code Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 04/12] staging: wilc1000: remove unused memory handling code Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 05/12] staging: wilc1000: simplify semaphore wrapper Arnd Bergmann
2015-06-01 19:06 ` Arnd Bergmann [this message]
2015-06-01 19:06 ` [PATCH v2 07/12] staging: wilc1000: clean up timer feature Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 08/12] staging: wilc1000: remove unused OS abstraction features Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 09/12] staging: wilc1000: remove EXPORT_SYMTAB Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 10/12] staging: wilc1000: remove semaphore wrapper Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 11/12] staging: wilc1000: fix const cast warnings Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 12/12] staging: wilc1000: fix compiler warnings Arnd Bergmann
2015-06-02  4:53 ` [PATCH v3 00/12] wilc1000: dead code removal and other cleanup Greg KH
2015-06-02  5:20   ` Greg KH
2015-06-02  6:23     ` Johnny Kim

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=1433185605-2492600-7-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 \
    --cc=sudipm.mukherjee@gmail.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;
as well as URLs for NNTP newsgroup(s).