Commit 22a4bcc2 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Ben Collins

[PATCH] fix /proc/ide/<hwif> for IDE PCI modules

From: Andrey Borzenkov <arvidjaar@mail.ru>

Also add dummy create_proc_ide_interfaces()
for CONFIG_PROC_FS=n (per Linus' suggestion).
parent 5cdb4c53
...@@ -22,9 +22,8 @@ static int __init ide_generic_init(void) ...@@ -22,9 +22,8 @@ static int __init ide_generic_init(void)
if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET]) if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
ide_release_lock(); /* for atari only */ ide_release_lock(); /* for atari only */
#ifdef CONFIG_PROC_FS
create_proc_ide_interfaces(); create_proc_ide_interfaces();
#endif
return 0; return 0;
} }
......
...@@ -995,9 +995,7 @@ int ide_register_hw (hw_regs_t *hw, ide_hwif_t **hwifp) ...@@ -995,9 +995,7 @@ int ide_register_hw (hw_regs_t *hw, ide_hwif_t **hwifp)
if (!initializing) { if (!initializing) {
probe_hwif_init(hwif); probe_hwif_init(hwif);
#ifdef CONFIG_PROC_FS
create_proc_ide_interfaces(); create_proc_ide_interfaces();
#endif
} }
if (hwifp) if (hwifp)
......
...@@ -749,6 +749,8 @@ void ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *d) ...@@ -749,6 +749,8 @@ void ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *d)
probe_hwif_init(&ide_hwifs[index_list.b.low]); probe_hwif_init(&ide_hwifs[index_list.b.low]);
if ((index_list.b.high & 0xf0) != 0xf0) if ((index_list.b.high & 0xf0) != 0xf0)
probe_hwif_init(&ide_hwifs[index_list.b.high]); probe_hwif_init(&ide_hwifs[index_list.b.high]);
create_proc_ide_interfaces();
} }
EXPORT_SYMBOL_GPL(ide_setup_pci_device); EXPORT_SYMBOL_GPL(ide_setup_pci_device);
...@@ -766,6 +768,8 @@ void ide_setup_pci_devices (struct pci_dev *dev, struct pci_dev *dev2, ide_pci_d ...@@ -766,6 +768,8 @@ void ide_setup_pci_devices (struct pci_dev *dev, struct pci_dev *dev2, ide_pci_d
probe_hwif_init(&ide_hwifs[index_list2.b.low]); probe_hwif_init(&ide_hwifs[index_list2.b.low]);
if ((index_list2.b.high & 0xf0) != 0xf0) if ((index_list2.b.high & 0xf0) != 0xf0)
probe_hwif_init(&ide_hwifs[index_list2.b.high]); probe_hwif_init(&ide_hwifs[index_list2.b.high]);
create_proc_ide_interfaces();
} }
EXPORT_SYMBOL_GPL(ide_setup_pci_devices); EXPORT_SYMBOL_GPL(ide_setup_pci_devices);
......
...@@ -1119,6 +1119,7 @@ void ide_pci_create_host_proc(const char *, get_info_t *); ...@@ -1119,6 +1119,7 @@ void ide_pci_create_host_proc(const char *, get_info_t *);
return len; \ return len; \
} }
#else #else
static inline void create_proc_ide_interfaces(void) { ; }
#define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0; #define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment