From: Dan Williams <dcbw@redhat.com>
To: Bing Zhao <bzhao@marvell.com>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/4] libertas: define macros for SDIO model numbers
Date: Wed, 20 May 2009 18:20:47 -0400 [thread overview]
Message-ID: <1242858047.7048.25.camel@localhost.localdomain> (raw)
In-Reply-To: <1242787701-10685-1-git-send-email-bzhao@marvell.com>
On Tue, 2009-05-19 at 19:48 -0700, Bing Zhao wrote:
> replace direct usages of SDIO model numbers with defined macros.
>
> Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
> ---
> drivers/net/wireless/libertas/if_sdio.c | 18 +++++++++---------
> drivers/net/wireless/libertas/if_sdio.h | 4 ++++
> 2 files changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
> index 55864c1..69d7fd3 100644
> --- a/drivers/net/wireless/libertas/if_sdio.c
> +++ b/drivers/net/wireless/libertas/if_sdio.c
> @@ -66,19 +66,19 @@ struct if_sdio_model {
> static struct if_sdio_model if_sdio_models[] = {
> {
> /* 8385 */
> - .model = 0x04,
> + .model = IF_SDIO_MODEL_8385,
> .helper = "sd8385_helper.bin",
> .firmware = "sd8385.bin",
> },
> {
> /* 8686 */
> - .model = 0x0B,
> + .model = IF_SDIO_MODEL_8686,
> .helper = "sd8686_helper.bin",
> .firmware = "sd8686.bin",
> },
> {
> /* 8688 */
> - .model = 0x10,
> + .model = IF_SDIO_MODEL_8688,
> .helper = "sd8688_helper.bin",
> .firmware = "sd8688.bin",
> },
> @@ -118,7 +118,7 @@ static u16 if_sdio_read_scratch(struct if_sdio_card *card, int *err)
> int ret, reg;
> u16 scratch;
>
> - if (card->model == 0x04)
> + if (card->model == IF_SDIO_MODEL_8385)
> reg = IF_SDIO_SCRATCH_OLD;
> else
> reg = IF_SDIO_SCRATCH;
> @@ -216,7 +216,7 @@ static int if_sdio_handle_event(struct if_sdio_card *card,
>
> lbs_deb_enter(LBS_DEB_SDIO);
>
> - if (card->model == 0x04) {
> + if (card->model == IF_SDIO_MODEL_8385) {
> event = sdio_readb(card->func, IF_SDIO_EVENT, &ret);
> if (ret)
> goto out;
> @@ -829,10 +829,10 @@ static int if_sdio_probe(struct sdio_func *func,
> if (sscanf(func->card->info[i],
> "ID: %x", &model) == 1)
> break;
> - if (!strcmp(func->card->info[i], "IBIS Wireless SDIO Card")) {
> - model = 4;
> - break;
> - }
> + if (!strcmp(func->card->info[i], "IBIS Wireless SDIO Card")) {
> + model = IF_SDIO_MODEL_8385;
> + break;
> + }
> }
>
> if (i == func->card->num_info) {
> diff --git a/drivers/net/wireless/libertas/if_sdio.h b/drivers/net/wireless/libertas/if_sdio.h
> index 37ada2c..cea343f 100644
> --- a/drivers/net/wireless/libertas/if_sdio.h
> +++ b/drivers/net/wireless/libertas/if_sdio.h
> @@ -12,6 +12,10 @@
> #ifndef _LBS_IF_SDIO_H
> #define _LBS_IF_SDIO_H
>
> +#define IF_SDIO_MODEL_8385 0x04
> +#define IF_SDIO_MODEL_8686 0x0b
> +#define IF_SDIO_MODEL_8688 0x10
> +
> #define IF_SDIO_IOPORT 0x00
>
> #define IF_SDIO_H_INT_MASK 0x04
prev parent reply other threads:[~2009-05-20 22:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 2:48 [PATCH 1/4] libertas: define macros for SDIO model numbers Bing Zhao
2009-05-20 2:48 ` [PATCH 2/4] libertas: get SD8688 rx length with one CMD52 Bing Zhao
2009-05-20 22:26 ` Dan Williams
2009-05-20 2:48 ` [PATCH 3/4] libertas: implement function init/shutdown commands for SD8688 Bing Zhao
2009-05-26 20:27 ` Dan Williams
2009-05-27 18:38 ` Bing Zhao
2009-05-20 2:48 ` [PATCH 4/4] libertas: read SD8688 firmware status from new register Bing Zhao
2009-05-20 22:46 ` Dan Williams
2009-05-20 23:50 ` Bing Zhao
2009-05-21 14:40 ` Dan Williams
2009-05-20 22:20 ` Dan Williams [this message]
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=1242858047.7048.25.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=bzhao@marvell.com \
--cc=libertas-dev@lists.infradead.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).