[PATCH 070/166] staging: rtl8192e: Convert typedef r8192_priv to struct r8192_priv

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

 



Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---
 drivers/staging/rtl8192e/r8192E_cmdpkt.c   |    2 +-
 drivers/staging/rtl8192e/r8192E_dev.c      |   10 +++++-----
 drivers/staging/rtl8192e/r8192E_firmware.c |   10 +++++-----
 drivers/staging/rtl8192e/rtl_core.c        |   14 +++++++-------
 drivers/staging/rtl8192e/rtl_core.h        |   21 ++++++++++-----------
 drivers/staging/rtl8192e/rtl_dm.c          |    6 +++---
 6 files changed, 31 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/rtl8192e/r8192E_cmdpkt.c b/drivers/staging/rtl8192e/r8192E_cmdpkt.c
index d306e10..90cbb5b 100644
--- a/drivers/staging/rtl8192e/r8192E_cmdpkt.c
+++ b/drivers/staging/rtl8192e/r8192E_cmdpkt.c
@@ -42,7 +42,7 @@
 {
 
 	bool				rt_status = true;
-	struct r8192_priv	*priv = rtllib_priv(dev);
+	struct r8192_priv *priv = rtllib_priv(dev);
 	u16				frag_threshold;
 	u16				frag_length = 0, frag_offset = 0;
 	struct rt_firmware *pfirmware = priv->pFirmware;
diff --git a/drivers/staging/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/r8192E_dev.c
index 5da2185..830616a 100644
--- a/drivers/staging/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/r8192E_dev.c
@@ -97,7 +97,7 @@ void rtl8192e_update_msr(struct net_device *dev)
 void
 rtl8192e_SetHwReg(struct net_device *dev,u8 variable,u8* val)
 {
-	struct r8192_priv* priv = rtllib_priv(dev);
+	struct r8192_priv * priv = rtllib_priv(dev);
 
 	switch (variable)
 	{
@@ -1004,7 +1004,7 @@ void rtl8192_link_change(struct net_device *dev)
 void rtl8192_AllowAllDestAddr(struct net_device* dev,
                         bool bAllowAllDA, bool WriteIntoReg)
 {
-        struct r8192_priv* priv = rtllib_priv(dev);
+        struct r8192_priv * priv = rtllib_priv(dev);
 
         if (bAllowAllDA)
                 priv->ReceiveConfig |= RCR_AAP;
@@ -2001,7 +2001,7 @@ void rtl8192_halt_adapter(struct net_device *dev, bool reset)
 
 void rtl8192_update_ratr_table(struct net_device* dev)
 {
-	struct r8192_priv* priv = rtllib_priv(dev);
+	struct r8192_priv * priv = rtllib_priv(dev);
 	struct rtllib_device* ieee = priv->rtllib;
 	u8* pMcsRate = ieee->dot11HTOperationalRateSet;
 	u32 ratr_value = 0;
@@ -2254,7 +2254,7 @@ bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev)
 bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev)
 {
 	bool			Reval;
-	struct r8192_priv* priv = rtllib_priv(dev);
+	struct r8192_priv * priv = rtllib_priv(dev);
 	struct rtllib_device* ieee = priv->rtllib;
 
 	if (ieee->bHalfWirelessN24GMode == true)
@@ -2283,7 +2283,7 @@ ActUpdateChannelAccessSetting(
 	struct channel_access_setting *ChnlAccessSetting
 	)
 {
-		struct r8192_priv* priv = rtllib_priv(dev);
+		struct r8192_priv * priv = rtllib_priv(dev);
 
 		return;
 
diff --git a/drivers/staging/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/r8192E_firmware.c
index 41a6144..bacee9e 100644
--- a/drivers/staging/rtl8192e/r8192E_firmware.c
+++ b/drivers/staging/rtl8192e/r8192E_firmware.c
@@ -25,7 +25,7 @@
 
 extern void firmware_init_param(struct net_device *dev)
 {
-	struct r8192_priv	*priv = rtllib_priv(dev);
+	struct r8192_priv *priv = rtllib_priv(dev);
 	struct rt_firmware *pfirmware = priv->pFirmware;
 
 	pfirmware->cmdpacket_frag_thresold = GET_COMMAND_PACKET_FRAG_THRESHOLD(MAX_TRANSMIT_BUFFER_SIZE);
@@ -33,7 +33,7 @@ extern void firmware_init_param(struct net_device *dev)
 
 bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buffer_len)
 {
-	struct r8192_priv   *priv = rtllib_priv(dev);
+	struct r8192_priv *priv = rtllib_priv(dev);
 	bool		    rt_status = true;
 	u16		    frag_threshold;
 	u16		    frag_length, frag_offset = 0;
@@ -101,7 +101,7 @@ fwSendNullPacket(
 )
 {
 	bool	rtStatus = true;
-	struct r8192_priv   *priv = rtllib_priv(dev);
+	struct r8192_priv *priv = rtllib_priv(dev);
 	struct sk_buff	    *skb;
 	struct cb_desc *tcb_desc;
 	unsigned char	    *ptr_buf;
@@ -209,7 +209,7 @@ CPUCheckFirmwareReady_Fail:
 
 inline static bool firmware_check_ready(struct net_device *dev, u8 load_fw_status)
 {
-	struct r8192_priv	*priv = rtllib_priv(dev);
+	struct r8192_priv *priv = rtllib_priv(dev);
 	struct rt_firmware *pfirmware = priv->pFirmware;
 	bool rt_status  = true;
 
@@ -253,7 +253,7 @@ inline static bool firmware_check_ready(struct net_device *dev, u8 load_fw_statu
 
 bool init_firmware(struct net_device *dev)
 {
-	struct r8192_priv	*priv = rtllib_priv(dev);
+	struct r8192_priv *priv = rtllib_priv(dev);
 	bool			rt_status = true;
 
 	u8	*firmware_img_buf[3] = { &Rtl8192PciEFwBootArray[0],
diff --git a/drivers/staging/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl_core.c
index 578c3c8..ce649a5 100644
--- a/drivers/staging/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl_core.c
@@ -923,7 +923,7 @@ void rtl8192_config_rate(struct net_device* dev, u16* rate_config)
 	 }
 }
 
-void rtl8192_refresh_supportrate(struct r8192_priv* priv)
+void rtl8192_refresh_supportrate(struct r8192_priv * priv)
 {
 	struct rtllib_device* ieee = priv->rtllib;
 	if (ieee->mode == WIRELESS_MODE_N_24G || ieee->mode == WIRELESS_MODE_N_5G) {
@@ -1283,7 +1283,7 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
 
 }
 
-static void rtl8192_init_priv_lock(struct r8192_priv* priv)
+static void rtl8192_init_priv_lock(struct r8192_priv * priv)
 {
 	spin_lock_init(&priv->fw_scan_lock);
 	spin_lock_init(&priv->tx_lock);
@@ -1675,7 +1675,7 @@ void rtl819x_update_rxcounts(struct r8192_priv *priv,
 
 void	rtl819x_watchdog_wqcallback(void *data)
 {
-	struct r8192_priv *priv = container_of_dwork_rsl(data,struct r8192_priv,watch_dog_wq);
+	struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv, watch_dog_wq);
 	struct net_device *dev = priv->rtllib->dev;
 	struct rtllib_device* ieee = priv->rtllib;
 	RESET_TYPE	ResetType = RESET_TYPE_NORESET;
@@ -2479,7 +2479,7 @@ void rtl8192_irq_rx_tasklet(struct r8192_priv *priv)
 /****************************************************************************
  ---------------------------- NIC START/CLOSE STUFF---------------------------
 *****************************************************************************/
-void rtl8192_cancel_deferred_work(struct r8192_priv* priv)
+void rtl8192_cancel_deferred_work(struct r8192_priv * priv)
 {
 	cancel_delayed_work(&priv->watch_dog_wq);
 	cancel_delayed_work(&priv->update_beacon_wq);
@@ -3138,7 +3138,7 @@ static void __devexit rtl8192_pci_disconnect(struct pci_dev *pdev)
 bool NicIFEnableNIC(struct net_device* dev)
 {
 	bool init_status = true;
-	struct r8192_priv* priv = rtllib_priv(dev);
+	struct r8192_priv * priv = rtllib_priv(dev);
 	struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
 
 	if (IS_NIC_DOWN(priv)){
@@ -3167,7 +3167,7 @@ bool NicIFEnableNIC(struct net_device* dev)
 bool NicIFDisableNIC(struct net_device* dev)
 {
 	bool	status = true;
-	struct r8192_priv* priv = rtllib_priv(dev);
+	struct r8192_priv * priv = rtllib_priv(dev);
 	u8 tmp_state = 0;
 	RT_TRACE(COMP_PS, "=========>%s()\n",__func__);
 	priv->bdisable_nic = true;
@@ -3250,7 +3250,7 @@ static void __exit rtl8192_pci_module_exit(void)
 
 void check_rfctrl_gpio_timer(unsigned long data)
 {
-	struct r8192_priv* priv = rtllib_priv((struct net_device *)data);
+	struct r8192_priv * priv = rtllib_priv((struct net_device *)data);
 
 	priv->polling_timer_on = 1;
 
diff --git a/drivers/staging/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl_core.h
index 1271e3d..e0c56b9 100644
--- a/drivers/staging/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl_core.h
@@ -68,13 +68,13 @@
 
 #define DRV_NAME "rtl819xE"
 
-#define IS_HARDWARE_TYPE_819xP(_priv) ((((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8190P)||\
-					(((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192E))
-#define IS_HARDWARE_TYPE_8192SE(_priv)	(((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192SE)
-#define IS_HARDWARE_TYPE_8192CE(_priv)	(((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192CE)
-#define IS_HARDWARE_TYPE_8192CU(_priv)	(((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192CU)
-#define IS_HARDWARE_TYPE_8192DE(_priv)	(((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192DE)
-#define IS_HARDWARE_TYPE_8192DU(_priv)	(((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192DU)
+#define IS_HARDWARE_TYPE_819xP(_priv) ((((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8190P)||\
+					(((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192E))
+#define IS_HARDWARE_TYPE_8192SE(_priv)	(((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192SE)
+#define IS_HARDWARE_TYPE_8192CE(_priv)	(((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192CE)
+#define IS_HARDWARE_TYPE_8192CU(_priv)	(((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192CU)
+#define IS_HARDWARE_TYPE_8192DE(_priv)	(((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192DE)
+#define IS_HARDWARE_TYPE_8192DU(_priv)	(((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192DU)
 
 #define RTL_PCI_DEVICE(vend, dev, cfg) \
 	.vendor = (vend), .device = (dev), \
@@ -547,8 +547,7 @@ struct rtl819x_ops{
 	bool (* RxCheckStuckHandler)(struct net_device* dev);
 };
 
-typedef struct r8192_priv
-{
+struct r8192_priv {
 	struct pci_dev *pdev;
 	struct pci_dev *bridge_pdev;
 
@@ -1017,7 +1016,7 @@ typedef struct r8192_priv
 	u8		H2CTxCmdSeq;
 
 
-}r8192_priv;
+};//;
 
 extern const struct ethtool_ops rtl819x_ethtool_ops;
 
@@ -1065,7 +1064,7 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs);
 
 short rtl8192_pci_initdescring(struct net_device *dev);
 
-void rtl8192_cancel_deferred_work(struct r8192_priv* priv);
+void rtl8192_cancel_deferred_work(struct r8192_priv * priv);
 
 int _rtl8192_up(struct net_device *dev,bool is_silent_reset);
 
diff --git a/drivers/staging/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl_dm.c
index ecd8177..a8e2678 100644
--- a/drivers/staging/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl_dm.c
@@ -884,7 +884,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device * dev)
 
 void	dm_txpower_trackingcallback(void *data)
 {
-	struct r8192_priv *priv = container_of_dwork_rsl(data,struct r8192_priv,txpower_tracking_wq);
+	struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv,txpower_tracking_wq);
 	struct net_device *dev = priv->rtllib->dev;
 
 	if (priv->IC_Cut >= IC_VersionCut_D)
@@ -2668,7 +2668,7 @@ static	void	dm_check_pbc_gpio(struct net_device *dev)
 
 extern	void	dm_CheckRfCtrlGPIO(void *data)
 {
-       struct r8192_priv *priv = container_of_dwork_rsl(data,struct r8192_priv,gpio_change_rf_wq);
+       struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv,gpio_change_rf_wq);
        struct net_device *dev = priv->rtllib->dev;
 	u8 tmp1byte;
 	RT_RF_POWER_STATE	eRfPowerStateToSet;
@@ -2735,7 +2735,7 @@ extern	void	dm_CheckRfCtrlGPIO(void *data)
 
 void	dm_rf_pathcheck_workitemcallback(void *data)
 {
-	struct r8192_priv *priv = container_of_dwork_rsl(data,struct r8192_priv,rfpath_check_wq);
+	struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv,rfpath_check_wq);
 	struct net_device *dev =priv->rtllib->dev;
 	u8 rfpath = 0, i;
 
-- 
1.7.3.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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