Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754081AbbFATJi (ORCPT ); Mon, 1 Jun 2015 15:09:38 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:57349 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753687AbbFATIc (ORCPT ); Mon, 1 Jun 2015 15:08:32 -0400 From: Arnd Bergmann To: Greg KH Cc: Rachel Kim , Dean Lee , Chris Park , devel@driverdev.osuosl.org, nicolas.ferre@atmel.com, Johnny Kim , linux-kernel@vger.kernel.org, Sudip Mukherjee , Arnd Bergmann Subject: [PATCH v2 07/12] staging: wilc1000: clean up timer feature Date: Mon, 1 Jun 2015 21:06:40 +0200 Message-Id: <1433185605-2492600-8-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.1.0.rc2 In-Reply-To: <1433185605-2492600-1-git-send-email-arnd@arndb.de> References: <1433185605-2492600-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:QBBD4/hiJ+v/DO+adh13TSv0arY0SMMDYQLXYHqIv29SFgmd7UK 6TTmDtWSWl1PLGk8o4lJ7LILH2JXEUfDYzCB6OZufOzKPPNUBB2GXF7Mi+y4LienlwP8ZjW t8VbDBjHri/hgn4fmpBwPTIzlIfDoZ3Q7TvlxKLiBGOeHJDTIjr4SSHTTaRBkOooIIIJ4om xYctWRm6i5H6D3aafD1yw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4310 Lines: 139 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/