Commit 1266ed76 authored by Nandini Hanumanthagowda's avatar Nandini Hanumanthagowda Committed by Greg Kroah-Hartman

staging: vt6656: indentation and removal of unnecessary spaces

Removed unnecessary white spaces at beginning of line
and added proper indentation to fix checkpatch warnings/errors
to improve the readability of code
Signed-off-by: default avatarNandini Hanumanthagowda <nandu.hgowda@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f1f9f350
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
#include "control.h" #include "control.h"
#include "rndis.h" #include "rndis.h"
static int msglevel =MSG_LEVEL_INFO; static int msglevel = MSG_LEVEL_INFO;
//static int msglevel =MSG_LEVEL_DEBUG; //static int msglevel = MSG_LEVEL_DEBUG;
#define FIRMWARE_VERSION 0x133 /* version 1.51 */ #define FIRMWARE_VERSION 0x133 /* version 1.51 */
#define FIRMWARE_NAME "vntwusb.fw" #define FIRMWARE_NAME "vntwusb.fw"
...@@ -72,18 +72,17 @@ int FIRMWAREbDownload(struct vnt_private *pDevice) ...@@ -72,18 +72,17 @@ int FIRMWAREbDownload(struct vnt_private *pDevice)
memcpy(pBuffer, fw->data + ii, wLength); memcpy(pBuffer, fw->data + ii, wLength);
NdisStatus = CONTROLnsRequestOutAsyn(pDevice, NdisStatus = CONTROLnsRequestOutAsyn(pDevice,
0, 0,
0x1200+ii, 0x1200+ii,
0x0000, 0x0000,
wLength, wLength,
pBuffer pBuffer);
);
DBG_PRT(MSG_LEVEL_DEBUG, DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO"Download firmware...%d %zu\n", ii, fw->size); KERN_INFO"Download firmware...%d %zu\n", ii, fw->size);
if (NdisStatus != STATUS_SUCCESS) if (NdisStatus != STATUS_SUCCESS)
goto free_fw; goto free_fw;
} }
result = true; result = true;
free_fw: free_fw:
...@@ -101,48 +100,46 @@ int FIRMWAREbBrach2Sram(struct vnt_private *pDevice) ...@@ -101,48 +100,46 @@ int FIRMWAREbBrach2Sram(struct vnt_private *pDevice)
{ {
int NdisStatus; int NdisStatus;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Branch to Sram\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Branch to Sram\n");
NdisStatus = CONTROLnsRequestOut(pDevice, NdisStatus = CONTROLnsRequestOut(pDevice,
1, 1,
0x1200, 0x1200,
0x0000, 0x0000,
0, 0,
NULL NULL);
); if (NdisStatus != STATUS_SUCCESS) {
return (false);
if (NdisStatus != STATUS_SUCCESS) { } else {
return (false); return (true);
} else { }
return (true);
}
} }
int FIRMWAREbCheckVersion(struct vnt_private *pDevice) int FIRMWAREbCheckVersion(struct vnt_private *pDevice)
{ {
int ntStatus; int ntStatus;
ntStatus = CONTROLnsRequestIn(pDevice, ntStatus = CONTROLnsRequestIn(pDevice,
MESSAGE_TYPE_READ, MESSAGE_TYPE_READ,
0, 0,
MESSAGE_REQUEST_VERSION, MESSAGE_REQUEST_VERSION,
2, 2,
(u8 *) &(pDevice->wFirmwareVersion)); (u8 *) &(pDevice->wFirmwareVersion));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n", pDevice->wFirmwareVersion); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n", pDevice->wFirmwareVersion);
if (ntStatus != STATUS_SUCCESS) { if (ntStatus != STATUS_SUCCESS) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Invalid.\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Invalid.\n");
return false; return false;
} }
if (pDevice->wFirmwareVersion == 0xFFFF) { if (pDevice->wFirmwareVersion == 0xFFFF) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"In Loader.\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"In Loader.\n");
return false; return false;
} }
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n", pDevice->wFirmwareVersion); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n", pDevice->wFirmwareVersion);
if (pDevice->wFirmwareVersion < FIRMWARE_VERSION) { if (pDevice->wFirmwareVersion < FIRMWARE_VERSION) {
// branch to loader for download new firmware // branch to loader for download new firmware
FIRMWAREbBrach2Sram(pDevice); FIRMWAREbBrach2Sram(pDevice);
return false; return false;
} }
return true; return true;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment