diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ahb.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ahb.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c index 9cb0efa9b4c0..61956392f2da 100644 --- a/drivers/net/wireless/ath/ath9k/ahb.c +++ b/drivers/net/wireless/ath/ath9k/ahb.c | |||
@@ -21,6 +21,18 @@ | |||
21 | #include <linux/ath9k_platform.h> | 21 | #include <linux/ath9k_platform.h> |
22 | #include "ath9k.h" | 22 | #include "ath9k.h" |
23 | 23 | ||
24 | static const struct platform_device_id ath9k_platform_id_table[] = { | ||
25 | { | ||
26 | .name = "ath9k", | ||
27 | .driver_data = AR5416_AR9100_DEVID, | ||
28 | }, | ||
29 | { | ||
30 | .name = "ar934x_wmac", | ||
31 | .driver_data = AR9300_DEVID_AR9340, | ||
32 | }, | ||
33 | {}, | ||
34 | }; | ||
35 | |||
24 | /* return bus cachesize in 4B word units */ | 36 | /* return bus cachesize in 4B word units */ |
25 | static void ath_ahb_read_cachesize(struct ath_common *common, int *csz) | 37 | static void ath_ahb_read_cachesize(struct ath_common *common, int *csz) |
26 | { | 38 | { |
@@ -57,6 +69,7 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
57 | struct ath_softc *sc; | 69 | struct ath_softc *sc; |
58 | struct ieee80211_hw *hw; | 70 | struct ieee80211_hw *hw; |
59 | struct resource *res; | 71 | struct resource *res; |
72 | const struct platform_device_id *id = platform_get_device_id(pdev); | ||
60 | int irq; | 73 | int irq; |
61 | int ret = 0; | 74 | int ret = 0; |
62 | struct ath_hw *ah; | 75 | struct ath_hw *ah; |
@@ -116,7 +129,7 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
116 | goto err_free_hw; | 129 | goto err_free_hw; |
117 | } | 130 | } |
118 | 131 | ||
119 | ret = ath9k_init_device(AR5416_AR9100_DEVID, sc, 0x0, &ath_ahb_bus_ops); | 132 | ret = ath9k_init_device(id->driver_data, sc, 0x0, &ath_ahb_bus_ops); |
120 | if (ret) { | 133 | if (ret) { |
121 | dev_err(&pdev->dev, "failed to initialize device\n"); | 134 | dev_err(&pdev->dev, "failed to initialize device\n"); |
122 | goto err_irq; | 135 | goto err_irq; |
@@ -165,8 +178,11 @@ static struct platform_driver ath_ahb_driver = { | |||
165 | .name = "ath9k", | 178 | .name = "ath9k", |
166 | .owner = THIS_MODULE, | 179 | .owner = THIS_MODULE, |
167 | }, | 180 | }, |
181 | .id_table = ath9k_platform_id_table, | ||
168 | }; | 182 | }; |
169 | 183 | ||
184 | MODULE_DEVICE_TABLE(platform, ath9k_platform_id_table); | ||
185 | |||
170 | int ath_ahb_init(void) | 186 | int ath_ahb_init(void) |
171 | { | 187 | { |
172 | return platform_driver_register(&ath_ahb_driver); | 188 | return platform_driver_register(&ath_ahb_driver); |