diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 12:46:29 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 12:46:29 +0100 |
commit | 3616b6536a74ff1c56029c17cbb3575c69c0a574 (patch) | |
tree | 531feb15784ea6ae4871c712829ab23cbfb9bbc3 /drivers/ide/ide-pm.c | |
parent | 19710d25d50ae0be05eebe4231ed8918b1092d82 (diff) | |
download | lwn-3616b6536a74ff1c56029c17cbb3575c69c0a574.tar.gz lwn-3616b6536a74ff1c56029c17cbb3575c69c0a574.zip |
ide: complete power step in ide_complete_pm_request()
* 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>
Diffstat (limited to 'drivers/ide/ide-pm.c')
-rw-r--r-- | drivers/ide/ide-pm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index 60538d9c84ee..74c7c2bbe0fd 100644 --- a/drivers/ide/ide-pm.c +++ b/drivers/ide/ide-pm.c @@ -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"); |