diff options
author | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-08 01:45:47 -0400 |
commit | 64e47488c913ac704d465a6af86a26786d1412a5 (patch) | |
tree | d3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /drivers/net/irda/vlsi_ir.c | |
parent | 4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'drivers/net/irda/vlsi_ir.c')
-rw-r--r-- | drivers/net/irda/vlsi_ir.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index 006e4f575606..6d9de626c967 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c @@ -1749,11 +1749,6 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) struct net_device *ndev = pci_get_drvdata(pdev); vlsi_irda_dev_t *idev; - if (state < 1 || state > 3 ) { - IRDA_ERROR("%s - %s: invalid pm state request: %u\n", - __FUNCTION__, PCIDEV_NAME(pdev), state); - return 0; - } if (!ndev) { IRDA_ERROR("%s - %s: no netdevice \n", __FUNCTION__, PCIDEV_NAME(pdev)); @@ -1762,12 +1757,12 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) idev = ndev->priv; down(&idev->sem); if (pdev->current_state != 0) { /* already suspended */ - if (state > pdev->current_state) { /* simply go deeper */ - pci_set_power_state(pdev,state); - pdev->current_state = state; + if (state.event > pdev->current_state) { /* simply go deeper */ + pci_set_power_state(pdev, pci_choose_state(pdev, state)); + pdev->current_state = state.event; } else - IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state); + IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state.event); up(&idev->sem); return 0; } @@ -1781,8 +1776,8 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) idev->new_baud = idev->baud; } - pci_set_power_state(pdev,state); - pdev->current_state = state; + pci_set_power_state(pdev, pci_choose_state(pdev, state)); + pdev->current_state = state.event; idev->resume_ok = 1; up(&idev->sem); return 0; @@ -1807,8 +1802,8 @@ static int vlsi_irda_resume(struct pci_dev *pdev) return 0; } - pci_set_power_state(pdev, 0); - pdev->current_state = 0; + pci_set_power_state(pdev, PCI_D0); + pdev->current_state = PM_EVENT_ON; if (!idev->resume_ok) { /* should be obsolete now - but used to happen due to: |