]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix /proc/ide/<chipset> for IDE PCI modules
authorBartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl>
Thu, 19 Feb 2004 13:43:37 +0000 (05:43 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 19 Feb 2004 13:43:37 +0000 (05:43 -0800)
Make IDE PCI drivers register /proc/ide/<chipset> entries themselves.

39 files changed:
drivers/ide/ide-proc.c
drivers/ide/ide.c
drivers/ide/pci/aec62xx.c
drivers/ide/pci/aec62xx.h
drivers/ide/pci/alim15x3.c
drivers/ide/pci/alim15x3.h
drivers/ide/pci/amd74xx.c
drivers/ide/pci/amd74xx.h
drivers/ide/pci/cmd64x.c
drivers/ide/pci/cmd64x.h
drivers/ide/pci/cs5520.c
drivers/ide/pci/cs5520.h
drivers/ide/pci/cs5530.c
drivers/ide/pci/cs5530.h
drivers/ide/pci/hpt34x.c
drivers/ide/pci/hpt34x.h
drivers/ide/pci/hpt366.c
drivers/ide/pci/hpt366.h
drivers/ide/pci/pdc202xx_new.c
drivers/ide/pci/pdc202xx_new.h
drivers/ide/pci/pdc202xx_old.c
drivers/ide/pci/pdc202xx_old.h
drivers/ide/pci/piix.c
drivers/ide/pci/piix.h
drivers/ide/pci/sc1200.c
drivers/ide/pci/sc1200.h
drivers/ide/pci/serverworks.c
drivers/ide/pci/serverworks.h
drivers/ide/pci/siimage.c
drivers/ide/pci/siimage.h
drivers/ide/pci/sis5513.c
drivers/ide/pci/sis5513.h
drivers/ide/pci/slc90e66.c
drivers/ide/pci/slc90e66.h
drivers/ide/pci/triflex.c
drivers/ide/pci/triflex.h
drivers/ide/pci/via82cxxx.c
drivers/ide/pci/via82cxxx.h
include/linux/ide.h

index 323eeb79f0eb5aae893859b8fea1bb8f731025bf..8f52e4a11401885c5d426f5013f02ccaa8c545da 100644 (file)
@@ -109,17 +109,6 @@ static int xx_xx_parse_error (const char *data, unsigned long len, const char *m
        return -EINVAL;
 }
 
-static struct proc_dir_entry * proc_ide_root = NULL;
-
-#ifdef CONFIG_BLK_DEV_IDEPCI
-#include <linux/delay.h>
-/*
- * This is the list of registered PCI chipset driver data structures.
- */
-static ide_pci_host_proc_t * ide_pci_host_proc_list;
-
-#endif /* CONFIG_BLK_DEV_IDEPCI */
-
 static int proc_ide_write_config
        (struct file *file, const char *buffer, unsigned long count, void *data)
 {
@@ -787,27 +776,16 @@ void create_proc_ide_interfaces(void)
        }
 }
 
+EXPORT_SYMBOL(create_proc_ide_interfaces);
+
 #ifdef CONFIG_BLK_DEV_IDEPCI
-void ide_pci_register_host_proc (ide_pci_host_proc_t *p)
+void ide_pci_create_host_proc(const char *name, get_info_t *get_info)
 {
-       ide_pci_host_proc_t *tmp;
-
-       if (!p) return;
-       p->next = NULL;
-       p->set = 1;
-       if (ide_pci_host_proc_list) {
-               tmp = ide_pci_host_proc_list;
-               while (tmp->next) tmp = tmp->next;
-               tmp->next = p;
-       } else
-               ide_pci_host_proc_list = p;
+       create_proc_info_entry(name, 0, proc_ide_root, get_info);
 }
 
-EXPORT_SYMBOL(ide_pci_register_host_proc);
-
-#endif /* CONFIG_BLK_DEV_IDEPCI */
-
-EXPORT_SYMBOL(create_proc_ide_interfaces);
+EXPORT_SYMBOL_GPL(ide_pci_create_host_proc);
+#endif
 
 void destroy_proc_ide_interfaces(void)
 {
@@ -846,45 +824,22 @@ static struct file_operations ide_drivers_operations = {
 
 void proc_ide_create(void)
 {
-#ifdef CONFIG_BLK_DEV_IDEPCI
-       ide_pci_host_proc_t *p = ide_pci_host_proc_list;
-#endif /* CONFIG_BLK_DEV_IDEPCI */
        struct proc_dir_entry *entry;
-       proc_ide_root = proc_mkdir("ide", 0);
-       if (!proc_ide_root) return;
+
+       if (!proc_ide_root)
+               return;
 
        create_proc_ide_interfaces();
 
        entry = create_proc_entry("drivers", 0, proc_ide_root);
        if (entry)
                entry->proc_fops = &ide_drivers_operations;
-
-#ifdef CONFIG_BLK_DEV_IDEPCI
-       while (p != NULL)
-       {
-               if (p->name != NULL && p->set == 1 && p->get_info != NULL) 
-               {
-                       p->parent = proc_ide_root;
-                       create_proc_info_entry(p->name, 0, p->parent, p->get_info);
-                       p->set = 2;
-               }
-               p = p->next;
-       }
-#endif /* CONFIG_BLK_DEV_IDEPCI */
 }
 
 EXPORT_SYMBOL(proc_ide_create);
 
 void proc_ide_destroy(void)
 {
-#ifdef CONFIG_BLK_DEV_IDEPCI
-       ide_pci_host_proc_t *p;
-
-       for (p = ide_pci_host_proc_list; p; p = p->next) {
-               if (p->set == 2)
-                       remove_proc_entry(p->name, p->parent);
-       }
-#endif /* CONFIG_BLK_DEV_IDEPCI */
        remove_proc_entry("ide/drivers", proc_ide_root);
        destroy_proc_ide_interfaces();
        remove_proc_entry("ide", 0);
index a7a946f0edd47ca4524bfd1f51222a3f31071c93..0280787cc77f94dfe0dcbbf02f14687adbfadd98 100644 (file)
@@ -474,6 +474,8 @@ struct seq_operations ide_drivers_op = {
 };
 
 #ifdef CONFIG_PROC_FS
+struct proc_dir_entry *proc_ide_root;
+
 ide_proc_entry_t generic_subdriver_entries[] = {
        { "capacity",   S_IFREG|S_IRUGO,        proc_ide_read_capacity, NULL },
        { NULL, 0, NULL, NULL }
@@ -2402,6 +2404,10 @@ int __init ide_init (void)
 
        init_ide_data();
 
+#ifdef CONFIG_PROC_FS
+       proc_ide_root = proc_mkdir("ide", 0);
+#endif
+
 #ifdef CONFIG_BLK_DEV_ALI14XX
        if (probe_ali14xx)
                (void)ali14xx_init();
index 1424481d5d5f2d5d0eda81bb663dfdd924a8d4c6..3b0b5244a48a18f764ffbff8d5ce0900f6f1da5b 100644 (file)
@@ -423,7 +423,7 @@ static unsigned int __init init_chipset_aec62xx (struct pci_dev *dev, const char
 
        if (!aec62xx_proc) {
                aec62xx_proc = 1;
-               ide_pci_register_host_proc(&aec62xx_procs[0]);
+               ide_pci_create_host_proc("aec62xx", aec62xx_get_info);
        }
 #endif /* DISPLAY_AEC62XX_TIMINGS && CONFIG_PROC_FS */
 
index c5584c41093cbf65aab8076177dd6aee93b759e5..c4145488dd6c1104a0df5930728d1d1e6a264d01 100644 (file)
@@ -70,24 +70,6 @@ struct chipset_bus_clock_list_entry aec6xxx_34_base [] = {
 #define BUSCLOCK(D)    \
        ((struct chipset_bus_clock_list_entry *) pci_get_drvdata((D)))
 
-#if defined(DISPLAY_AEC62XX_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 aec62xx_proc;
-
-static int aec62xx_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t aec62xx_procs[] = {
-       {
-               .name           = "aec62xx",
-               .set            = 1,
-               .get_info       = aec62xx_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* DISPLAY_AEC62XX_TIMINGS && CONFIG_PROC_FS */
-
 static void init_setup_aec6x80(struct pci_dev *, ide_pci_device_t *);
 static void init_setup_aec62xx(struct pci_dev *, ide_pci_device_t *);
 static unsigned int init_chipset_aec62xx(struct pci_dev *, const char *);
index 1a81d86d5b18b3cddc2a771413f4445285021a43..0b6156a29473506ad1f843897c3137c80fba81fb 100644 (file)
@@ -588,7 +588,7 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char
        if (!ali_proc) {
                ali_proc = 1;
                bmide_dev = dev;
-               ide_pci_register_host_proc(&ali_procs[0]);
+               ide_pci_create_host_proc("ali", ali_get_info);
        }
 #endif  /* defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS) */
 
index 2111305e7e10041c19fc26d5b0240b59991b0411..439bd5031a5952346907add2ccac78d432f402e1 100644 (file)
@@ -7,24 +7,6 @@
 
 #define DISPLAY_ALI_TIMINGS
 
-#if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 ali_proc;
-
-static int ali_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t ali_procs[] = {
-       {
-               .name           = "ali",
-               .set            = 1,
-               .get_info       = ali_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* DISPLAY_ALI_TIMINGS && CONFIG_PROC_FS */
-
 static unsigned int init_chipset_ali15x3(struct pci_dev *, const char *);
 static void init_hwif_common_ali15x3(ide_hwif_t *);
 static void init_hwif_ali15x3(ide_hwif_t *);
index 7f86e50b5300b7c95008c1fd0a2a39c5b23f7965..a17af28e9eb3cba9db5540b24a5f469e4a779b1b 100644 (file)
@@ -88,6 +88,8 @@ static unsigned char amd_cyc2udma[] = { 6, 6, 5, 4, 0, 1, 1, 2, 2, 3, 3, 3, 3, 3
 #include <linux/stat.h>
 #include <linux/proc_fs.h>
 
+static u8 amd74xx_proc;
+
 static unsigned char amd_udma2cyc[] = { 4, 6, 8, 10, 3, 2, 1, 15 };
 static unsigned long amd_base;
 static struct pci_dev *bmide_dev;
@@ -398,7 +400,7 @@ static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char
         if (!amd74xx_proc) {
                 amd_base = pci_resource_start(dev, 4);
                 bmide_dev = dev;
-                ide_pci_register_host_proc(&amd74xx_procs[0]);
+               ide_pci_create_host_proc("amd74xx", amd74xx_get_info);
                 amd74xx_proc = 1;
         }
 #endif /* DISPLAY_AMD_TIMINGS && CONFIG_PROC_FS */
index 2a570231e239d1ec8a3f68ad7ed024bb80bbba4f..cb265c8b71acc5392c9098d9bea086779bc1e98f 100644 (file)
@@ -7,24 +7,6 @@
 
 #define DISPLAY_AMD_TIMINGS
 
-#if defined(DISPLAY_AMD_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 amd74xx_proc;
-
-static int amd74xx_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t amd74xx_procs[] = {
-       {
-               .name           = "amd74xx",
-               .set            = 1,
-               .get_info       = amd74xx_get_info,
-               .parent         = NULL,
-       },
-};
-#endif  /* defined(DISPLAY_AMD_TIMINGS) && defined(CONFIG_PROC_FS) */
-
 static unsigned int init_chipset_amd74xx(struct pci_dev *, const char *);
 static void init_hwif_amd74xx(ide_hwif_t *);
 
index d70d050c7000c9d35ee4bfe8cb36e2598b3fd8d6..2fa967504a920b8c767599b3f30ffd4d87c85e84 100644 (file)
@@ -667,7 +667,7 @@ static unsigned int __init init_chipset_cmd64x (struct pci_dev *dev, const char
 
        if (!cmd64x_proc) {
                cmd64x_proc = 1;
-               ide_pci_register_host_proc(&cmd64x_procs[0]);
+               ide_pci_create_host_proc("cmd64x", cmd64x_get_info);
        }
 #endif /* DISPLAY_CMD64X_TIMINGS && CONFIG_PROC_FS */
 
index 50f7e17236c1f91a4017735e3c62e1cf9d243d19..ae6359c2ed61cf1565650d197efa11ad6582c7a5 100644 (file)
 #define UDIDETCR1      0x7B
 #define DTPR1          0x7C
 
-#if defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 cmd64x_proc;
-
-static char * print_cmd64x_get_info(char *, struct pci_dev *, int);
-static int cmd64x_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t cmd64x_procs[] = {
-       {
-               .name           = "cmd64x",
-               .set            = 1,
-               .get_info       = cmd64x_get_info,
-               .parent         = NULL,
-       },
-};
-#endif  /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */
-
 static unsigned int init_chipset_cmd64x(struct pci_dev *, const char *);
 static void init_hwif_cmd64x(ide_hwif_t *);
 
index 00ef1ef58cfa37e17effaf7cefca05523c4a16f6..8361925f46b061682893e1dc888bbdb2d21fc9da 100644 (file)
@@ -196,7 +196,7 @@ static unsigned int __devinit init_chipset_cs5520(struct pci_dev *dev, const cha
        if (!cs5520_proc) {
                cs5520_proc = 1;
                bmide_dev = dev;
-               ide_pci_register_host_proc(&cs5520_procs[0]);
+               ide_pci_create_host_proc("cs5520", cs5520_get_info);
        }
 #endif /* DISPLAY_CS5520_TIMINGS && CONFIG_PROC_FS */
        return 0;
index 33ebf1da34d04d28b4111f0185fe7433c9177816..21e8cb39db4a00c8b04ec9a8a46be5051301ca07 100644 (file)
@@ -7,24 +7,6 @@
 
 #define DISPLAY_CS5520_TIMINGS
 
-#if defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 cs5520_proc;
-
-static int cs5520_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t cs5520_procs[] = {
-       {
-               .name           = "cs5520",
-               .set            = 1,
-               .get_info       = cs5520_get_info,
-               .parent         = NULL,
-       },
-};
-#endif  /* defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS) */
-
 static unsigned int init_chipset_cs5520(struct pci_dev *, const char *);
 static void init_hwif_cs5520(ide_hwif_t *);
 static void cs5520_init_setup_dma(struct pci_dev *dev, struct ide_pci_device_s *d, ide_hwif_t *hwif);
index d37c778539da894086c602161234590e2bcdcde4..d0cd2260635d5bb1ace3d7457d32a1142e05a77b 100644 (file)
@@ -276,7 +276,7 @@ static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char
        if (!cs5530_proc) {
                cs5530_proc = 1;
                bmide_dev = dev;
-               ide_pci_register_host_proc(&cs5530_procs[0]);
+               ide_pci_create_host_proc("cs5530", cs5530_get_info);
        }
 #endif /* DISPLAY_CS5530_TIMINGS && CONFIG_PROC_FS */
 
index aa1fba5c682a9affe293289dd05e2c6425a80edc..89f448e983a6de7c3d4ea46c6767736b896e8b32 100644 (file)
@@ -7,24 +7,6 @@
 
 #define DISPLAY_CS5530_TIMINGS
 
-#if defined(DISPLAY_CS5530_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 cs5530_proc;
-
-static int cs5530_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t cs5530_procs[] = {
-       {
-               .name           = "cs5530",
-               .set            = 1,
-               .get_info       = cs5530_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* DISPLAY_CS5530_TIMINGS && CONFIG_PROC_FS */
-
 static unsigned int init_chipset_cs5530(struct pci_dev *, const char *);
 static void init_hwif_cs5530(ide_hwif_t *);
 
index e03b0061ed52914ec9779d0c6fd5701ffb3b6846..fbd6810f96d5be91c3e18c4e9d34ecd15ae6e12c 100644 (file)
@@ -282,7 +282,7 @@ static unsigned int __init init_chipset_hpt34x (struct pci_dev *dev, const char
 
        if (!hpt34x_proc) {
                hpt34x_proc = 1;
-               ide_pci_register_host_proc(&hpt34x_procs[0]);
+               ide_pci_create_host_proc("hpt34x", hpt34x_get_info);
        }
 #endif /* DISPLAY_HPT34X_TIMINGS && CONFIG_PROC_FS */
 
index 6c8a2013086d6d2cbe312469820161cb3376d8e7..47b4be1001ba81be411ac1d751043cfd6e49b982 100644 (file)
 
 #undef DISPLAY_HPT34X_TIMINGS
 
-#if defined(DISPLAY_HPT34X_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 hpt34x_proc;
-
-static int hpt34x_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t hpt34x_procs[] = {
-       {
-               .name           = "hpt34x",
-               .set            = 1,
-               .get_info       = hpt34x_get_info,
-               .parent         = NULL,
-       },
-};
-#endif  /* defined(DISPLAY_HPT34X_TIMINGS) && defined(CONFIG_PROC_FS) */
-
 static unsigned int init_chipset_hpt34x(struct pci_dev *, const char *);
 static void init_hwif_hpt34x(ide_hwif_t *);
 
index b1adf40769ad45eaf70dd08d5eebb3ef3e2edd59..de5f38f320bd28f0969055d99309c9f8c466fb18 100644 (file)
@@ -972,7 +972,7 @@ static unsigned int __init init_chipset_hpt366 (struct pci_dev *dev, const char
 
        if (!hpt366_proc) {
                hpt366_proc = 1;
-               ide_pci_register_host_proc(&hpt366_procs[0]);
+               ide_pci_create_host_proc("hpt366", hpt366_get_info);
        }
 #endif /* DISPLAY_HPT366_TIMINGS && CONFIG_PROC_FS */
 
index bcc8b8e867292de4daacfd55f00ba990b49ffe0e..d9f69f08630e7407245979763ff8433d9d849211 100644 (file)
@@ -416,24 +416,6 @@ struct chipset_bus_clock_list_entry sixty_six_base_hpt374[] = {
 #define F_LOW_PCI_50      0x2d
 #define F_LOW_PCI_66      0x42
 
-#if defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 hpt366_proc;
-
-static int hpt366_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t hpt366_procs[] = {
-       {
-               .name           = "hpt366",
-               .set            = 1,
-               .get_info       = hpt366_get_info,
-               .parent         = NULL,
-       },
-};
-#endif  /* defined(DISPLAY_HPT366_TIMINGS) && defined(CONFIG_PROC_FS) */
-
 static void init_setup_hpt366(struct pci_dev *, ide_pci_device_t *);
 static void init_setup_hpt37x(struct pci_dev *, ide_pci_device_t *);
 static void init_setup_hpt374(struct pci_dev *, ide_pci_device_t *);
index 42fc7d07a79aee651fe7780de5dfe204259bd70c..cf6b0b2d4e76959a0f524893d43d1354cc904502 100644 (file)
@@ -574,7 +574,7 @@ static unsigned int __init init_chipset_pdcnew (struct pci_dev *dev, const char
 
        if (!pdcnew_proc) {
                pdcnew_proc = 1;
-               ide_pci_register_host_proc(&pdcnew_procs[0]);
+               ide_pci_create_host_proc("pdcnew", pdcnew_get_info);
        }
 #endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */
 
index c05155332ab181017844306de3d5fb65b8595be6..8a5507d781e4ddadea80b2f240a35b2b3d1e759a 100644 (file)
@@ -164,25 +164,6 @@ static void decode_registers (u8 registers, u8 value)
 
 #define DISPLAY_PDC202XX_TIMINGS
 
-#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 pdcnew_proc;
-
-static int pdcnew_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t pdcnew_procs[] = {
-       {
-               .name           = "pdcnew",
-               .set            = 1,
-               .get_info       = pdcnew_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */
-
-
 static void init_setup_pdcnew(struct pci_dev *, ide_pci_device_t *);
 static void init_setup_pdc20270(struct pci_dev *, ide_pci_device_t *);
 static void init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t *d);
index 36905608008dda20ca48c2c1b1e8e7d4475bcf35..2a7074f4277beae330ba43834a5f207749b0a629 100644 (file)
@@ -707,7 +707,7 @@ static unsigned int __init init_chipset_pdc202xx (struct pci_dev *dev, const cha
 
        if (!pdc202xx_proc) {
                pdc202xx_proc = 1;
-               ide_pci_register_host_proc(&pdc202xx_procs[0]);
+               ide_pci_create_host_proc("pdc202xx", pdc202xx_get_info);
        }
 #endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */
 
index e3f0aaa047b3bc9e4398a15f59f64447f56d80f5..a4e6772b304d1b96461dce470a16d252665c167c 100644 (file)
@@ -199,25 +199,6 @@ static void decode_registers (u8 registers, u8 value)
 
 #define DISPLAY_PDC202XX_TIMINGS
 
-#if defined(DISPLAY_PDC202XX_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 pdc202xx_proc;
-
-static int pdc202xx_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t pdc202xx_procs[] = {
-       {
-               .name           = "pdc202xx",
-               .set            = 1,
-               .get_info       = pdc202xx_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* DISPLAY_PDC202XX_TIMINGS && CONFIG_PROC_FS */
-
-
 static void init_setup_pdc202ata4(struct pci_dev *dev, ide_pci_device_t *d);
 static void init_setup_pdc20265(struct pci_dev *, ide_pci_device_t *);
 static void init_setup_pdc202xx(struct pci_dev *, ide_pci_device_t *);
index 7f34d0b6baa63c517a69295770bc2402d752040f..9473298446b00a599975ea4a76ae453561441a4b 100644 (file)
@@ -636,7 +636,7 @@ static unsigned int __devinit init_chipset_piix (struct pci_dev *dev, const char
 
        if (!piix_proc) {
                piix_proc = 1;
-               ide_pci_register_host_proc(&piix_procs[0]);
+               ide_pci_create_host_proc("piix", piix_get_info);
        }
 #endif /* DISPLAY_PIIX_TIMINGS && CONFIG_PROC_FS */
        return 0;
index 4f160e9ace9f706db388ddce544680487c4c297a..fc8cbd6945676c69b77c003ef745d3f756fd6e75 100644 (file)
@@ -9,24 +9,6 @@
 
 #define DISPLAY_PIIX_TIMINGS
 
-#if defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 piix_proc;
-
-static int piix_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t piix_procs[] = {
-       {
-               .name           = "piix",
-               .set            = 1,
-               .get_info       = piix_get_info,
-               .parent         = NULL,
-       },
-};
-#endif  /* defined(DISPLAY_PIIX_TIMINGS) && defined(CONFIG_PROC_FS) */
-
 static void init_setup_piix(struct pci_dev *, ide_pci_device_t *);
 static unsigned int __devinit init_chipset_piix(struct pci_dev *, const char *);
 static void init_hwif_piix(ide_hwif_t *);
index 9f2ff6e57d5722eab344a4edc12a0b58912b9235..10a95cb740b262b6faad095239275a93b915c299 100644 (file)
@@ -515,7 +515,7 @@ static unsigned int __init init_chipset_sc1200 (struct pci_dev *dev, const char
        if (!bmide_dev) {
                sc1200_proc = 1;
                bmide_dev = dev;
-               ide_pci_register_host_proc(&sc1200_procs[0]);
+               ide_pci_create_host_proc("sc1200", sc1200_get_info);
        }
 #endif /* DISPLAY_SC1200_TIMINGS && CONFIG_PROC_FS */
        return 0;
index 09a3ff9442edf82f97ebfa2c6c0b4af30536a632..dc422a805160f2d2bee2da359a2af0b40c24bb9f 100644 (file)
@@ -7,24 +7,6 @@
 
 #define DISPLAY_SC1200_TIMINGS
 
-#if defined(DISPLAY_SC1200_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 sc1200_proc;
-
-static int sc1200_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t sc1200_procs[] = {
-       {
-               .name           = "sc1200",
-               .set            = 1,
-               .get_info       = sc1200_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* DISPLAY_SC1200_TIMINGS && CONFIG_PROC_FS */
-
 static unsigned int init_chipset_sc1200(struct pci_dev *, const char *);
 static void init_hwif_sc1200(ide_hwif_t *);
 
index 0409b25c1d52077c2f3d8d4e75ed837b17a39622..d19eafe324cdcd942c0f5361ae12d83a6bd3ec0c 100644 (file)
@@ -621,7 +621,7 @@ static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *
 
        if (!svwks_proc) {
                svwks_proc = 1;
-               ide_pci_register_host_proc(&svwks_procs[0]);
+               ide_pci_create_host_proc("svwks", svwks_get_info);
        }
 #endif /* DISPLAY_SVWKS_TIMINGS && CONFIG_PROC_FS */
 
index 34c4c00de02a3356b923b81246f519299a6d06c7..eba6e0bbb0bfb8a87a3931cecaea0198426728e0 100644 (file)
@@ -23,24 +23,6 @@ const char *svwks_bad_ata100[] = {
 
 #define DISPLAY_SVWKS_TIMINGS  1
 
-#if defined(DISPLAY_SVWKS_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 svwks_proc;
-
-static int svwks_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t svwks_procs[] = {
-{
-               .name           = "svwks",
-               .set            = 1,
-               .get_info       = svwks_get_info,
-               .parent         = NULL,
-       },
-};
-#endif  /* defined(DISPLAY_SVWKS_TIMINGS) && defined(CONFIG_PROC_FS) */
-
 static void init_setup_svwks(struct pci_dev *, ide_pci_device_t *);
 static void init_setup_csb6(struct pci_dev *, ide_pci_device_t *);
 static unsigned int init_chipset_svwks(struct pci_dev *, const char *);
index 04b0de07ec39dde610df3e7dd6307ef0c7bedd5e..bc157b5088628ffd1e709b57afa931bc7e230a70 100644 (file)
@@ -785,7 +785,7 @@ static void proc_reports_siimage (struct pci_dev *dev, u8 clocking, const char *
 
        if (!siimage_proc) {
                siimage_proc = 1;
-               ide_pci_register_host_proc(&siimage_procs[0]);
+               ide_pci_create_host_proc("siimage", siimage_get_info);
        }
 #endif /* DISPLAY_SIIMAGE_TIMINGS && CONFIG_PROC_FS */
 }
index 166339f30fa3babdb099c777cee3b14f2c4bd573..a47aae5b97066c4a2f7691619f22f7dd7e9fd17c 100644 (file)
 #define siiprintk(x...)
 #endif
 
-
-#if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static char * print_siimage_get_info(char *, struct pci_dev *, int);
-static int siimage_get_info(char *, char **, off_t, int);
-
-static u8 siimage_proc;
-
-static ide_pci_host_proc_t siimage_procs[] = {
-       {
-               .name           = "siimage",
-               .set            = 1,
-               .get_info       = siimage_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* DISPLAY_SIIMAGE_TIMINGS && CONFIG_PROC_FS */ 
-
 static unsigned int init_chipset_siimage(struct pci_dev *, const char *);
 static void init_iops_siimage(ide_hwif_t *);
 static void init_hwif_siimage(ide_hwif_t *);
index bc719cdfe924fe65f5a367d40eb58c4d99beaa1b..2ed759f57fc558b3ba9f153acf1b117928b05b3d 100644 (file)
@@ -881,7 +881,7 @@ static unsigned int __init init_chipset_sis5513 (struct pci_dev *dev, const char
                if (!sis_proc) {
                        sis_proc = 1;
                        bmide_dev = dev;
-                       ide_pci_register_host_proc(&sis_procs[0]);
+                       ide_pci_create_host_proc("sis", sis_get_info);
                }
 #endif
        }
index 890b67a07e8b8ae59a9f4c869aefafeced777334..79f3aa8b631145bd4cbcbb9a1d6f1cfaef26fbb8 100644 (file)
@@ -7,24 +7,6 @@
 
 #define DISPLAY_SIS_TIMINGS
 
-#if defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 sis_proc;
-
-static int sis_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t sis_procs[] = {
-{
-               .name           = "sis",
-               .set            = 1,
-               .get_info       = sis_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS) */
-
 static unsigned int init_chipset_sis5513(struct pci_dev *, const char *);
 static void init_hwif_sis5513(ide_hwif_t *);
 
index f3d11cb09c1eee1f28aab0aa044438142c2b51e4..ee245115125c636506697fb19d5e2ce95c78844e 100644 (file)
@@ -319,7 +319,7 @@ static unsigned int __init init_chipset_slc90e66 (struct pci_dev *dev, const cha
        if (!slc90e66_proc) {
                slc90e66_proc = 1;
                bmide_dev = dev;
-               ide_pci_register_host_proc(&slc90e66_procs[0]);
+               ide_pci_create_host_proc("slc90e66", slc90e66_get_info);
        }
 #endif /* DISPLAY_SLC90E66_TIMINGS && CONFIG_PROC_FS */
        return 0;
index 626f775ef2990127b201c10536dfc79ecd0ed533..2f15858cdd5c530bba9866e70ae58b4d21da64f7 100644 (file)
@@ -9,24 +9,6 @@
 
 #define SLC90E66_DEBUG_DRIVE_INFO      0
 
-#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 slc90e66_proc;
-
-static int slc90e66_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t slc90e66_procs[] = {
-       {
-               .name           = "slc90e66",
-               .set            = 1,
-               .get_info       = slc90e66_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS) */
-
 static unsigned int init_chipset_slc90e66(struct pci_dev *, const char *);
 static void init_hwif_slc90e66(ide_hwif_t *);
 
index 92acfbc1f1b9c77053f551d3d86334bc0c84f954..f7ff2f4d101d968f8f295322b1021df488b32603 100644 (file)
@@ -212,7 +212,7 @@ static unsigned int __init init_chipset_triflex(struct pci_dev *dev,
                const char *name) 
 {
 #ifdef CONFIG_PROC_FS
-       ide_pci_register_host_proc(&triflex_proc);
+       ide_pci_create_host_proc("triflex", triflex_get_info);
 #endif
        return 0;       
 }
index 5bb7f12dd0cd42324f2dbfd13b05176a31643b71..ddeb0964e4f5d2910108d82af917c1cf6d0ec84d 100644 (file)
 
 static unsigned int __devinit init_chipset_triflex(struct pci_dev *, const char *);
 static void init_hwif_triflex(ide_hwif_t *);
-#ifdef CONFIG_PROC_FS
-static int triflex_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t triflex_proc = {
-       .name           = "triflex",
-       .set            = 1,
-       .get_info       = triflex_get_info,
-};
-#endif
 
 static ide_pci_device_t triflex_devices[] __devinitdata = {
        {
index 7a1ce9f86426fdd50f760624c17b173cab19c2c6..752832dd7a105009ec361bf289762a1fe8866650 100644 (file)
@@ -567,7 +567,7 @@ static unsigned int __init init_chipset_via82cxxx(struct pci_dev *dev, const cha
                via_base = pci_resource_start(dev, 4);
                bmide_dev = dev;
                isa_dev = isa;
-               ide_pci_register_host_proc(&via_procs[0]);
+               ide_pci_create_host_proc("via", via_get_info);
                via_proc = 1;
        }
 #endif /* DISPLAY_VIA_TIMINGS && CONFIG_PROC_FS */
index 0c1d390c5ba448d9e0830e978a7319acbaafd256..a47f040e824ef0ce12d479b6195e4d5f8f7c1b86 100644 (file)
@@ -7,24 +7,6 @@
 
 #define DISPLAY_VIA_TIMINGS
 
-#if defined(DISPLAY_VIA_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static u8 via_proc;
-
-static int via_get_info(char *, char **, off_t, int);
-
-static ide_pci_host_proc_t via_procs[] = {
-       {
-               .name           = "via",
-               .set            = 1,
-               .get_info       = via_get_info,
-               .parent         = NULL,
-       },
-};
-#endif /* DISPLAY_VIA_TIMINGS && CONFIG_PROC_FS */
-
 static unsigned int init_chipset_via82cxxx(struct pci_dev *, const char *);
 static void init_hwif_via82cxxx(ide_hwif_t *);
 
index 4fee82798cb8c153757492230d92bfbfd8715a0f..d022c3ce514b99b89e8cdf04ca140042e680f28f 100644 (file)
@@ -1087,6 +1087,8 @@ typedef struct {
 } ide_proc_entry_t;
 
 #ifdef CONFIG_PROC_FS
+extern struct proc_dir_entry *proc_ide_root;
+
 extern void proc_ide_create(void);
 extern void proc_ide_destroy(void);
 extern void destroy_proc_ide_device(ide_hwif_t *, ide_drive_t *);
@@ -1097,6 +1099,10 @@ extern void ide_remove_proc_entries(struct proc_dir_entry *, ide_proc_entry_t *)
 read_proc_t proc_ide_read_capacity;
 read_proc_t proc_ide_read_geometry;
 
+#ifdef CONFIG_BLK_DEV_IDEPCI
+void ide_pci_create_host_proc(const char *, get_info_t *);
+#endif
+
 /*
  * Standard exit stuff:
  */
@@ -1522,18 +1528,6 @@ int ide_register_subdriver(ide_drive_t *, ide_driver_t *);
 int ide_unregister_subdriver (ide_drive_t *drive);
 int ide_replace_subdriver(ide_drive_t *drive, const char *driver);
 
-#ifdef CONFIG_PROC_FS
-typedef struct ide_pci_host_proc_s {
-       char                            *name;
-       u8                              set;
-       get_info_t                      *get_info;
-       struct proc_dir_entry           *parent;
-       struct ide_pci_host_proc_s      *next;
-} ide_pci_host_proc_t;
-
-void ide_pci_register_host_proc(ide_pci_host_proc_t *);
-#endif /* CONFIG_PROC_FS */
-
 #define ON_BOARD               1
 #define NEVER_BOARD            0