diff options
Diffstat (limited to 'drivers/ide/ide-park.c')
-rw-r--r-- | drivers/ide/ide-park.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c index 678454ac2483..c875a957596c 100644 --- a/drivers/ide/ide-park.c +++ b/drivers/ide/ide-park.c | |||
@@ -7,22 +7,22 @@ DECLARE_WAIT_QUEUE_HEAD(ide_park_wq); | |||
7 | 7 | ||
8 | static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) | 8 | static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) |
9 | { | 9 | { |
10 | ide_hwgroup_t *hwgroup = drive->hwif->hwgroup; | 10 | ide_hwif_t *hwif = drive->hwif; |
11 | struct request_queue *q = drive->queue; | 11 | struct request_queue *q = drive->queue; |
12 | struct request *rq; | 12 | struct request *rq; |
13 | int rc; | 13 | int rc; |
14 | 14 | ||
15 | timeout += jiffies; | 15 | timeout += jiffies; |
16 | spin_lock_irq(&hwgroup->lock); | 16 | spin_lock_irq(&hwif->lock); |
17 | if (drive->dev_flags & IDE_DFLAG_PARKED) { | 17 | if (drive->dev_flags & IDE_DFLAG_PARKED) { |
18 | int reset_timer = time_before(timeout, drive->sleep); | 18 | int reset_timer = time_before(timeout, drive->sleep); |
19 | int start_queue = 0; | 19 | int start_queue = 0; |
20 | 20 | ||
21 | drive->sleep = timeout; | 21 | drive->sleep = timeout; |
22 | wake_up_all(&ide_park_wq); | 22 | wake_up_all(&ide_park_wq); |
23 | if (reset_timer && del_timer(&hwgroup->timer)) | 23 | if (reset_timer && del_timer(&hwif->timer)) |
24 | start_queue = 1; | 24 | start_queue = 1; |
25 | spin_unlock_irq(&hwgroup->lock); | 25 | spin_unlock_irq(&hwif->lock); |
26 | 26 | ||
27 | if (start_queue) { | 27 | if (start_queue) { |
28 | spin_lock_irq(q->queue_lock); | 28 | spin_lock_irq(q->queue_lock); |
@@ -31,7 +31,7 @@ static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) | |||
31 | } | 31 | } |
32 | return; | 32 | return; |
33 | } | 33 | } |
34 | spin_unlock_irq(&hwgroup->lock); | 34 | spin_unlock_irq(&hwif->lock); |
35 | 35 | ||
36 | rq = blk_get_request(q, READ, __GFP_WAIT); | 36 | rq = blk_get_request(q, READ, __GFP_WAIT); |
37 | rq->cmd[0] = REQ_PARK_HEADS; | 37 | rq->cmd[0] = REQ_PARK_HEADS; |
@@ -64,21 +64,21 @@ ssize_t ide_park_show(struct device *dev, struct device_attribute *attr, | |||
64 | char *buf) | 64 | char *buf) |
65 | { | 65 | { |
66 | ide_drive_t *drive = to_ide_device(dev); | 66 | ide_drive_t *drive = to_ide_device(dev); |
67 | ide_hwgroup_t *hwgroup = drive->hwif->hwgroup; | 67 | ide_hwif_t *hwif = drive->hwif; |
68 | unsigned long now; | 68 | unsigned long now; |
69 | unsigned int msecs; | 69 | unsigned int msecs; |
70 | 70 | ||
71 | if (drive->dev_flags & IDE_DFLAG_NO_UNLOAD) | 71 | if (drive->dev_flags & IDE_DFLAG_NO_UNLOAD) |
72 | return -EOPNOTSUPP; | 72 | return -EOPNOTSUPP; |
73 | 73 | ||
74 | spin_lock_irq(&hwgroup->lock); | 74 | spin_lock_irq(&hwif->lock); |
75 | now = jiffies; | 75 | now = jiffies; |
76 | if (drive->dev_flags & IDE_DFLAG_PARKED && | 76 | if (drive->dev_flags & IDE_DFLAG_PARKED && |
77 | time_after(drive->sleep, now)) | 77 | time_after(drive->sleep, now)) |
78 | msecs = jiffies_to_msecs(drive->sleep - now); | 78 | msecs = jiffies_to_msecs(drive->sleep - now); |
79 | else | 79 | else |
80 | msecs = 0; | 80 | msecs = 0; |
81 | spin_unlock_irq(&hwgroup->lock); | 81 | spin_unlock_irq(&hwif->lock); |
82 | 82 | ||
83 | return snprintf(buf, 20, "%u\n", msecs); | 83 | return snprintf(buf, 20, "%u\n", msecs); |
84 | } | 84 | } |