From d3584775e94d0baa61a1c2cde7fb93a931e966de Mon Sep 17 00:00:00 2001
From: Malcolm Priestley <tvboxspy@gmail.com>
Date: Sat, 28 Jun 2014 23:55:45 +0100
Subject: [PATCH] staging: vt6656: set BBvSetVGAGainOffset inside
 vnt_set_bss_mode

vnt_set_bss_mode changes the state of abyBBVGA so move
BBvSetVGAGainOffset to the function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/vt6656/card.c     | 2 ++
 drivers/staging/vt6656/main_usb.c | 5 -----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 82d6b640132c..1849e34237a5 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -825,4 +825,6 @@ void vnt_set_bss_mode(struct vnt_private *priv)
 		priv->abyBBVGA[2] = 0x0;
 		priv->abyBBVGA[3] = 0x0;
 	}
+
+	BBvSetVGAGainOffset(priv, priv->abyBBVGA[0]);
 }
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index d8164ecc0134..e0ed1bb36c6c 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -440,11 +440,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 	BBvSetShortSlotTime(pDevice);
 	vnt_set_bss_mode(pDevice);
 
-	pDevice->byBBVGACurrent = pDevice->abyBBVGA[0];
-	pDevice->byBBVGANew = pDevice->byBBVGACurrent;
-
-	BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
-
 	pDevice->byRadioCtl = pDevice->abyEEPROM[EEP_OFS_RADIOCTL];
 	pDevice->bHWRadioOff = false;
 
-- 
2.20.1