Commit d05aa0e7 authored by Len Brown's avatar Len Brown

[ACPI] revert button module unload fix (2281)

Cset exclude: len.brown@intel.com|ChangeSet|20040503042906|02093
Cset exclude: len.brown@intel.com|ChangeSet|20040428081825|02121
Cset exclude: len.brown@intel.com[lenb]|ChangeSet|20040428071221|03892
parent 681b5149
...@@ -108,9 +108,6 @@ static struct file_operations acpi_button_state_fops = { ...@@ -108,9 +108,6 @@ static struct file_operations acpi_button_state_fops = {
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
static struct proc_dir_entry *acpi_button_dir; static struct proc_dir_entry *acpi_button_dir;
extern struct acpi_device *acpi_fixed_pwr_button;
extern struct acpi_device *acpi_fixed_sleep_button;
static int acpi_button_info_seq_show(struct seq_file *seq, void *offset) static int acpi_button_info_seq_show(struct seq_file *seq, void *offset)
{ {
...@@ -530,12 +527,6 @@ acpi_button_exit (void) ...@@ -530,12 +527,6 @@ acpi_button_exit (void)
{ {
ACPI_FUNCTION_TRACE("acpi_button_exit"); ACPI_FUNCTION_TRACE("acpi_button_exit");
if(acpi_fixed_pwr_button)
acpi_button_remove(acpi_fixed_pwr_button, ACPI_BUS_TYPE_POWER_BUTTON);
if(acpi_fixed_sleep_button)
acpi_button_remove(acpi_fixed_sleep_button, ACPI_BUS_TYPE_SLEEP_BUTTON);
acpi_bus_unregister_driver(&acpi_button_driver); acpi_bus_unregister_driver(&acpi_button_driver);
remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir); remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir);
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/module.h>
#include <acpi/acpi_drivers.h> #include <acpi/acpi_drivers.h>
#include <acpi/acinterp.h> /* for acpi_ex_eisa_id_to_string() */ #include <acpi/acinterp.h> /* for acpi_ex_eisa_id_to_string() */
...@@ -16,12 +15,6 @@ ACPI_MODULE_NAME ("scan") ...@@ -16,12 +15,6 @@ ACPI_MODULE_NAME ("scan")
#define STRUCT_TO_INT(s) (*((int*)&s)) #define STRUCT_TO_INT(s) (*((int*)&s))
extern struct acpi_device *acpi_root; extern struct acpi_device *acpi_root;
struct acpi_device *acpi_fixed_pwr_button;
struct acpi_device *acpi_fixed_sleep_button;
EXPORT_SYMBOL(acpi_fixed_pwr_button);
EXPORT_SYMBOL(acpi_fixed_sleep_button);
#define ACPI_BUS_CLASS "system_bus" #define ACPI_BUS_CLASS "system_bus"
...@@ -907,13 +900,10 @@ acpi_bus_scan_fixed ( ...@@ -907,13 +900,10 @@ acpi_bus_scan_fixed (
struct acpi_device *root) struct acpi_device *root)
{ {
int result = 0; int result = 0;
struct acpi_device *device = NULL;
ACPI_FUNCTION_TRACE("acpi_bus_scan_fixed"); ACPI_FUNCTION_TRACE("acpi_bus_scan_fixed");
acpi_fixed_pwr_button = NULL;
acpi_fixed_sleep_button = NULL;
if (!root) if (!root)
return_VALUE(-ENODEV); return_VALUE(-ENODEV);
...@@ -921,11 +911,11 @@ acpi_bus_scan_fixed ( ...@@ -921,11 +911,11 @@ acpi_bus_scan_fixed (
* Enumerate all fixed-feature devices. * Enumerate all fixed-feature devices.
*/ */
if (acpi_fadt.pwr_button == 0) if (acpi_fadt.pwr_button == 0)
result = acpi_bus_add(&acpi_fixed_pwr_button, acpi_root, result = acpi_bus_add(&device, acpi_root,
NULL, ACPI_BUS_TYPE_POWER_BUTTON); NULL, ACPI_BUS_TYPE_POWER_BUTTON);
if (acpi_fadt.sleep_button == 0) if (acpi_fadt.sleep_button == 0)
result = acpi_bus_add(&acpi_fixed_sleep_button, acpi_root, result = acpi_bus_add(&device, acpi_root,
NULL, ACPI_BUS_TYPE_SLEEP_BUTTON); NULL, ACPI_BUS_TYPE_SLEEP_BUTTON);
return_VALUE(result); return_VALUE(result);
......
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