return 0;
 }
 
-#ifdef MODULE
-static int __exit isapnp_proc_detach_device(struct pnp_dev *dev)
-{
-       struct pnp_card *bus = dev->card;
-       struct proc_dir_entry *de;
-       char name[16];
-
-       if (!(de = bus->procdir))
-               return -EINVAL;
-       sprintf(name, "%02x", dev->number);
-       remove_proc_entry(name, de);
-       return 0;
-}
-
-static int __exit isapnp_proc_detach_bus(struct pnp_card *bus)
-{
-       struct proc_dir_entry *de;
-       char name[16];
-
-       if (!(de = bus->procdir))
-               return -EINVAL;
-       sprintf(name, "%02x", bus->number);
-       remove_proc_entry(name, isapnp_proc_bus_dir);
-       return 0;
-}
-#endif                         /* MODULE */
-
 int __init isapnp_proc_init(void)
 {
        struct pnp_dev *dev;
        }
        return 0;
 }
-
-#ifdef MODULE
-int __exit isapnp_proc_done(void)
-{
-       struct pnp_dev *dev;
-       struct pnp_bus *card;
-
-       isapnp_for_each_dev(dev) {
-               isapnp_proc_detach_device(dev);
-       }
-       isapnp_for_each_card(card) {
-               isapnp_proc_detach_bus(card);
-       }
-       if (isapnp_proc_bus_dir)
-               remove_proc_entry("isapnp", proc_bus);
-       return 0;
-}
-#endif                         /* MODULE */
 
 static int pnpbios_disabled;
 int pnpbios_dont_use_current_config;
 
-#ifndef MODULE
 static int __init pnpbios_setup(char *str)
 {
        int invert;
 }
 
 __setup("pnpbios=", pnpbios_setup);
-#endif
 
 /* PnP BIOS signature: "$PnP" */
 #define PNP_SIGNATURE   (('$' << 0) + ('P' << 8) + ('n' << 16) + ('P' << 24))
        return 0;
 }
 
-#ifndef MODULE
-
-/* init/main.c calls pnpbios_init early */
-
 /* Start the kernel thread later: */
 module_init(pnpbios_thread_init);
 
-#else
-
-/*
- * N.B.: Building pnpbios as a module hasn't been fully implemented
- */
-
-MODULE_LICENSE("GPL");
-
-static int __init pnpbios_init_all(void)
-{
-       int r;
-
-       r = pnpbios_init();
-       if (r)
-               return r;
-       r = pnpbios_thread_init();
-       if (r)
-               return r;
-       return 0;
-}
-
-static void __exit pnpbios_exit(void)
-{
-#ifdef CONFIG_HOTPLUG
-       unloading = 1;
-       wait_for_completion(&unload_sem);
-#endif
-       pnpbios_proc_exit();
-       /* We ought to free resources here */
-       return;
-}
-
-module_init(pnpbios_init_all);
-module_exit(pnpbios_exit);
-
-#endif
-
 EXPORT_SYMBOL(pnpbios_protocol);