mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Malcolm Priestley <tvboxspy@gmail.com>
Subject: [PATCH 3/4] staging: vt6655: dead code remove undefined macro FOR_LED_ON_NOTEBOOK code.
Date: Mon, 28 Jul 2014 21:43:29 +0100	[thread overview]
Message-ID: <1406580210-2794-3-git-send-email-tvboxspy@gmail.com> (raw)
In-Reply-To: <1406580210-2794-1-git-send-email-tvboxspy@gmail.com>

Removing all variables associated with the code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6655/bssdb.c       | 53 ------------------------------------
 drivers/staging/vt6655/device_main.c | 15 ----------
 2 files changed, 68 deletions(-)

diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c
index 58f85e8..6367684 100644
--- a/drivers/staging/vt6655/bssdb.c
+++ b/drivers/staging/vt6655/bssdb.c
@@ -901,11 +901,6 @@ BSSvAddMulticastNode(
  *    none.
  *
  -*/
-/* 2008-4-14 <add> by chester for led issue */
-#ifdef FOR_LED_ON_NOTEBOOK
-bool cc = false;
-unsigned int status;
-#endif
 void
 BSSvSecondCallBack(
 	void *hDeviceContext
@@ -926,54 +921,6 @@ BSSvSecondCallBack(
 
 	pDevice->byERPFlag &=
 		~(WLAN_SET_ERP_BARKER_MODE(1) | WLAN_SET_ERP_NONERP_PRESENT(1));
-	/* 2008-4-14 <add> by chester for led issue */
-#ifdef FOR_LED_ON_NOTEBOOK
-	MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
-	if (((!(pDevice->byGPIO & GPIO0_DATA) && (!pDevice->bHWRadioOff)) ||
-	     ((pDevice->byGPIO & GPIO0_DATA) && pDevice->bHWRadioOff)) &&
-	    (!cc)) {
-		cc = true;
-	} else if (cc) {
-		if (pDevice->bHWRadioOff) {
-			if (!(pDevice->byGPIO & GPIO0_DATA)) {
-				if (status == 1)
-					goto start;
-				status = 1;
-				CARDbRadioPowerOff(pDevice);
-				pMgmt->sNodeDBTable[0].bActive = false;
-				pMgmt->eCurrMode = WMAC_MODE_STANDBY;
-				pMgmt->eCurrState = WMAC_STATE_IDLE;
-				pDevice->bLinkPass = false;
-
-			}
-			if (pDevice->byGPIO & GPIO0_DATA) {
-				if (status == 2)
-					goto start;
-				status = 2;
-				CARDbRadioPowerOn(pDevice);
-			}
-		} else {
-			if (pDevice->byGPIO & GPIO0_DATA) {
-				if (status == 3)
-					goto start;
-				status = 3;
-				CARDbRadioPowerOff(pDevice);
-				pMgmt->sNodeDBTable[0].bActive = false;
-				pMgmt->eCurrMode = WMAC_MODE_STANDBY;
-				pMgmt->eCurrState = WMAC_STATE_IDLE;
-				pDevice->bLinkPass = false;
-
-			}
-			if (!(pDevice->byGPIO & GPIO0_DATA)) {
-				if (status == 4)
-					goto start;
-				status = 4;
-				CARDbRadioPowerOn(pDevice);
-			}
-		}
-	}
-start:
-#endif
 
 	if (pDevice->wUseProtectCntDown > 0) {
 		pDevice->wUseProtectCntDown--;
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index fe6de98..e8584fd 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -691,19 +691,6 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
 			// Get GPIO
 			MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
 //2008-4-14 <add> by chester for led issue
-#ifdef FOR_LED_ON_NOTEBOOK
-			if (pDevice->byGPIO & GPIO0_DATA)
-				pDevice->bHWRadioOff = true;
-
-			if (!(pDevice->byGPIO & GPIO0_DATA))
-				pDevice->bHWRadioOff = false;
-		}
-
-		if (pDevice->bRadioControlOff)
-			CARDbRadioPowerOff(pDevice);
-		else
-			CARDbRadioPowerOn(pDevice);
-#else
 		if (((pDevice->byGPIO & GPIO0_DATA) && !(pDevice->byRadioCtl & EEP_RADIOCTL_INV)) ||
 		    (!(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) {
 			pDevice->bHWRadioOff = true;
@@ -711,8 +698,6 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
 	}
 	if (pDevice->bHWRadioOff || pDevice->bRadioControlOff)
 		CARDbRadioPowerOff(pDevice);
-
-#endif
 }
 pMgmt->eScanType = WMAC_SCAN_PASSIVE;
 // get Permanent network address
-- 
1.9.1


  parent reply	other threads:[~2014-07-28 20:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 20:43 [PATCH 1/4] staging: vt6655: remove undefined TASK_LET code Malcolm Priestley
2014-07-28 20:43 ` [PATCH 2/4] staging: vt6655: deadcode remove undefined macro THREAD code Malcolm Priestley
2014-07-28 20:43 ` Malcolm Priestley [this message]
2014-07-28 20:43 ` [PATCH 4/4] staging: vt6655: dead code remove undefined macro IO_MAP 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=1406580210-2794-3-git-send-email-tvboxspy@gmail.com \
    --to=tvboxspy@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome