diff options
author | Bing Zhao <bzhao@marvell.com> | 2009-05-19 22:48:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-22 14:06:00 -0400 |
commit | e70a5ac5d27166cfe5bfbe8f63017af3b09d72ce (patch) | |
tree | f6be1e95bf547baba67057951741cecc6755485e | |
parent | ea2d06395b6de717a5e0c4b6e55f3047cae2131f (diff) |
libertas: define macros for SDIO model numbers
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/libertas/if_sdio.c | 18 | ||||
-rw-r--r-- | 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 55864c10f9f1..69d7fd31319a 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 { | |||
66 | static struct if_sdio_model if_sdio_models[] = { | 66 | static struct if_sdio_model if_sdio_models[] = { |
67 | { | 67 | { |
68 | /* 8385 */ | 68 | /* 8385 */ |
69 | .model = 0x04, | 69 | .model = IF_SDIO_MODEL_8385, |
70 | .helper = "sd8385_helper.bin", | 70 | .helper = "sd8385_helper.bin", |
71 | .firmware = "sd8385.bin", | 71 | .firmware = "sd8385.bin", |
72 | }, | 72 | }, |
73 | { | 73 | { |
74 | /* 8686 */ | 74 | /* 8686 */ |
75 | .model = 0x0B, | 75 | .model = IF_SDIO_MODEL_8686, |
76 | .helper = "sd8686_helper.bin", | 76 | .helper = "sd8686_helper.bin", |
77 | .firmware = "sd8686.bin", | 77 | .firmware = "sd8686.bin", |
78 | }, | 78 | }, |
79 | { | 79 | { |
80 | /* 8688 */ | 80 | /* 8688 */ |
81 | .model = 0x10, | 81 | .model = IF_SDIO_MODEL_8688, |
82 | .helper = "sd8688_helper.bin", | 82 | .helper = "sd8688_helper.bin", |
83 | .firmware = "sd8688.bin", | 83 | .firmware = "sd8688.bin", |
84 | }, | 84 | }, |
@@ -118,7 +118,7 @@ static u16 if_sdio_read_scratch(struct if_sdio_card *card, int *err) | |||
118 | int ret, reg; | 118 | int ret, reg; |
119 | u16 scratch; | 119 | u16 scratch; |
120 | 120 | ||
121 | if (card->model == 0x04) | 121 | if (card->model == IF_SDIO_MODEL_8385) |
122 | reg = IF_SDIO_SCRATCH_OLD; | 122 | reg = IF_SDIO_SCRATCH_OLD; |
123 | else | 123 | else |
124 | reg = IF_SDIO_SCRATCH; | 124 | reg = IF_SDIO_SCRATCH; |
@@ -216,7 +216,7 @@ static int if_sdio_handle_event(struct if_sdio_card *card, | |||
216 | 216 | ||
217 | lbs_deb_enter(LBS_DEB_SDIO); | 217 | lbs_deb_enter(LBS_DEB_SDIO); |
218 | 218 | ||
219 | if (card->model == 0x04) { | 219 | if (card->model == IF_SDIO_MODEL_8385) { |
220 | event = sdio_readb(card->func, IF_SDIO_EVENT, &ret); | 220 | event = sdio_readb(card->func, IF_SDIO_EVENT, &ret); |
221 | if (ret) | 221 | if (ret) |
222 | goto out; | 222 | goto out; |
@@ -829,10 +829,10 @@ static int if_sdio_probe(struct sdio_func *func, | |||
829 | if (sscanf(func->card->info[i], | 829 | if (sscanf(func->card->info[i], |
830 | "ID: %x", &model) == 1) | 830 | "ID: %x", &model) == 1) |
831 | break; | 831 | break; |
832 | if (!strcmp(func->card->info[i], "IBIS Wireless SDIO Card")) { | 832 | if (!strcmp(func->card->info[i], "IBIS Wireless SDIO Card")) { |
833 | model = 4; | 833 | model = IF_SDIO_MODEL_8385; |
834 | break; | 834 | break; |
835 | } | 835 | } |
836 | } | 836 | } |
837 | 837 | ||
838 | if (i == func->card->num_info) { | 838 | 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 37ada2c29aa9..cea343f9afd1 100644 --- a/drivers/net/wireless/libertas/if_sdio.h +++ b/drivers/net/wireless/libertas/if_sdio.h | |||
@@ -12,6 +12,10 @@ | |||
12 | #ifndef _LBS_IF_SDIO_H | 12 | #ifndef _LBS_IF_SDIO_H |
13 | #define _LBS_IF_SDIO_H | 13 | #define _LBS_IF_SDIO_H |
14 | 14 | ||
15 | #define IF_SDIO_MODEL_8385 0x04 | ||
16 | #define IF_SDIO_MODEL_8686 0x0b | ||
17 | #define IF_SDIO_MODEL_8688 0x10 | ||
18 | |||
15 | #define IF_SDIO_IOPORT 0x00 | 19 | #define IF_SDIO_IOPORT 0x00 |
16 | 20 | ||
17 | #define IF_SDIO_H_INT_MASK 0x04 | 21 | #define IF_SDIO_H_INT_MASK 0x04 |