]> git.hungrycats.org Git - linux/commitdiff
[PCMCIA] move creation of /proc/pccard to ds.c
authorDominik Brodowski <linux@de.rmk.(none)>
Sun, 15 Jun 2003 13:43:55 +0000 (14:43 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Sun, 15 Jun 2003 13:43:55 +0000 (14:43 +0100)
Move the creation of /proc/pccard to ds.c so that ds.c is the only
file that needs to include linux/proc_fs.h any longer.

drivers/pcmcia/cs.c
drivers/pcmcia/cs_internal.h
drivers/pcmcia/ds.c

index 708155ed6d2e825a3bfeb67a4dae2642d0cf6c36..d48e01acaf28fd1b8d31ef24a1e1da2e72addcce 100644 (file)
@@ -44,7 +44,6 @@
 #include <linux/timer.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
-#include <linux/proc_fs.h>
 #include <linux/pm.h>
 #include <linux/pci.h>
 #include <linux/device.h>
@@ -129,11 +128,6 @@ socket_state_t dead_socket = {
 LIST_HEAD(pcmcia_socket_list);
 DECLARE_RWSEM(pcmcia_socket_list_rwsem);
 
-
-#ifdef CONFIG_PROC_FS
-struct proc_dir_entry *proc_pccard = NULL;
-#endif
-
 /*====================================================================*/
 
 /* String tables for error messages */
@@ -2500,9 +2494,6 @@ EXPORT_SYMBOL(pcmcia_write_memory);
 EXPORT_SYMBOL(dead_socket);
 EXPORT_SYMBOL(CardServices);
 EXPORT_SYMBOL(MTDHelperEntry);
-#ifdef CONFIG_PROC_FS
-EXPORT_SYMBOL(proc_pccard);
-#endif
 
 struct class pcmcia_socket_class = {
        .name = "pcmcia_socket",
@@ -2523,9 +2514,6 @@ static int __init init_pcmcia_cs(void)
     DEBUG(0, "%s\n", version);
     class_register(&pcmcia_socket_class);
     class_interface_register(&pcmcia_socket);
-#ifdef CONFIG_PROC_FS
-    proc_pccard = proc_mkdir("pccard", proc_bus);
-#endif
 
     return 0;
 }
@@ -2533,11 +2521,6 @@ static int __init init_pcmcia_cs(void)
 static void __exit exit_pcmcia_cs(void)
 {
     printk(KERN_INFO "unloading Kernel Card Services\n");
-#ifdef CONFIG_PROC_FS
-    if (proc_pccard) {
-       remove_proc_entry("pccard", proc_bus);
-    }
-#endif
     release_resource_db();
     class_interface_unregister(&pcmcia_socket);
     class_unregister(&pcmcia_socket_class);
index a0dff4cda82e8548c8a4584477d2cef4d998cad4..c794a23c8e8f8e087de5d509b783b78ed0c53923 100644 (file)
@@ -177,10 +177,6 @@ void release_resource_db(void);
 extern struct rw_semaphore pcmcia_socket_list_rwsem;
 extern struct list_head pcmcia_socket_list;
 
-#ifdef CONFIG_PROC_FS
-extern struct proc_dir_entry *proc_pccard;
-#endif
-
 #ifdef PCMCIA_DEBUG
 extern int pc_debug;
 #define DEBUG(n, args...) do { if (pc_debug>(n)) printk(KERN_DEBUG args); } while (0)
index b06d677a1dc3920fdc5fc1933935843fa9f82b4e..5a05ccdb6aa9651ba09ee36577a112f1d95335cc 100644 (file)
@@ -164,6 +164,8 @@ void pcmcia_unregister_driver(struct pcmcia_driver *driver)
 EXPORT_SYMBOL(pcmcia_unregister_driver);
 
 #ifdef CONFIG_PROC_FS
+static struct proc_dir_entry *proc_pccard = NULL;
+
 static int proc_read_drivers_callback(struct device_driver *driver, void *d)
 {
        char **p = d;
@@ -929,6 +931,7 @@ static int __init init_pcmcia_bus(void)
                major_dev = i;
 
 #ifdef CONFIG_PROC_FS
+       proc_pccard = proc_mkdir("pccard", proc_bus);
        if (proc_pccard)
                create_proc_read_entry("drivers",0,proc_pccard,proc_read_drivers,NULL);
 #endif
@@ -944,8 +947,10 @@ static void __exit exit_pcmcia_bus(void)
        class_interface_unregister(&pcmcia_bus_interface);
 
 #ifdef CONFIG_PROC_FS
-       if (proc_pccard)
+       if (proc_pccard) {
                remove_proc_entry("drivers", proc_pccard);
+               remove_proc_entry("pccard", proc_bus);
+       }
 #endif
        if (major_dev != -1)
                unregister_chrdev(major_dev, "pcmcia");