linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org, Malcolm Priestley <tvboxspy@gmail.com>
Subject: [PATCH 5/8] staging: vt6655: power.c replace pDevice with priv
Date: Sun, 22 Nov 2015 09:07:19 +0000	[thread overview]
Message-ID: <1448183242-3397-5-git-send-email-tvboxspy@gmail.com> (raw)
In-Reply-To: <1448183242-3397-1-git-send-email-tvboxspy@gmail.com>

Removing camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6655/power.c | 56 +++++++++++++++++++++---------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c
index 06e6b9d..e58afbd 100644
--- a/drivers/staging/vt6655/power.c
+++ b/drivers/staging/vt6655/power.c
@@ -68,40 +68,40 @@ PSvEnablePowerSaving(
 	unsigned short wListenInterval
 )
 {
-	struct vnt_private *pDevice = hDeviceContext;
-	u16 wAID = pDevice->current_aid | BIT(14) | BIT(15);
+	struct vnt_private *priv = hDeviceContext;
+	u16 wAID = priv->current_aid | BIT(14) | BIT(15);
 
 	/* set period of power up before TBTT */
-	VNSvOutPortW(pDevice->PortOffset + MAC_REG_PWBT, C_PWBT);
-	if (pDevice->op_mode != NL80211_IFTYPE_ADHOC) {
+	VNSvOutPortW(priv->PortOffset + MAC_REG_PWBT, C_PWBT);
+	if (priv->op_mode != NL80211_IFTYPE_ADHOC) {
 		/* set AID */
-		VNSvOutPortW(pDevice->PortOffset + MAC_REG_AIDATIM, wAID);
+		VNSvOutPortW(priv->PortOffset + MAC_REG_AIDATIM, wAID);
 	} else {
 		/* set ATIM Window */
 #if 0 /* TODO atim window */
-		MACvWriteATIMW(pDevice->PortOffset, pMgmt->wCurrATIMWindow);
+		MACvWriteATIMW(priv->PortOffset, pMgmt->wCurrATIMWindow);
 #endif
 	}
 	/* Set AutoSleep */
-	MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
+	MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
 	/* Set HWUTSF */
-	MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF);
+	MACvRegBitsOn(priv->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF);
 
 	if (wListenInterval >= 2) {
 		/* clear always listen beacon */
-		MACvRegBitsOff(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
+		MACvRegBitsOff(priv->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
 		/* first time set listen next beacon */
-		MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN);
+		MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN);
 	} else {
 		/* always listen beacon */
-		MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
+		MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
 	}
 
 	/* enable power saving hw function */
-	MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN);
-	pDevice->bEnablePSMode = true;
+	MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN);
+	priv->bEnablePSMode = true;
 
-	pDevice->bPWBitOn = true;
+	priv->bPWBitOn = true;
 	pr_debug("PS:Power Saving Mode Enable...\n");
 }
 
@@ -120,20 +120,20 @@ PSvDisablePowerSaving(
 	void *hDeviceContext
 )
 {
-	struct vnt_private *pDevice = hDeviceContext;
+	struct vnt_private *priv = hDeviceContext;
 
 	/* disable power saving hw function */
-	MACbPSWakeup(pDevice->PortOffset);
+	MACbPSWakeup(priv->PortOffset);
 	/* clear AutoSleep */
-	MACvRegBitsOff(pDevice->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
+	MACvRegBitsOff(priv->PortOffset, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
 	/* clear HWUTSF */
-	MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF);
+	MACvRegBitsOff(priv->PortOffset, MAC_REG_TFTCTL, TFTCTL_HWUTSF);
 	/* set always listen beacon */
-	MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
+	MACvRegBitsOn(priv->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
 
-	pDevice->bEnablePSMode = false;
+	priv->bEnablePSMode = false;
 
-	pDevice->bPWBitOn = false;
+	priv->bPWBitOn = false;
 }
 
 
@@ -152,20 +152,20 @@ PSbIsNextTBTTWakeUp(
 	void *hDeviceContext
 )
 {
-	struct vnt_private *pDevice = hDeviceContext;
-	struct ieee80211_hw *hw = pDevice->hw;
+	struct vnt_private *priv = hDeviceContext;
+	struct ieee80211_hw *hw = priv->hw;
 	struct ieee80211_conf *conf = &hw->conf;
 	bool bWakeUp = false;
 
 	if (conf->listen_interval > 1) {
-		if (!pDevice->wake_up_count)
-			pDevice->wake_up_count = conf->listen_interval;
+		if (!priv->wake_up_count)
+			priv->wake_up_count = conf->listen_interval;
 
-		--pDevice->wake_up_count;
+		--priv->wake_up_count;
 
-		if (pDevice->wake_up_count == 1) {
+		if (priv->wake_up_count == 1) {
 			/* Turn on wake up to listen next beacon */
-			MACvRegBitsOn(pDevice->PortOffset,
+			MACvRegBitsOn(priv->PortOffset,
 				      MAC_REG_PSCTL, PSCTL_LNBCN);
 			bWakeUp = true;
 		}
-- 
2.6.2


  parent reply	other threads:[~2015-11-22  9:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-22  9:07 [PATCH 1/8] staging: vt6655: channel.c replace pDevice with priv Malcolm Priestley
2015-11-22  9:07 ` [PATCH 2/8] staging: vt6655: set_channel replace void handler Malcolm Priestley
2015-11-22  9:07 ` [PATCH 3/8] staging: vt6655: set_channel replace bResult with ret Malcolm Priestley
2015-11-23  0:31   ` Julian Calaby
2015-11-22  9:07 ` [PATCH 4/8] staging: vt6655: rf.c rename bResult ret Malcolm Priestley
2015-11-23  0:39   ` Julian Calaby
2015-11-22  9:07 ` Malcolm Priestley [this message]
2015-11-22  9:07 ` [PATCH 6/8] staging: vt6655: rf.c/h Replace DeviceContext with vnt_private Malcolm Priestley
2015-11-22  9:07 ` [PATCH 7/8] staging: vt6655: PSbIsNextTBTTWakeUp Rename bWakeUp wake_up Malcolm Priestley
2015-11-22  9:07 ` [PATCH 8/8] staging: vt6655: mac.c replace void __iomem * with struct vnt_private Malcolm Priestley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448183242-3397-5-git-send-email-tvboxspy@gmail.com \
    --to=tvboxspy@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).