diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-02 13:56:46 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-02 13:56:46 -0500 |
commit | 629f944bb18c9deccce89ad833f1211c0036a632 (patch) | |
tree | 998dd4d274aafdca25b8f192eebeb91ad63193fe /drivers | |
parent | 835457def90c86fe84d7729c0531fd551fb14eda (diff) |
ide: use __ide_set_handler() in ide_execute_command()
* Use __ide_set_handler() in ide_execute_command().
While at it:
* Fix whitespace damage in ide_execute_command().
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-iops.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 16b1f6e12781..44689f5cc957 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -882,22 +882,17 @@ void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler, | |||
882 | unsigned long flags; | 882 | unsigned long flags; |
883 | ide_hwgroup_t *hwgroup = HWGROUP(drive); | 883 | ide_hwgroup_t *hwgroup = HWGROUP(drive); |
884 | ide_hwif_t *hwif = HWIF(drive); | 884 | ide_hwif_t *hwif = HWIF(drive); |
885 | 885 | ||
886 | spin_lock_irqsave(&ide_lock, flags); | 886 | spin_lock_irqsave(&ide_lock, flags); |
887 | |||
888 | BUG_ON(hwgroup->handler); | 887 | BUG_ON(hwgroup->handler); |
889 | hwgroup->handler = handler; | 888 | __ide_set_handler(drive, handler, timeout, expiry); |
890 | hwgroup->expiry = expiry; | ||
891 | hwgroup->timer.expires = jiffies + timeout; | ||
892 | hwgroup->req_gen_timer = hwgroup->req_gen; | ||
893 | add_timer(&hwgroup->timer); | ||
894 | hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); | 889 | hwif->OUTBSYNC(drive, cmd, IDE_COMMAND_REG); |
895 | /* Drive takes 400nS to respond, we must avoid the IRQ being | 890 | /* |
896 | serviced before that. | 891 | * Drive takes 400nS to respond, we must avoid the IRQ being |
897 | 892 | * serviced before that. | |
898 | FIXME: we could skip this delay with care on non shared | 893 | * |
899 | devices | 894 | * FIXME: we could skip this delay with care on non shared devices |
900 | */ | 895 | */ |
901 | ndelay(400); | 896 | ndelay(400); |
902 | spin_unlock_irqrestore(&ide_lock, flags); | 897 | spin_unlock_irqrestore(&ide_lock, flags); |
903 | } | 898 | } |