]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: complete power step in ide_complete_pm_request()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:29 +0000 (12:46 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:29 +0000 (12:46 +0100)
* Complete power step in ide_complete_pm_request().

* Rename ide_complete_pm_request() to ide_complete_pm_rq().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-io.c
drivers/ide/ide-pm.c
include/linux/ide.h

index 7007c48e27aecfe3cfdbaa74d2e27340d697c354..49b098de367c93f70c75ea3e66df8c7bd1832069 100644 (file)
@@ -178,11 +178,7 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
                                kfree(task);
                }
        } else if (blk_pm_request(rq)) {
-               struct request_pm_state *pm = rq->data;
-
-               ide_complete_power_step(drive, rq);
-               if (pm->pm_step == IDE_PM_COMPLETED)
-                       ide_complete_pm_request(drive, rq);
+               ide_complete_pm_rq(drive, rq);
                return;
        }
 
@@ -438,7 +434,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
                        startstop = ide_start_power_step(drive, rq);
                        if (startstop == ide_stopped &&
                            pm->pm_step == IDE_PM_COMPLETED)
-                               ide_complete_pm_request(drive, rq);
+                               ide_complete_pm_rq(drive, rq);
                        return startstop;
                } else if (!rq->rq_disk && blk_special_request(rq))
                        /*
index 60538d9c84ee17005c4ca1f48a086bdda7be5702..74c7c2bbe0fdf41df69c605049b114cecd410c30 100644 (file)
@@ -169,18 +169,23 @@ out_do_tf:
 }
 
 /**
- *     ide_complete_pm_request - end the current Power Management request
+ *     ide_complete_pm_rq - end the current Power Management request
  *     @drive: target drive
  *     @rq: request
  *
  *     This function cleans up the current PM request and stops the queue
  *     if necessary.
  */
-void ide_complete_pm_request(ide_drive_t *drive, struct request *rq)
+void ide_complete_pm_rq(ide_drive_t *drive, struct request *rq)
 {
        struct request_queue *q = drive->queue;
+       struct request_pm_state *pm = rq->data;
        unsigned long flags;
 
+       ide_complete_power_step(drive, rq);
+       if (pm->pm_step != IDE_PM_COMPLETED)
+               return;
+
 #ifdef DEBUG_PM
        printk("%s: completing PM request, %s\n", drive->name,
               blk_pm_suspend_request(rq) ? "suspend" : "resume");
index 675d4363ece48de903db626ff5084b5489b6733b..c5ac19e43fc02d7ec12404100893863494a679e2 100644 (file)
@@ -1081,7 +1081,7 @@ int generic_ide_resume(struct device *);
 
 void ide_complete_power_step(ide_drive_t *, struct request *);
 ide_startstop_t ide_start_power_step(ide_drive_t *, struct request *);
-void ide_complete_pm_request(ide_drive_t *, struct request *);
+void ide_complete_pm_rq(ide_drive_t *, struct request *);
 void ide_check_pm_state(ide_drive_t *, struct request *);
 
 /*