diff options
Diffstat (limited to 'drivers/net/wireless/b43/pcmcia.c')
-rw-r--r-- | drivers/net/wireless/b43/pcmcia.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index dfbc41d431ff..2c8461dcf1b0 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c | |||
@@ -26,14 +26,13 @@ | |||
26 | #include <linux/ssb/ssb.h> | 26 | #include <linux/ssb/ssb.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | 28 | ||
29 | #include <pcmcia/cs.h> | ||
30 | #include <pcmcia/cistpl.h> | 29 | #include <pcmcia/cistpl.h> |
31 | #include <pcmcia/ciscode.h> | 30 | #include <pcmcia/ciscode.h> |
32 | #include <pcmcia/ds.h> | 31 | #include <pcmcia/ds.h> |
33 | #include <pcmcia/cisreg.h> | 32 | #include <pcmcia/cisreg.h> |
34 | 33 | ||
35 | 34 | ||
36 | static /*const */ struct pcmcia_device_id b43_pcmcia_tbl[] = { | 35 | static const struct pcmcia_device_id b43_pcmcia_tbl[] = { |
37 | PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x448), | 36 | PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x448), |
38 | PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x476), | 37 | PCMCIA_DEVICE_MANF_CARD(0x2D0, 0x476), |
39 | PCMCIA_DEVICE_NULL, | 38 | PCMCIA_DEVICE_NULL, |
@@ -63,7 +62,6 @@ static int b43_pcmcia_resume(struct pcmcia_device *dev) | |||
63 | static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | 62 | static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) |
64 | { | 63 | { |
65 | struct ssb_bus *ssb; | 64 | struct ssb_bus *ssb; |
66 | win_req_t win; | ||
67 | int err = -ENOMEM; | 65 | int err = -ENOMEM; |
68 | int res = 0; | 66 | int res = 0; |
69 | 67 | ||
@@ -73,30 +71,28 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
73 | 71 | ||
74 | err = -ENODEV; | 72 | err = -ENODEV; |
75 | 73 | ||
76 | dev->conf.Attributes = CONF_ENABLE_IRQ; | 74 | dev->config_flags |= CONF_ENABLE_IRQ; |
77 | dev->conf.IntType = INT_MEMORY_AND_IO; | ||
78 | 75 | ||
79 | win.Attributes = WIN_ENABLE | WIN_DATA_WIDTH_16 | | 76 | dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 | |
80 | WIN_USE_WAIT; | 77 | WIN_USE_WAIT; |
81 | win.Base = 0; | 78 | dev->resource[2]->start = 0; |
82 | win.Size = SSB_CORE_SIZE; | 79 | dev->resource[2]->end = SSB_CORE_SIZE; |
83 | win.AccessSpeed = 250; | 80 | res = pcmcia_request_window(dev, dev->resource[2], 250); |
84 | res = pcmcia_request_window(dev, &win, &dev->win); | ||
85 | if (res != 0) | 81 | if (res != 0) |
86 | goto err_kfree_ssb; | 82 | goto err_kfree_ssb; |
87 | 83 | ||
88 | res = pcmcia_map_mem_page(dev, dev->win, 0); | 84 | res = pcmcia_map_mem_page(dev, dev->resource[2], 0); |
89 | if (res != 0) | 85 | if (res != 0) |
90 | goto err_disable; | 86 | goto err_disable; |
91 | 87 | ||
92 | if (!dev->irq) | 88 | if (!dev->irq) |
93 | goto err_disable; | 89 | goto err_disable; |
94 | 90 | ||
95 | res = pcmcia_request_configuration(dev, &dev->conf); | 91 | res = pcmcia_enable_device(dev); |
96 | if (res != 0) | 92 | if (res != 0) |
97 | goto err_disable; | 93 | goto err_disable; |
98 | 94 | ||
99 | err = ssb_bus_pcmciabus_register(ssb, dev, win.Base); | 95 | err = ssb_bus_pcmciabus_register(ssb, dev, dev->resource[2]->start); |
100 | if (err) | 96 | if (err) |
101 | goto err_disable; | 97 | goto err_disable; |
102 | dev->priv = ssb; | 98 | dev->priv = ssb; |
@@ -125,9 +121,7 @@ static void __devexit b43_pcmcia_remove(struct pcmcia_device *dev) | |||
125 | 121 | ||
126 | static struct pcmcia_driver b43_pcmcia_driver = { | 122 | static struct pcmcia_driver b43_pcmcia_driver = { |
127 | .owner = THIS_MODULE, | 123 | .owner = THIS_MODULE, |
128 | .drv = { | 124 | .name = "b43-pcmcia", |
129 | .name = "b43-pcmcia", | ||
130 | }, | ||
131 | .id_table = b43_pcmcia_tbl, | 125 | .id_table = b43_pcmcia_tbl, |
132 | .probe = b43_pcmcia_probe, | 126 | .probe = b43_pcmcia_probe, |
133 | .remove = __devexit_p(b43_pcmcia_remove), | 127 | .remove = __devexit_p(b43_pcmcia_remove), |