staging: wilc1000: move struct Message and WILC_MsgQueueHandle
PATCH 1/6 staging: wilc1000: move struct Message and WILC_MsgQueueHandle
This patch moves struct Message and WILC_MsgQueueHandle from wilc_platform.h to wilc_msgqueue.h because those two structures are used only at wilc_msgqueue.c so that it is good to be defined at wilc_msgqueue.h
--- drivers/staging/wilc1000/wilc_msgqueue.h | 15 +++++++++++++++ drivers/staging/wilc1000/wilc_platform.h | 14 -------------- 2 files changed, 15 insertions(+), 14 deletions(-)
drivers/staging/wilc1000/wilc_msgqueue.h +15 -0
@@ -12,6 +12,21 @@#include "wilc_platform.h" +/* Message Queue type is a structure */ +typedef struct __Message_struct { +void *pvBuffer; +u32 u32Length; +struct __Message_struct *pstrNext; +}Message ; + +typedef struct __MessageQueue_struct { +struct semaphore hSem; +spinlock_t strCriticalSection; +bool bExiting; +u32 u32ReceiversCount; +Message *pstrMessageList; +}WILC_MsgQueueHandle ; +/*! * @brief Creates a new Message queue * @details Creates a new Message queue, if the feature
drivers/staging/wilc1000/wilc_platform.h +0 -14
@@ -16,20 +16,6 @@* OS specific types *******************************************************************/ -/* Message Queue type is a structure */ -typedef struct __Message_struct { -void *pvBuffer; -u32 u32Length; -struct __Message_struct *pstrNext; -}Message ; - -typedef struct __MessageQueue_struct { -struct semaphore hSem; -spinlock_t strCriticalSection; -bool bExiting; -u32 u32ReceiversCount; -Message *pstrMessageList; -}WILC_MsgQueueHandle ;
Signature · 1 line
2.5.1
PATCH 2/6 staging: wilc1000: remove wilc_platform.h include file
This patch removes wilc_platform.h include file that is defined in wilc_msgqueue.h file. After removing it, compilation error occurs so that it is included two header files as <linux/semaphore.h> and <linux/slab.h> at wilc_msgqueue.h and wilc_msgqueue.c
--- drivers/staging/wilc1000/wilc_msgqueue.c | 1 + drivers/staging/wilc1000/wilc_msgqueue.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/staging/wilc1000/wilc_msgqueue.c +1 -0
@@ -3,6 +3,7 @@#include <linux/spinlock.h> #include "linux_wlan_common.h" #include <linux/errno.h> +#include <linux/slab.h> /*! * @author syounan
drivers/staging/wilc1000/wilc_msgqueue.h +1 -1
@@ -10,7 +10,7 @@* @version 1.0 */ -#include "wilc_platform.h" +#include <linux/semaphore.h> /* Message Queue type is a structure */ typedef struct __Message_struct {
Signature · 1 line
2.5.1
PATCH 3/6 staging: wilc1000: move wilc_msgqueue.h include file
In reply to Chaehyun LimThis patch moves wilc_msgqueue.h include file from wilc_oswrapper.h to host_interface.c because message queue function as wilc_mq_create, wilc_mq_send, wilc_mq_recv and wilc_mq_destroy are used only at host_interface.c file.
--- drivers/staging/wilc1000/host_interface.c | 1 + drivers/staging/wilc1000/wilc_oswrapper.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -0
@@ -1,6 +1,7 @@#include "host_interface.h" #include "coreconfigurator.h" #include "wilc_wlan_if.h" +#include "wilc_msgqueue.h" extern u8 connecting;
drivers/staging/wilc1000/wilc_oswrapper.h +0 -2
@@ -16,7 +16,5 @@/* Os Configuration File */ #include "wilc_platform.h" -/* Message Queue */ -#include "wilc_msgqueue.h" #endif
Signature · 1 line
2.5.1
PATCH 4/6 staging: wilc1000: remove WILC_OSW_INTERFACE_VER define
In reply to Chaehyun LimThis patch removes WILC_OSW_INTERFACE_VER define that is not used anywhere.
--- drivers/staging/wilc1000/wilc_oswrapper.h | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/wilc_oswrapper.h +0 -2
@@ -10,8 +10,6 @@* @version 1.0 */ -/* OS Wrapper interface version */ -#define WILC_OSW_INTERFACE_VER 2/* Os Configuration File */ #include "wilc_platform.h"
Signature · 1 line
2.5.1
PATCH 5/6 staging: wilc1000: remove wilc_platform include file
In reply to Chaehyun LimThis patch removes wilc_platform.h include file in wilc_oswrapper.h Because wilc_platform.h have several standard header files so that some header file should be included .c file to avoid compilation errors.
--- drivers/staging/wilc1000/coreconfigurator.c | 1 + drivers/staging/wilc1000/host_interface.c | 4 ++++ drivers/staging/wilc1000/wilc_oswrapper.h | 2 -- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/coreconfigurator.c +1 -0
@@ -12,6 +12,7 @@#include "coreconfigurator.h" #include "wilc_wlan_if.h" #include <linux/errno.h> +#include <linux/slab.h> #define TAG_PARAM_OFFSET (MAC_HDR_LEN + TIME_STAMP_LEN + \ BEACON_INTERVAL_LEN + CAP_INFO_LEN)
drivers/staging/wilc1000/host_interface.c +4 -0
@@ -1,3 +1,7 @@ +#include <linux/slab.h> +#include <linux/time.h> +#include <linux/kthread.h> +#include <linux/delay.h> #include "host_interface.h" #include "coreconfigurator.h" #include "wilc_wlan_if.h"
drivers/staging/wilc1000/wilc_oswrapper.h +0 -2
@@ -11,8 +11,6 @@*/ -/* Os Configuration File */ -#include "wilc_platform.h" #endif
drivers/staging/wilc1000/wilc_wlan_if.h +1 -1
@@ -14,7 +14,7 @@/* #define MEMORY_STATIC */ /* #define USE_OLD_SPI_SW */ - +#include <linux/semaphore.h> #include "wilc_oswrapper.h" #include "linux_wlan_common.h"
Signature · 1 line
2.5.1
Greg KH
maintainerRe: [PATCH 5/6] staging: wilc1000: remove wilc_platform include file
Quoted 11 lines · Chaehyun Lim
This patch removes
wilc_platform.hinclude file inwilc_oswrapper.hBecausewilc_platform.hhave several standard header files so that some header file should be included .c file to avoid compilation errors.Signed-off-by Chaehyun Lim <[email protected]>--- drivers/staging/wilc1000/coreconfigurator.c | 1 + drivers/staging/wilc1000/host_interface.c | 4 ++++ drivers/staging/wilc1000/wilc_oswrapper.h | 2 -- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-)
This patch, and 6/6 doesn't apply to the tree anymore, can you rebase and resend them?
thanks,
greg k-h
PATCH 6/6 staging: wilc1000: delete wilc_oswrapper.h
In reply to Chaehyun LimThis patch delete wilc_oswrapper.h that has nothing inside.
--- drivers/staging/wilc1000/wilc_oswrapper.h | 16 ---------------- drivers/staging/wilc1000/wilc_wlan.h | 1 - drivers/staging/wilc1000/wilc_wlan_if.h | 1 - 3 files changed, 18 deletions(-) delete mode 100644 drivers/staging/wilc1000/wilc_oswrapper.h
drivers/staging/wilc1000/wilc_oswrapper.h deleted +0 -16
@@ -1,16 +0,0 @@ -#ifndef __WILC_OSWRAPPER_H__ -#define __WILC_OSWRAPPER_H__ - -/*! -* @file wilc_oswrapper.h -* @brief Top level OS Wrapper, include this file and it will include all -* other files as necessary -* @author syounan -* @date 10 Aug 2010 -* @version 1.0 -*/ - - - - -#endif
drivers/staging/wilc1000/wilc_wlan.h +0 -1
@@ -1,7 +1,6 @@#ifndef WILC_WLAN_H #define WILC_WLAN_H -#include "wilc_oswrapper.h" #define ISWILC1000 (id) (((id & 0xfffff000) == 0x100000) ? 1 : 0)
drivers/staging/wilc1000/wilc_wlan_if.h +0 -1
@@ -15,7 +15,6 @@/* #define USE_OLD_SPI_SW */ #include <linux/semaphore.h> -#include "wilc_oswrapper.h" #include "linux_wlan_common.h"
Signature · 1 line
2.5.1