aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:20:49 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:20:49 -0500
commitefe0397eef544ac4bcca23d39aa8d5db154952e0 (patch)
tree25418872f1a813d3fd15237dad67797d93aa8ad3 /include
parentae86afaee6a1c77c7a06d81dcc3bf872204d3bec (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 'include')
-rw-r--r--include/linux/ide.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index f5382ad0bd4c..8b74ccdd221c 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -588,7 +588,6 @@ struct ide_drive_s {
588 struct request_queue *queue; /* request queue */ 588 struct request_queue *queue; /* request queue */
589 589
590 struct request *rq; /* current request */ 590 struct request *rq; /* current request */
591 struct ide_drive_s *next; /* circular list of hwgroup drives */
592 void *driver_data; /* extra driver data */ 591 void *driver_data; /* extra driver data */
593 u16 *id; /* identification info */ 592 u16 *id; /* identification info */
594#ifdef CONFIG_IDE_PROC_FS 593#ifdef CONFIG_IDE_PROC_FS
@@ -750,7 +749,6 @@ struct ide_dma_ops {
750struct ide_host; 749struct ide_host;
751 750
752typedef struct hwif_s { 751typedef struct hwif_s {
753 struct hwif_s *next; /* for linked-list in ide_hwgroup_t */
754 struct hwif_s *mate; /* other hwif from same PCI chip */ 752 struct hwif_s *mate; /* other hwif from same PCI chip */
755 struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ 753 struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */
756 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ 754 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
@@ -874,9 +872,7 @@ typedef struct hwgroup_s {
874 unsigned int polling : 1; 872 unsigned int polling : 1;
875 873
876 /* current drive */ 874 /* current drive */
877 ide_drive_t *drive; 875 ide_drive_t *cur_dev;
878 /* ptr to current hwif in linked-list */
879 ide_hwif_t *hwif;
880 876
881 /* current request */ 877 /* current request */
882 struct request *rq; 878 struct request *rq;
@@ -892,6 +888,8 @@ typedef struct hwgroup_s {
892 int req_gen_timer; 888 int req_gen_timer;
893 889
894 spinlock_t lock; 890 spinlock_t lock;
891
892 int port_count;
895} ide_hwgroup_t; 893} ide_hwgroup_t;
896 894
897typedef struct ide_driver_s ide_driver_t; 895typedef struct ide_driver_s ide_driver_t;
@@ -1622,12 +1620,7 @@ extern struct mutex ide_cfg_mtx;
1622/* 1620/*
1623 * Structure locking: 1621 * Structure locking:
1624 * 1622 *
1625 * ide_cfg_mtx and hwgroup->lock together protect changes to
1626 * ide_hwif_t->next
1627 * ide_drive_t->next
1628 *
1629 * ide_hwgroup_t->busy: hwgroup->lock 1623 * ide_hwgroup_t->busy: hwgroup->lock
1630 * ide_hwgroup_t->hwif: hwgroup->lock
1631 * ide_hwif_t->{hwgroup,mate}: constant, no locking 1624 * ide_hwif_t->{hwgroup,mate}: constant, no locking
1632 * ide_drive_t->hwif: constant, no locking 1625 * ide_drive_t->hwif: constant, no locking
1633 */ 1626 */