[PATCH] staging: ks7010: move ks_wlan_hw_tx() declaration to header file

From: Baoyou Xie
Date: Sun Sep 18 2016 - 07:31:07 EST


We get 1 warning when building kernel with W=1:
drivers/staging/ks7010/ks7010_sdio.c:363:5: warning: no previous prototype for 'ks_wlan_hw_tx' [-Wmissing-prototypes]

In fact, this function is declared in
drivers/staging/ks7010/ks_wlan_net.c and
drivers/staging/ks7010/ks_hostif.c, but should be
declared in a header file. thus can be recognized in other file.

So this patch moves the declaration into
drivers/staging/ks7010/ks_wlan.h.

Signed-off-by: Baoyou Xie <baoyou.xie@xxxxxxxxxx>
---
drivers/staging/ks7010/ks_hostif.c | 5 -----
drivers/staging/ks7010/ks_wlan.h | 4 ++++
drivers/staging/ks7010/ks_wlan_net.c | 4 ----
3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index aacb93e..d8ed3db 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -20,11 +20,6 @@
/* Include Wireless Extension definition and check version */
#include <net/iw_handler.h> /* New driver API */

-extern int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p,
- unsigned long size,
- void (*complete_handler) (void *arg1, void *arg2),
- void *arg1, void *arg2);
-
extern void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv);
extern int ks_wlan_hw_power_save(struct ks_wlan_private *priv);

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 936222b..67fd846 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -503,5 +503,9 @@ extern int ks_wlan_net_start(struct net_device *dev);
extern int ks_wlan_net_stop(struct net_device *dev);

void send_packet_complete(void *, void *);
+int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p,
+ unsigned long size,
+ void (*complete_handler)(void *arg1, void *arg2),
+ void *arg1, void *arg2);

#endif /* _KS_WLAN_H */
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index a35325e..fe45ba4 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -70,10 +70,6 @@ static const struct iw_handler_def ks_wlan_handler_def;
/*
* function prototypes
*/
-extern int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p,
- unsigned long size,
- void (*complete_handler) (void *arg1, void *arg2),
- void *arg1, void *arg2);
static int ks_wlan_open(struct net_device *dev);
static void ks_wlan_tx_timeout(struct net_device *dev);
static int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev);
--
2.7.4