diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:46 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:46 -0400 |
commit | 60c0cd02b254805691cdc61101ada6af7bd56fde (patch) | |
tree | 1b600eb9f22034824bf21377041f470c09af09c7 /drivers/ide/ide-iops.c | |
parent | b788ee9c6561fd9219a503216284d61036a0dc0b (diff) |
ide: set hwif->expiry prior to calling [__]ide_set_handler()
* Set hwif->expiry prior to calling [__]ide_set_handler()
and drop 'expiry' argument.
* Set hwif->expiry to NULL in ide_{timer_expiry,intr}()
and remove 'hwif->expiry = NULL' assignments.
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index c3023de7270c..916495ba45df 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -425,26 +425,25 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
425 | * See also ide_execute_command | 425 | * See also ide_execute_command |
426 | */ | 426 | */ |
427 | void __ide_set_handler(ide_drive_t *drive, ide_handler_t *handler, | 427 | void __ide_set_handler(ide_drive_t *drive, ide_handler_t *handler, |
428 | unsigned int timeout, ide_expiry_t *expiry) | 428 | unsigned int timeout) |
429 | { | 429 | { |
430 | ide_hwif_t *hwif = drive->hwif; | 430 | ide_hwif_t *hwif = drive->hwif; |
431 | 431 | ||
432 | BUG_ON(hwif->handler); | 432 | BUG_ON(hwif->handler); |
433 | hwif->handler = handler; | 433 | hwif->handler = handler; |
434 | hwif->expiry = expiry; | ||
435 | hwif->timer.expires = jiffies + timeout; | 434 | hwif->timer.expires = jiffies + timeout; |
436 | hwif->req_gen_timer = hwif->req_gen; | 435 | hwif->req_gen_timer = hwif->req_gen; |
437 | add_timer(&hwif->timer); | 436 | add_timer(&hwif->timer); |
438 | } | 437 | } |
439 | 438 | ||
440 | void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, | 439 | void ide_set_handler(ide_drive_t *drive, ide_handler_t *handler, |
441 | unsigned int timeout, ide_expiry_t *expiry) | 440 | unsigned int timeout) |
442 | { | 441 | { |
443 | ide_hwif_t *hwif = drive->hwif; | 442 | ide_hwif_t *hwif = drive->hwif; |
444 | unsigned long flags; | 443 | unsigned long flags; |
445 | 444 | ||
446 | spin_lock_irqsave(&hwif->lock, flags); | 445 | spin_lock_irqsave(&hwif->lock, flags); |
447 | __ide_set_handler(drive, handler, timeout, expiry); | 446 | __ide_set_handler(drive, handler, timeout); |
448 | spin_unlock_irqrestore(&hwif->lock, flags); | 447 | spin_unlock_irqrestore(&hwif->lock, flags); |
449 | } | 448 | } |
450 | EXPORT_SYMBOL(ide_set_handler); | 449 | EXPORT_SYMBOL(ide_set_handler); |
@@ -469,8 +468,10 @@ void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler, | |||
469 | ide_hwif_t *hwif = drive->hwif; | 468 | ide_hwif_t *hwif = drive->hwif; |
470 | unsigned long flags; | 469 | unsigned long flags; |
471 | 470 | ||
471 | hwif->expiry = expiry; | ||
472 | |||
472 | spin_lock_irqsave(&hwif->lock, flags); | 473 | spin_lock_irqsave(&hwif->lock, flags); |
473 | __ide_set_handler(drive, handler, timeout, expiry); | 474 | __ide_set_handler(drive, handler, timeout); |
474 | hwif->tp_ops->exec_command(hwif, cmd); | 475 | hwif->tp_ops->exec_command(hwif, cmd); |
475 | /* | 476 | /* |
476 | * Drive takes 400nS to respond, we must avoid the IRQ being | 477 | * Drive takes 400nS to respond, we must avoid the IRQ being |