Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170605
b: refs/heads/master
c: baee1f3
h: refs/heads/master
i:
  170603: 9219e4f
v: v3
  • Loading branch information
Rafael J. Wysocki authored and John W. Linville committed Oct 7, 2009
1 parent c9bcc73 commit 43f779e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe348cb628e6a78cc1e82fe64404c9a304ed9c12
refs/heads/master: baee1f3caa5a771880144358dd07d32e09ba4dcf
35 changes: 11 additions & 24 deletions trunk/drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,21 +195,21 @@ static int __devinit ath5k_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *id);
static void __devexit ath5k_pci_remove(struct pci_dev *pdev);
#ifdef CONFIG_PM
static int ath5k_pci_suspend(struct pci_dev *pdev,
pm_message_t state);
static int ath5k_pci_resume(struct pci_dev *pdev);
static int ath5k_pci_suspend(struct device *dev);
static int ath5k_pci_resume(struct device *dev);

SIMPLE_DEV_PM_OPS(ath5k_pm_ops, ath5k_pci_suspend, ath5k_pci_resume);
#define ATH5K_PM_OPS (&ath5k_pm_ops)
#else
#define ath5k_pci_suspend NULL
#define ath5k_pci_resume NULL
#define ATH5K_PM_OPS NULL
#endif /* CONFIG_PM */

static struct pci_driver ath5k_pci_driver = {
.name = KBUILD_MODNAME,
.id_table = ath5k_pci_id_table,
.probe = ath5k_pci_probe,
.remove = __devexit_p(ath5k_pci_remove),
.suspend = ath5k_pci_suspend,
.resume = ath5k_pci_resume,
.driver.pm = ATH5K_PM_OPS,
};


Expand Down Expand Up @@ -703,33 +703,20 @@ ath5k_pci_remove(struct pci_dev *pdev)
}

#ifdef CONFIG_PM
static int
ath5k_pci_suspend(struct pci_dev *pdev, pm_message_t state)
static int ath5k_pci_suspend(struct device *dev)
{
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
struct ieee80211_hw *hw = pci_get_drvdata(to_pci_dev(dev));
struct ath5k_softc *sc = hw->priv;

ath5k_led_off(sc);

pci_save_state(pdev);
pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);

return 0;
}

static int
ath5k_pci_resume(struct pci_dev *pdev)
static int ath5k_pci_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
struct ath5k_softc *sc = hw->priv;
int err;

pci_restore_state(pdev);

err = pci_enable_device(pdev);
if (err)
return err;

/*
* Suspend/Resume resets the PCI configuration space, so we have to
Expand Down

0 comments on commit 43f779e

Please sign in to comment.