From: Marcos Paulo de Souza <marcos.mage@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Marcos Paulo de Souza <marcos.mage@gmail.com>,
Greg Kroah-Hartman <gregkh@suss.de>,
Forest Bond <forest@alittletooquiet.net>,
devel@driverdev.osuosl.org
Subject: [PATCH 5/5] staging: vt6656: channel.c: Restructure CHvInitChannelTable
Date: Fri, 2 Dec 2011 00:06:43 +0000 [thread overview]
Message-ID: <1322784403-20086-1-git-send-email-marcos.mage@gmail.com> (raw)
This functions has some code that does nothing, so remove it. This patch
also fix some coding style issues.
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suss.de>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: devel@driverdev.osuosl.org
---
drivers/staging/vt6656/channel.c | 48 ++++++++++++++-----------------------
1 files changed, 18 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c
index 16fbfcf..5cc23ba 100644
--- a/drivers/staging/vt6656/channel.c
+++ b/drivers/staging/vt6656/channel.c
@@ -39,8 +39,6 @@
#include "channel.h"
#include "rf.h"
-static int msglevel = MSG_LEVEL_INFO;
-
static SChannelTblElement sChannelTbl[CB_MAX_CHANNEL+1] =
{
{0, 0, FALSE},
@@ -444,38 +442,28 @@ void CHvInitChannelTable(void *pDeviceHandler)
break;
}
- if ((pDevice->dwDiagRefCount != 0) ||
- (pDevice->b11hEable == TRUE)) {
- if (bMultiBand == TRUE) {
- for (ii = 0; ii < CB_MAX_CHANNEL; ii++) {
- sChannelTbl[ii+1].bValid = TRUE;
- }
- for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) {
- }
- } else {
- for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) {
- sChannelTbl[ii+1].bValid = TRUE;
- }
- }
- } else if (pDevice->byZoneType <= CCODE_MAX) {
- if (bMultiBand == TRUE) {
- for (ii = 0; ii < CB_MAX_CHANNEL; ii++) {
- if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
+ if ((pDevice->dwDiagRefCount != 0) ||
+ (pDevice->b11hEable == TRUE)) {
+ if (bMultiBand == TRUE) {
+ for (ii = 0; ii < CB_MAX_CHANNEL; ii++)
sChannelTbl[ii+1].bValid = TRUE;
- }
- }
- } else {
- for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) {
- if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
+ } else {
+ for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++)
sChannelTbl[ii+1].bValid = TRUE;
+ }
+ } else if (pDevice->byZoneType <= CCODE_MAX) {
+ if (bMultiBand == TRUE) {
+ for (ii = 0; ii < CB_MAX_CHANNEL; ii++) {
+ if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0)
+ sChannelTbl[ii+1].bValid = TRUE;
+ }
+ } else {
+ for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) {
+ if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0)
+ sChannelTbl[ii+1].bValid = TRUE;
}
}
- }
- }
- DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO"Zone=[%d][%c][%c]!!\n",pDevice->byZoneType,ChannelRuleTab[pDevice->byZoneType].chCountryCode[0],ChannelRuleTab[pDevice->byZoneType].chCountryCode[1]);
- for (ii = 0; ii < CB_MAX_CHANNEL; ii++) {
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Channel[%d] is [%d]\n",sChannelTbl[ii].byChannelNumber,sChannelTbl[ii+1].bValid);
- }
+ }
}
BYTE CHbyGetChannelMapping(BYTE byChannelNumber)
--
1.7.4.4
next reply other threads:[~2011-12-02 2:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 0:06 Marcos Paulo de Souza [this message]
2011-12-02 20:52 ` Dan Carpenter
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=1322784403-20086-1-git-send-email-marcos.mage@gmail.com \
--to=marcos.mage@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=gregkh@suss.de \
--cc=linux-kernel@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