Commit 34438384 authored by Dominik Brodowski's avatar Dominik Brodowski Committed by Russell King

[PCMCIA] move creation of /proc/pccard to ds.c

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.
parent c6617c1d
......@@ -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);
......
......@@ -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)
......
......@@ -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");
......
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