diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:49 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:49 -0500 |
commit | efe0397eef544ac4bcca23d39aa8d5db154952e0 (patch) | |
tree | 25418872f1a813d3fd15237dad67797d93aa8ad3 /drivers/ide/ide-io.c | |
parent | ae86afaee6a1c77c7a06d81dcc3bf872204d3bec (diff) |
ide: remove hwgroup->hwif and {drive,hwif}->next
* Add 'int port_count' field to ide_hwgroup_t to keep the track
of the number of ports in the hwgroup. Then update init_irq()
and ide_remove_port_from_hwgroup() to use it.
* Remove no longer needed hwgroup->hwif, {drive,hwif}->next,
ide_add_drive_to_hwgroup() and ide_remove_drive_from_hwgroup()
(hwgroup->drive now only denotes the currently active device
in the hwgroup).
* Update locking documentation in <linux/ide.h>.
While at it:
* Rename ->drive field in ide_hwgroup_t to ->cur_dev.
* Use __func__ in ide_timer_expiry().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 1fc739f44154..4ce793c05629 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -742,12 +742,12 @@ repeat: | |||
742 | * set nIEN for previous port, drives in the | 742 | * set nIEN for previous port, drives in the |
743 | * quirk_list may not like intr setups/cleanups | 743 | * quirk_list may not like intr setups/cleanups |
744 | */ | 744 | */ |
745 | if (prev_port && hwgroup->drive->quirk_list == 0) | 745 | if (prev_port && hwgroup->cur_dev->quirk_list == 0) |
746 | prev_port->tp_ops->set_irq(prev_port, 0); | 746 | prev_port->tp_ops->set_irq(prev_port, 0); |
747 | 747 | ||
748 | hwif->host->cur_port = hwif; | 748 | hwif->host->cur_port = hwif; |
749 | } | 749 | } |
750 | hwgroup->drive = drive; | 750 | hwgroup->cur_dev = drive; |
751 | drive->dev_flags &= ~(IDE_DFLAG_SLEEPING | IDE_DFLAG_PARKED); | 751 | drive->dev_flags &= ~(IDE_DFLAG_SLEEPING | IDE_DFLAG_PARKED); |
752 | 752 | ||
753 | spin_unlock_irq(&hwgroup->lock); | 753 | spin_unlock_irq(&hwgroup->lock); |
@@ -913,9 +913,9 @@ void ide_timer_expiry (unsigned long data) | |||
913 | * Either way, we don't really want to complain about anything. | 913 | * Either way, we don't really want to complain about anything. |
914 | */ | 914 | */ |
915 | } else { | 915 | } else { |
916 | drive = hwgroup->drive; | 916 | drive = hwgroup->cur_dev; |
917 | if (!drive) { | 917 | if (!drive) { |
918 | printk(KERN_ERR "ide_timer_expiry: hwgroup->drive was NULL\n"); | 918 | printk(KERN_ERR "%s: ->cur_dev was NULL\n", __func__); |
919 | hwgroup->handler = NULL; | 919 | hwgroup->handler = NULL; |
920 | } else { | 920 | } else { |
921 | ide_hwif_t *hwif; | 921 | ide_hwif_t *hwif; |
@@ -1033,7 +1033,7 @@ static void unexpected_intr(int irq, ide_hwif_t *hwif) | |||
1033 | * places | 1033 | * places |
1034 | * | 1034 | * |
1035 | * hwif is the interface in the group currently performing | 1035 | * hwif is the interface in the group currently performing |
1036 | * a command. hwgroup->drive is the drive and hwgroup->handler is | 1036 | * a command. hwgroup->cur_dev is the drive and hwgroup->handler is |
1037 | * the IRQ handler to call. As we issue a command the handlers | 1037 | * the IRQ handler to call. As we issue a command the handlers |
1038 | * step through multiple states, reassigning the handler to the | 1038 | * step through multiple states, reassigning the handler to the |
1039 | * next step in the process. Unlike a smart SCSI controller IDE | 1039 | * next step in the process. Unlike a smart SCSI controller IDE |
@@ -1105,7 +1105,7 @@ irqreturn_t ide_intr (int irq, void *dev_id) | |||
1105 | goto out; | 1105 | goto out; |
1106 | } | 1106 | } |
1107 | 1107 | ||
1108 | drive = hwgroup->drive; | 1108 | drive = hwgroup->cur_dev; |
1109 | if (!drive) { | 1109 | if (!drive) { |
1110 | /* | 1110 | /* |
1111 | * This should NEVER happen, and there isn't much | 1111 | * This should NEVER happen, and there isn't much |