aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpbios/core.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-08-28 01:56:11 -0400
committerPaul Mackerras <paulus@samba.org>2007-08-28 01:56:11 -0400
commit35438c4327df18dbf5e7f597b69299119f4a14de (patch)
treea4589d731015db93f2eba8f84ffb1f48a8084020 /drivers/pnp/pnpbios/core.c
parent2f6c9d961081dc7b109eb19166244bcb2a5dfc28 (diff)
parentb07d68b5ca4d55a16fab223d63d5fb36f89ff42f (diff)
Merge branch 'linux-2.6' into for-2.6.24
Diffstat (limited to 'drivers/pnp/pnpbios/core.c')
-rw-r--r--drivers/pnp/pnpbios/core.c44
1 files changed, 1 insertions, 43 deletions
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 3692a099b45f..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))
@@ -591,6 +589,7 @@ subsys_initcall(pnpbios_init);
591static int __init pnpbios_thread_init(void) 589static int __init pnpbios_thread_init(void)
592{ 590{
593 struct task_struct *task; 591 struct task_struct *task;
592
594#if defined(CONFIG_PPC_MERGE) 593#if defined(CONFIG_PPC_MERGE)
595 if (check_legacy_ioport(PNPBIOS_BASE)) 594 if (check_legacy_ioport(PNPBIOS_BASE))
596 return 0; 595 return 0;
@@ -606,48 +605,7 @@ static int __init pnpbios_thread_init(void)
606 return 0; 605 return 0;
607} 606}
608 607
609#ifndef MODULE
610
611/* init/main.c calls pnpbios_init early */
612
613/* Start the kernel thread later: */ 608/* Start the kernel thread later: */
614module_init(pnpbios_thread_init); 609module_init(pnpbios_thread_init);
615 610
616#else
617
618/*
619 * N.B.: Building pnpbios as a module hasn't been fully implemented
620 */
621
622MODULE_LICENSE("GPL");
623
624static int __init pnpbios_init_all(void)
625{
626 int r;
627
628 r = pnpbios_init();
629 if (r)
630 return r;
631 r = pnpbios_thread_init();
632 if (r)
633 return r;
634 return 0;
635}
636
637static void __exit pnpbios_exit(void)
638{
639#ifdef CONFIG_HOTPLUG
640 unloading = 1;
641 wait_for_completion(&unload_sem);
642#endif
643 pnpbios_proc_exit();
644 /* We ought to free resources here */
645 return;
646}
647
648module_init(pnpbios_init_all);
649module_exit(pnpbios_exit);
650
651#endif
652
653EXPORT_SYMBOL(pnpbios_protocol); 611EXPORT_SYMBOL(pnpbios_protocol);