rtw_init_cmd_priv() is called in one place only, and from another file.
Signed-off-by: Luca Ceresoli <[email protected]>
Cc: Larry Finger <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/rtl8188eu/core/rtw_cmd.c | 13 -------------
drivers/staging/rtl8188eu/include/rtw_cmd.h | 11 ++++++++++-
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c
b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index 0ebf65c87dc0..21b0244031dd 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -240,19 +240,6 @@ static struct _cmd_callback rtw_cmd_callback[] = {
};
/*
-Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
-No irqsave is necessary.
-*/
-
-void rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
-{
- sema_init(&(pcmdpriv->cmd_queue_sema), 0);
- sema_init(&(pcmdpriv->terminate_cmdthread_sema), 0);
-
- _rtw_init_queue(&(pcmdpriv->cmd_queue));
-}
-
-/*
Calling Context:
rtw_enqueue_cmd can only be called between kernel thread,
diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h
b/drivers/staging/rtl8188eu/include/rtw_cmd.h
index 49b10d105274..0d78797a32bb 100644
--- a/drivers/staging/rtl8188eu/include/rtw_cmd.h
+++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h
@@ -67,7 +67,16 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd);
int rtw_cmd_thread(void *context);
-void rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
+/*
+ * Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
+ * No irqsave is necessary.
+ */
+static inline void rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
+{
+ sema_init(&(pcmdpriv->cmd_queue_sema), 0);
+ sema_init(&(pcmdpriv->terminate_cmdthread_sema), 0);
+ _rtw_init_queue(&(pcmdpriv->cmd_queue));
+}
enum rtw_drvextra_cmd_id {
NONE_WK_CID,
--
1.9.1
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel