[PATCH] staging: rtl8712: Remove function alloc_network

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove function alloc_network as it does nothing except call
_r8712_alloc_network. Further, to maintain consistency with
the names of other functions, rename _r8712_alloc_network as
r8712_alloc_network.
Also change the corresponding calls to either function
accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@xxxxxxxxx>
---
 drivers/staging/rtl8712/rtl871x_cmd.c  | 2 +-
 drivers/staging/rtl8712/rtl871x_mlme.c | 9 ++-------
 drivers/staging/rtl8712/rtl871x_mlme.h | 2 +-
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
index 05a78ac24987..7c437ee9e022 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -880,7 +880,7 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter,
 		}
 		r8712_indicate_connect(padapter);
 	} else {
-		pwlan = _r8712_alloc_network(pmlmepriv);
+		pwlan = r8712_alloc_network(pmlmepriv);
 		if (!pwlan) {
 			pwlan = r8712_get_oldest_wlan_network(
 				&pmlmepriv->scanned_queue);
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index f6ba3e865a30..3b6846c43d72 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -70,7 +70,7 @@ int r8712_init_mlme_priv(struct _adapter *padapter)
 	return _SUCCESS;
 }
 
-struct wlan_network *_r8712_alloc_network(struct mlme_priv *pmlmepriv)
+struct wlan_network *r8712_alloc_network(struct mlme_priv *pmlmepriv)
 {
 	unsigned long irqL;
 	struct wlan_network *pnetwork;
@@ -210,11 +210,6 @@ void r8712_free_mlme_priv(struct mlme_priv *pmlmepriv)
 	kfree(pmlmepriv->free_bss_buf);
 }
 
-static struct	wlan_network *alloc_network(struct mlme_priv *pmlmepriv)
-{
-	return _r8712_alloc_network(pmlmepriv);
-}
-
 /*
  * return the wlan_network with the matching addr
  * Shall be called under atomic context...
@@ -388,7 +383,7 @@ static void update_scanned_network(struct _adapter *adapter,
 		} else {
 			/* Otherwise just pull from the free list */
 			/* update scan_time */
-			pnetwork = alloc_network(pmlmepriv);
+			pnetwork = r8712_alloc_network(pmlmepriv);
 			if (!pnetwork)
 				return;
 			bssid_ex_sz = r8712_get_wlan_bssid_ex_sz(target);
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.h b/drivers/staging/rtl8712/rtl871x_mlme.h
index 8a54181f4816..3973a49dc32e 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.h
+++ b/drivers/staging/rtl8712/rtl871x_mlme.h
@@ -196,7 +196,7 @@ void _r8712_join_timeout_handler(struct _adapter *adapter);
 void r8712_scan_timeout_handler(struct _adapter *adapter);
 void _r8712_dhcp_timeout_handler(struct _adapter *adapter);
 void _r8712_wdg_timeout_handler(struct _adapter *adapter);
-struct wlan_network *_r8712_alloc_network(struct mlme_priv *pmlmepriv);
+struct wlan_network *r8712_alloc_network(struct mlme_priv *pmlmepriv);
 sint r8712_if_up(struct _adapter *padapter);
 void r8712_joinbss_reset(struct _adapter *padapter);
 unsigned int r8712_restructure_ht_ie(struct _adapter *padapter, u8 *in_ie,
-- 
2.19.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux