diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 20:00:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 20:00:50 -0500 |
commit | 59e3af21e94bd56f6a31ba774786a2bfc753581b (patch) | |
tree | ce535150d8edd5648a6fc81fdc2387a6813b7e08 /drivers/ide/ide-proc.c | |
parent | f59abb161c955b68fd3d473368420c5919733e09 (diff) | |
parent | c2ce5ca047ff6bbc41d491451c39e597c4537cd3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (41 commits)
scc_pata: make use of scc_dma_sff_read_status()
ide-dma-sff: factor out ide_dma_sff_write_status()
ide: move read_sff_dma_status() method to 'struct ide_dma_ops'
ide: don't set hwif->dma_ops in init_dma() method
Resurrect IT8172 IDE controller driver
piix: sync ich_laptop[] with ata_piix.c
ide: update warm-plug HOWTO
ide: fix ide_port_scan() to do ACPI setup after initializing request queues
ide: remove now redundant ->cur_dev checks
ide: remove unused ide_hwif_t.sg_mapped field
ide: struct ide_atapi_pc - remove unused fields and update documentation
ide: remove superfluous hwif variable assignment from ide_timer_expiry()
ide: use ide_pci_is_in_compatibility_mode() helper in setup-pci.c
ide: make "paranoia" ->handler check in ide_intr() more strict
ide-cd: convert to ide-atapi facilities
ide-cd: start DMA before sending the actual packet command
ide-cd: wait for DRQ to get set per default
ide: Fix drive's DWORD-IO handling
ide: add port and host iterators
ide: dynamic allocation of device structures
...
Diffstat (limited to 'drivers/ide/ide-proc.c')
-rw-r--r-- | drivers/ide/ide-proc.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index a14e2938e4f3..1d8978b3314a 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -439,13 +439,13 @@ static int proc_ide_read_dmodel | |||
439 | static int proc_ide_read_driver | 439 | static int proc_ide_read_driver |
440 | (char *page, char **start, off_t off, int count, int *eof, void *data) | 440 | (char *page, char **start, off_t off, int count, int *eof, void *data) |
441 | { | 441 | { |
442 | ide_drive_t *drive = (ide_drive_t *) data; | 442 | ide_drive_t *drive = (ide_drive_t *)data; |
443 | struct device *dev = &drive->gendev; | 443 | struct device *dev = &drive->gendev; |
444 | ide_driver_t *ide_drv; | 444 | struct ide_driver *ide_drv; |
445 | int len; | 445 | int len; |
446 | 446 | ||
447 | if (dev->driver) { | 447 | if (dev->driver) { |
448 | ide_drv = container_of(dev->driver, ide_driver_t, gen_driver); | 448 | ide_drv = to_ide_driver(dev->driver); |
449 | len = sprintf(page, "%s version %s\n", | 449 | len = sprintf(page, "%s version %s\n", |
450 | dev->driver->name, ide_drv->version); | 450 | dev->driver->name, ide_drv->version); |
451 | } else | 451 | } else |
@@ -555,7 +555,7 @@ static void ide_remove_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t | |||
555 | } | 555 | } |
556 | } | 556 | } |
557 | 557 | ||
558 | void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) | 558 | void ide_proc_register_driver(ide_drive_t *drive, struct ide_driver *driver) |
559 | { | 559 | { |
560 | mutex_lock(&ide_setting_mtx); | 560 | mutex_lock(&ide_setting_mtx); |
561 | drive->settings = driver->proc_devsets(drive); | 561 | drive->settings = driver->proc_devsets(drive); |
@@ -577,7 +577,7 @@ EXPORT_SYMBOL(ide_proc_register_driver); | |||
577 | * Takes ide_setting_mtx. | 577 | * Takes ide_setting_mtx. |
578 | */ | 578 | */ |
579 | 579 | ||
580 | void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) | 580 | void ide_proc_unregister_driver(ide_drive_t *drive, struct ide_driver *driver) |
581 | { | 581 | { |
582 | ide_remove_proc_entries(drive->proc, driver->proc_entries(drive)); | 582 | ide_remove_proc_entries(drive->proc, driver->proc_entries(drive)); |
583 | 583 | ||
@@ -593,14 +593,13 @@ EXPORT_SYMBOL(ide_proc_unregister_driver); | |||
593 | 593 | ||
594 | void ide_proc_port_register_devices(ide_hwif_t *hwif) | 594 | void ide_proc_port_register_devices(ide_hwif_t *hwif) |
595 | { | 595 | { |
596 | int d; | ||
597 | struct proc_dir_entry *ent; | 596 | struct proc_dir_entry *ent; |
598 | struct proc_dir_entry *parent = hwif->proc; | 597 | struct proc_dir_entry *parent = hwif->proc; |
598 | ide_drive_t *drive; | ||
599 | char name[64]; | 599 | char name[64]; |
600 | int i; | ||
600 | 601 | ||
601 | for (d = 0; d < MAX_DRIVES; d++) { | 602 | ide_port_for_each_dev(i, drive, hwif) { |
602 | ide_drive_t *drive = &hwif->drives[d]; | ||
603 | |||
604 | if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0 || drive->proc) | 603 | if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0 || drive->proc) |
605 | continue; | 604 | continue; |
606 | 605 | ||
@@ -653,7 +652,7 @@ void ide_proc_unregister_port(ide_hwif_t *hwif) | |||
653 | 652 | ||
654 | static int proc_print_driver(struct device_driver *drv, void *data) | 653 | static int proc_print_driver(struct device_driver *drv, void *data) |
655 | { | 654 | { |
656 | ide_driver_t *ide_drv = container_of(drv, ide_driver_t, gen_driver); | 655 | struct ide_driver *ide_drv = to_ide_driver(drv); |
657 | struct seq_file *s = data; | 656 | struct seq_file *s = data; |
658 | 657 | ||
659 | seq_printf(s, "%s version %s\n", drv->name, ide_drv->version); | 658 | seq_printf(s, "%s version %s\n", drv->name, ide_drv->version); |