Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d434813641abb5d619224e165f391bf352b202b
Commit:     9d434813641abb5d619224e165f391bf352b202b
Parent:     d5271be6b5601b3749cccd8ee89941d5868b90bf
Author:     Jeff Garzik <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 26 20:31:15 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Fri Oct 26 20:31:15 2007 +0200

    drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings
    
    * We shouldn't bother with dev->current_state, the PCI API functions we
      call manage this for us (and do a far better job at it too).
    
    * Remove pci_set_power_state(dev, PCI_D0) call in resume, as
      pci_enable_device() does the same thing.
    
    * Check pci_enable_device() return value.  If it failed, fail
      the entire resume and avoid programming timings into the [potentially
      dead/asleep] chip.
    
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/pci/sc1200.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index d2c8b55..0a7b320 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -324,17 +324,18 @@ static int sc1200_suspend (struct pci_dev *dev, 
pm_message_t state)
 
        pci_disable_device(dev);
        pci_set_power_state(dev, pci_choose_state(dev, state));
-       dev->current_state = state.event;
        return 0;
 }
 
 static int sc1200_resume (struct pci_dev *dev)
 {
        ide_hwif_t      *hwif = NULL;
+       int             i;
+
+       i = pci_enable_device(dev);
+       if (i)
+               return i;
 
-       pci_set_power_state(dev, PCI_D0);       // bring chip back from sleep 
state
-       dev->current_state = PM_EVENT_ON;
-       pci_enable_device(dev);
        //
        // loop over all interfaces that are part of this pci device:
        //
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to