aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:15 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:15 -0400
commit08da591e14cf87247ec09b17c350235157a92fc3 (patch)
treed00a02154071c7013c31bc8dd1d3c12c86d5daca /include/linux/ide.h
parent6cdf6eb357c2681596b7b1672b92396ba82333d4 (diff)
ide: add ide_device_{get,put}() helpers
* Add 'struct ide_host *host' field to ide_hwif_t and set it in ide_host_alloc_all(). * Add ide_device_{get,put}() helpers loosely based on SCSI's scsi_device_{get,put}() ones. * Convert IDE device drivers to use ide_device_{get,put}(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 776c574c964..3eccac0a2a3 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -532,12 +532,16 @@ struct ide_dma_ops {
532 void (*dma_timeout)(struct ide_drive_s *); 532 void (*dma_timeout)(struct ide_drive_s *);
533}; 533};
534 534
535struct ide_host;
536
535typedef struct hwif_s { 537typedef struct hwif_s {
536 struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ 538 struct hwif_s *next; /* for linked-list in ide_hwgroup_t */
537 struct hwif_s *mate; /* other hwif from same PCI chip */ 539 struct hwif_s *mate; /* other hwif from same PCI chip */
538 struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ 540 struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */
539 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ 541 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
540 542
543 struct ide_host *host;
544
541 char name[6]; /* name of interface, eg. "ide0" */ 545 char name[6]; /* name of interface, eg. "ide0" */
542 546
543 struct ide_io_ports io_ports; 547 struct ide_io_ports io_ports;
@@ -876,6 +880,9 @@ struct ide_driver_s {
876 880
877#define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) 881#define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver)
878 882
883int ide_device_get(ide_drive_t *);
884void ide_device_put(ide_drive_t *);
885
879int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); 886int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long);
880 887
881extern int ide_vlb_clk; 888extern int ide_vlb_clk;