aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-08-15 12:32:12 -0400
committerLen Brown <len.brown@intel.com>2007-08-24 01:27:24 -0400
commit4f0217e30249ac0eb13b65ef64f2aee627465da2 (patch)
treea3a46b93bcd2356ee7c364bb3323ef70d23b1c41 /drivers
parent6c504d30a48157b7c05a0dfb6a799c72095e957d (diff)
PNP: remove MODULE infrastructure
We don't support building any part of PNP as a module (*drivers* can be modules, of course, but the PNP infrastructure itself can not). Since MODULE will never be defined, remove the ifdefs and dead code. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Adam Belay <abelay@novell.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pnp/isapnp/proc.c45
-rw-r--r--drivers/pnp/pnpbios/core.c43
2 files changed, 0 insertions, 88 deletions
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c
index 3fbc0f9ffc26..560ccb640816 100644
--- a/drivers/pnp/isapnp/proc.c
+++ b/drivers/pnp/isapnp/proc.c
@@ -112,33 +112,6 @@ static int isapnp_proc_attach_device(struct pnp_dev *dev)
112 return 0; 112 return 0;
113} 113}
114 114
115#ifdef MODULE
116static int __exit isapnp_proc_detach_device(struct pnp_dev *dev)
117{
118 struct pnp_card *bus = dev->card;
119 struct proc_dir_entry *de;
120 char name[16];
121
122 if (!(de = bus->procdir))
123 return -EINVAL;
124 sprintf(name, "%02x", dev->number);
125 remove_proc_entry(name, de);
126 return 0;
127}
128
129static int __exit isapnp_proc_detach_bus(struct pnp_card *bus)
130{
131 struct proc_dir_entry *de;
132 char name[16];
133
134 if (!(de = bus->procdir))
135 return -EINVAL;
136 sprintf(name, "%02x", bus->number);
137 remove_proc_entry(name, isapnp_proc_bus_dir);
138 return 0;
139}
140#endif /* MODULE */
141
142int __init isapnp_proc_init(void) 115int __init isapnp_proc_init(void)
143{ 116{
144 struct pnp_dev *dev; 117 struct pnp_dev *dev;
@@ -149,21 +122,3 @@ int __init isapnp_proc_init(void)
149 } 122 }
150 return 0; 123 return 0;
151} 124}
152
153#ifdef MODULE
154int __exit isapnp_proc_done(void)
155{
156 struct pnp_dev *dev;
157 struct pnp_bus *card;
158
159 isapnp_for_each_dev(dev) {
160 isapnp_proc_detach_device(dev);
161 }
162 isapnp_for_each_card(card) {
163 isapnp_proc_detach_bus(card);
164 }
165 if (isapnp_proc_bus_dir)
166 remove_proc_entry("isapnp", proc_bus);
167 return 0;
168}
169#endif /* MODULE */
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 9892a6afe46c..0691f473e9d4 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -419,7 +419,6 @@ static void __init build_devlist(void)
419static int pnpbios_disabled; 419static int pnpbios_disabled;
420int pnpbios_dont_use_current_config; 420int pnpbios_dont_use_current_config;
421 421
422#ifndef MODULE
423static int __init pnpbios_setup(char *str) 422static int __init pnpbios_setup(char *str)
424{ 423{
425 int invert; 424 int invert;
@@ -443,7 +442,6 @@ static int __init pnpbios_setup(char *str)
443} 442}
444 443
445__setup("pnpbios=", pnpbios_setup); 444__setup("pnpbios=", pnpbios_setup);
446#endif
447 445
448/* PnP BIOS signature: "$PnP" */ 446/* PnP BIOS signature: "$PnP" */
449#define PNP_SIGNATURE (('$' << 0) + ('P' << 8) + ('n' << 16) + ('P' << 24)) 447#define PNP_SIGNATURE (('$' << 0) + ('P' << 8) + ('n' << 16) + ('P' << 24))
@@ -607,48 +605,7 @@ static int __init pnpbios_thread_init(void)
607 return 0; 605 return 0;
608} 606}
609 607
610#ifndef MODULE
611
612/* init/main.c calls pnpbios_init early */
613
614/* Start the kernel thread later: */ 608/* Start the kernel thread later: */
615module_init(pnpbios_thread_init); 609module_init(pnpbios_thread_init);
616 610
617#else
618
619/*
620 * N.B.: Building pnpbios as a module hasn't been fully implemented
621 */
622
623MODULE_LICENSE("GPL");
624
625static int __init pnpbios_init_all(void)
626{
627 int r;
628
629 r = pnpbios_init();
630 if (r)
631 return r;
632 r = pnpbios_thread_init();
633 if (r)
634 return r;
635 return 0;
636}
637
638static void __exit pnpbios_exit(void)
639{
640#ifdef CONFIG_HOTPLUG
641 unloading = 1;
642 wait_for_completion(&unload_sem);
643#endif
644 pnpbios_proc_exit();
645 /* We ought to free resources here */
646 return;
647}
648
649module_init(pnpbios_init_all);
650module_exit(pnpbios_exit);
651
652#endif
653
654EXPORT_SYMBOL(pnpbios_protocol); 611EXPORT_SYMBOL(pnpbios_protocol);