diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 43fa0f849003..9730b4f8fd26 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -369,8 +369,6 @@ int rt2x00pci_suspend(struct pci_dev *pci_dev, pm_message_t state) | |||
369 | if (retval) | 369 | if (retval) |
370 | return retval; | 370 | return retval; |
371 | 371 | ||
372 | rt2x00pci_free_reg(rt2x00dev); | ||
373 | |||
374 | pci_save_state(pci_dev); | 372 | pci_save_state(pci_dev); |
375 | pci_disable_device(pci_dev); | 373 | pci_disable_device(pci_dev); |
376 | return pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state)); | 374 | return pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state)); |
@@ -381,7 +379,6 @@ int rt2x00pci_resume(struct pci_dev *pci_dev) | |||
381 | { | 379 | { |
382 | struct ieee80211_hw *hw = pci_get_drvdata(pci_dev); | 380 | struct ieee80211_hw *hw = pci_get_drvdata(pci_dev); |
383 | struct rt2x00_dev *rt2x00dev = hw->priv; | 381 | struct rt2x00_dev *rt2x00dev = hw->priv; |
384 | int retval; | ||
385 | 382 | ||
386 | if (pci_set_power_state(pci_dev, PCI_D0) || | 383 | if (pci_set_power_state(pci_dev, PCI_D0) || |
387 | pci_enable_device(pci_dev) || | 384 | pci_enable_device(pci_dev) || |
@@ -390,20 +387,7 @@ int rt2x00pci_resume(struct pci_dev *pci_dev) | |||
390 | return -EIO; | 387 | return -EIO; |
391 | } | 388 | } |
392 | 389 | ||
393 | retval = rt2x00pci_alloc_reg(rt2x00dev); | 390 | return rt2x00lib_resume(rt2x00dev); |
394 | if (retval) | ||
395 | return retval; | ||
396 | |||
397 | retval = rt2x00lib_resume(rt2x00dev); | ||
398 | if (retval) | ||
399 | goto exit_free_reg; | ||
400 | |||
401 | return 0; | ||
402 | |||
403 | exit_free_reg: | ||
404 | rt2x00pci_free_reg(rt2x00dev); | ||
405 | |||
406 | return retval; | ||
407 | } | 391 | } |
408 | EXPORT_SYMBOL_GPL(rt2x00pci_resume); | 392 | EXPORT_SYMBOL_GPL(rt2x00pci_resume); |
409 | #endif /* CONFIG_PM */ | 393 | #endif /* CONFIG_PM */ |