aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:43 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:43 -0500
commitd9270a3f1d5b6f9de58250e8ecdba4c48c54c20b (patch)
tree777f519f513035c23e36890357e608e0581edcde
parent327617e1da15c3f04bfc50018b0319bd40849022 (diff)
ide: move create_proc_ide_drives() call to ide_device_add_all()
* Un-static create_proc_ide_drives() and call it from ide_device_add_all(). While at it: * Rename create_proc_ide_drives() to ide_proc_port_register_devices(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-probe.c4
-rw-r--r--drivers/ide/ide-proc.c4
-rw-r--r--include/linux/ide.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 1ef293757043..c8d533a1015e 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1453,8 +1453,10 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
1453 1453
1454 hwif = &ide_hwifs[idx[i]]; 1454 hwif = &ide_hwifs[idx[i]];
1455 1455
1456 if (hwif->present) 1456 if (hwif->present) {
1457 ide_proc_register_port(hwif); 1457 ide_proc_register_port(hwif);
1458 ide_proc_port_register_devices(hwif);
1459 }
1458 } 1460 }
1459 1461
1460 return rc; 1462 return rc;
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index c6ed84b84e8b..975c0ff0f438 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -739,7 +739,7 @@ void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver)
739 739
740EXPORT_SYMBOL(ide_proc_unregister_driver); 740EXPORT_SYMBOL(ide_proc_unregister_driver);
741 741
742static void create_proc_ide_drives(ide_hwif_t *hwif) 742void ide_proc_port_register_devices(ide_hwif_t *hwif)
743{ 743{
744 int d; 744 int d;
745 struct proc_dir_entry *ent; 745 struct proc_dir_entry *ent;
@@ -801,8 +801,6 @@ void ide_proc_register_port(ide_hwif_t *hwif)
801 801
802 ide_add_proc_entries(hwif->proc, hwif_entries, hwif); 802 ide_add_proc_entries(hwif->proc, hwif_entries, hwif);
803 } 803 }
804
805 create_proc_ide_drives(hwif);
806} 804}
807 805
808#ifdef CONFIG_BLK_DEV_IDEPCI 806#ifdef CONFIG_BLK_DEV_IDEPCI
diff --git a/include/linux/ide.h b/include/linux/ide.h
index e33e307d9410..70209148ef59 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -715,6 +715,7 @@ typedef struct {
715void proc_ide_create(void); 715void proc_ide_create(void);
716void proc_ide_destroy(void); 716void proc_ide_destroy(void);
717void ide_proc_register_port(ide_hwif_t *); 717void ide_proc_register_port(ide_hwif_t *);
718void ide_proc_port_register_devices(ide_hwif_t *);
718void ide_proc_unregister_port(ide_hwif_t *); 719void ide_proc_unregister_port(ide_hwif_t *);
719void ide_proc_register_driver(ide_drive_t *, ide_driver_t *); 720void ide_proc_register_driver(ide_drive_t *, ide_driver_t *);
720void ide_proc_unregister_driver(ide_drive_t *, ide_driver_t *); 721void ide_proc_unregister_driver(ide_drive_t *, ide_driver_t *);
@@ -747,6 +748,7 @@ void ide_pci_create_host_proc(const char *, get_info_t *);
747static inline void proc_ide_create(void) { ; } 748static inline void proc_ide_create(void) { ; }
748static inline void proc_ide_destroy(void) { ; } 749static inline void proc_ide_destroy(void) { ; }
749static inline void ide_proc_register_port(ide_hwif_t *hwif) { ; } 750static inline void ide_proc_register_port(ide_hwif_t *hwif) { ; }
751static inline void ide_proc_port_register_devices(ide_hwif_t *hwif) { ; }
750static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; } 752static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; }
751static inline void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) { ; } 753static inline void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) { ; }
752static inline void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) { ; } 754static inline void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) { ; }