diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 9730b4f8fd26..cdd5154bd4c0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -170,7 +170,6 @@ static void rt2x00pci_free_queue_dma(struct rt2x00_dev *rt2x00dev, | |||
170 | 170 | ||
171 | int rt2x00pci_initialize(struct rt2x00_dev *rt2x00dev) | 171 | int rt2x00pci_initialize(struct rt2x00_dev *rt2x00dev) |
172 | { | 172 | { |
173 | struct pci_dev *pci_dev = to_pci_dev(rt2x00dev->dev); | ||
174 | struct data_queue *queue; | 173 | struct data_queue *queue; |
175 | int status; | 174 | int status; |
176 | 175 | ||
@@ -186,11 +185,11 @@ int rt2x00pci_initialize(struct rt2x00_dev *rt2x00dev) | |||
186 | /* | 185 | /* |
187 | * Register interrupt handler. | 186 | * Register interrupt handler. |
188 | */ | 187 | */ |
189 | status = request_irq(pci_dev->irq, rt2x00dev->ops->lib->irq_handler, | 188 | status = request_irq(rt2x00dev->irq, rt2x00dev->ops->lib->irq_handler, |
190 | IRQF_SHARED, pci_name(pci_dev), rt2x00dev); | 189 | IRQF_SHARED, rt2x00dev->name, rt2x00dev); |
191 | if (status) { | 190 | if (status) { |
192 | ERROR(rt2x00dev, "IRQ %d allocation failed (error %d).\n", | 191 | ERROR(rt2x00dev, "IRQ %d allocation failed (error %d).\n", |
193 | pci_dev->irq, status); | 192 | rt2x00dev->irq, status); |
194 | goto exit; | 193 | goto exit; |
195 | } | 194 | } |
196 | 195 | ||
@@ -270,6 +269,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) | |||
270 | struct ieee80211_hw *hw; | 269 | struct ieee80211_hw *hw; |
271 | struct rt2x00_dev *rt2x00dev; | 270 | struct rt2x00_dev *rt2x00dev; |
272 | int retval; | 271 | int retval; |
272 | u16 chip; | ||
273 | 273 | ||
274 | retval = pci_request_regions(pci_dev, pci_name(pci_dev)); | 274 | retval = pci_request_regions(pci_dev, pci_name(pci_dev)); |
275 | if (retval) { | 275 | if (retval) { |
@@ -307,6 +307,14 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) | |||
307 | rt2x00dev->dev = &pci_dev->dev; | 307 | rt2x00dev->dev = &pci_dev->dev; |
308 | rt2x00dev->ops = ops; | 308 | rt2x00dev->ops = ops; |
309 | rt2x00dev->hw = hw; | 309 | rt2x00dev->hw = hw; |
310 | rt2x00dev->irq = pci_dev->irq; | ||
311 | rt2x00dev->name = pci_name(pci_dev); | ||
312 | |||
313 | /* | ||
314 | * Determine RT chipset by reading PCI header. | ||
315 | */ | ||
316 | pci_read_config_word(pci_dev, PCI_DEVICE_ID, &chip); | ||
317 | rt2x00_set_chip_rt(rt2x00dev, chip); | ||
310 | 318 | ||
311 | retval = rt2x00pci_alloc_reg(rt2x00dev); | 319 | retval = rt2x00pci_alloc_reg(rt2x00dev); |
312 | if (retval) | 320 | if (retval) |