Commit c73c12e3 authored by Patrick Mochel's avatar Patrick Mochel

ACPI: Remove acpi_exit() and friends, since it's never called.

Also, make sure acpi_init() is declared static and not prototyped anywhere.
parent d1d905d9
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#define PREFIX "ACPI: " #define PREFIX "ACPI: "
extern int acpi_disabled;
/* TBD: Make dynamic */ /* TBD: Make dynamic */
#define ACPI_MAX_HANDLES 10 #define ACPI_MAX_HANDLES 10
struct acpi_handle_list { struct acpi_handle_list {
...@@ -291,9 +293,6 @@ int acpi_bus_receive_event (struct acpi_bus_event *event); ...@@ -291,9 +293,6 @@ int acpi_bus_receive_event (struct acpi_bus_event *event);
int acpi_bus_register_driver (struct acpi_driver *driver); int acpi_bus_register_driver (struct acpi_driver *driver);
int acpi_bus_unregister_driver (struct acpi_driver *driver); int acpi_bus_unregister_driver (struct acpi_driver *driver);
int acpi_bus_scan (struct acpi_device *device); int acpi_bus_scan (struct acpi_device *device);
int acpi_init (void);
void acpi_exit (void);
#endif /*CONFIG_ACPI_BUS*/ #endif /*CONFIG_ACPI_BUS*/
......
...@@ -125,6 +125,5 @@ EXPORT_SYMBOL(acpi_bus_receive_event); ...@@ -125,6 +125,5 @@ EXPORT_SYMBOL(acpi_bus_receive_event);
EXPORT_SYMBOL(acpi_bus_register_driver); EXPORT_SYMBOL(acpi_bus_register_driver);
EXPORT_SYMBOL(acpi_bus_unregister_driver); EXPORT_SYMBOL(acpi_bus_unregister_driver);
EXPORT_SYMBOL(acpi_bus_scan); EXPORT_SYMBOL(acpi_bus_scan);
EXPORT_SYMBOL(acpi_init);
#endif /*CONFIG_ACPI_BUS*/ #endif /*CONFIG_ACPI_BUS*/
...@@ -49,8 +49,6 @@ MODULE_LICENSE("GPL"); ...@@ -49,8 +49,6 @@ MODULE_LICENSE("GPL");
extern void eisa_set_level_irq(unsigned int irq); extern void eisa_set_level_irq(unsigned int irq);
extern int acpi_disabled;
FADT_DESCRIPTOR acpi_fadt; FADT_DESCRIPTOR acpi_fadt;
struct acpi_device *acpi_root; struct acpi_device *acpi_root;
struct proc_dir_entry *acpi_root_dir; struct proc_dir_entry *acpi_root_dir;
...@@ -1813,44 +1811,7 @@ acpi_bus_init (void) ...@@ -1813,44 +1811,7 @@ acpi_bus_init (void)
} }
static void __exit static int __init acpi_init (void)
acpi_bus_exit (void)
{
acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE("acpi_bus_exit");
status = acpi_remove_notify_handler(ACPI_ROOT_OBJECT,
ACPI_SYSTEM_NOTIFY, acpi_bus_notify);
if (ACPI_FAILURE(status))
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Error removing notify handler\n"));
#ifdef CONFIG_ACPI_PCI
acpi_pci_root_exit();
acpi_pci_link_exit();
#endif
#ifdef CONFIG_ACPI_EC
acpi_ec_exit();
#endif
acpi_power_exit();
acpi_bus_remove(acpi_root, ACPI_BUS_REMOVAL_NORMAL);
remove_proc_entry(ACPI_BUS_FILE_ROOT, NULL);
status = acpi_terminate();
if (ACPI_FAILURE(status))
printk(KERN_ERR PREFIX "Unable to terminate the ACPI Interpreter\n");
else
printk(KERN_ERR PREFIX "Interpreter disabled\n");
return_VOID;
}
int __init
acpi_init (void)
{ {
int result = 0; int result = 0;
...@@ -1867,42 +1828,23 @@ acpi_init (void) ...@@ -1867,42 +1828,23 @@ acpi_init (void)
return -ENODEV; return -ENODEV;
} }
#ifdef CONFIG_PM
if (PM_IS_ACTIVE()) {
printk(KERN_INFO PREFIX "APM is already active, exiting\n");
return -ENODEV;
}
#endif
result = acpi_bus_init(); result = acpi_bus_init();
if (result)
return_VALUE(result);
#ifdef CONFIG_PM #ifdef CONFIG_PM
pm_active = 1; if (!result) {
#endif if (!PM_IS_ACTIVE())
pm_active = 1;
return_VALUE(0); else {
} printk(KERN_INFO PREFIX "APM is already active, exiting\n");
result = -ENODEV;
}
void __exit }
acpi_exit (void)
{
ACPI_FUNCTION_TRACE("acpi_exit");
#ifdef CONFIG_PM
pm_active = 0;
#endif #endif
return_VALUE(result);
acpi_bus_exit();
return_VOID;
} }
int __init static int __init acpi_setup(char *str)
acpi_setup(char *str)
{ {
while (str && *str) { while (str && *str) {
if (strncmp(str, "off", 3) == 0) if (strncmp(str, "off", 3) == 0)
......
...@@ -401,7 +401,6 @@ int acpi_pci_irq_init (void); ...@@ -401,7 +401,6 @@ int acpi_pci_irq_init (void);
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
int acpi_init(void);
int acpi_blacklisted(void); int acpi_blacklisted(void);
#endif /*CONFIG_ACPI*/ #endif /*CONFIG_ACPI*/
......
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