aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-09 18:01:11 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-09 18:01:11 -0400
commit5cbf79cdb37be2aa2a1b4fa94144526b14557060 (patch)
tree1fcfbc1248b9904e5890cc593f018ee0a8a53238 /drivers/ide/ide.c
parent869c56ee9de1b72cd3f8ab9cdfbd3601e55c61f2 (diff)
ide: add ide_proc_register_port()
* create_proc_ide_interfaces() tries to add /proc entries for every probed and initialized IDE port, replace it by ide_proc_register_port() which does it only for the given port (also rename destroy_proc_ide_interface() to ide_proc_unregister_port() for consistency) * convert {create,destroy}_proc_ide_interface[s]() users to use new functions * pmac driver depended on proc_ide_create() to add /proc port entries, fix it * au1xxx-ide, swarm and cs5520 drivers depended indirectly on ide-generic driver (CONFIG_IDE_GENERIC=y) to add port /proc entries, fix them * there is now no need to add /proc entries for IDE ports in proc_ide_create() so don't do it * proc_ide_create() needs now to be called before drivers are probed - fix it, while at it make proc_ide_create() create /proc "ide" directory Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 0fc532850bbe..038f2610e734 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -347,10 +347,6 @@ static int ide_system_bus_speed(void)
347 return system_bus_speed; 347 return system_bus_speed;
348} 348}
349 349
350#ifdef CONFIG_IDE_PROC_FS
351struct proc_dir_entry *proc_ide_root;
352#endif
353
354static struct resource* hwif_request_region(ide_hwif_t *hwif, 350static struct resource* hwif_request_region(ide_hwif_t *hwif,
355 unsigned long addr, int num) 351 unsigned long addr, int num)
356{ 352{
@@ -594,7 +590,7 @@ void ide_unregister(unsigned int index)
594 590
595 spin_unlock_irq(&ide_lock); 591 spin_unlock_irq(&ide_lock);
596 592
597 destroy_proc_ide_interface(hwif); 593 ide_proc_unregister_port(hwif);
598 594
599 hwgroup = hwif->hwgroup; 595 hwgroup = hwif->hwgroup;
600 /* 596 /*
@@ -799,7 +795,7 @@ found:
799 795
800 if (!initializing) { 796 if (!initializing) {
801 probe_hwif_init_with_fixup(hwif, fixup); 797 probe_hwif_init_with_fixup(hwif, fixup);
802 create_proc_ide_interfaces(); 798 ide_proc_register_port(hwif);
803 } 799 }
804 800
805 if (hwifp) 801 if (hwifp)
@@ -1794,9 +1790,7 @@ static int __init ide_init(void)
1794 1790
1795 init_ide_data(); 1791 init_ide_data();
1796 1792
1797#ifdef CONFIG_IDE_PROC_FS 1793 proc_ide_create();
1798 proc_ide_root = proc_mkdir("ide", NULL);
1799#endif
1800 1794
1801#ifdef CONFIG_BLK_DEV_ALI14XX 1795#ifdef CONFIG_BLK_DEV_ALI14XX
1802 if (probe_ali14xx) 1796 if (probe_ali14xx)
@@ -1822,8 +1816,6 @@ static int __init ide_init(void)
1822 /* Probe for special PCI and other "known" interface chipsets. */ 1816 /* Probe for special PCI and other "known" interface chipsets. */
1823 probe_for_hwifs(); 1817 probe_for_hwifs();
1824 1818
1825 proc_ide_create();
1826
1827 return 0; 1819 return 0;
1828} 1820}
1829 1821