#include <linux/init.h>
#include <linux/acpi.h>
-#include <linux/module.h>
#include <acpi/acpi_drivers.h>
#include <acpi/acinterp.h> /* for acpi_ex_eisa_id_to_string() */
#define STRUCT_TO_INT(s) (*((int*)&s))
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"
struct acpi_device * dev = container_of(node,struct acpi_device,g_list);
if (dev->driver == drv) {
+ spin_unlock(&acpi_device_lock);
if (drv->ops.remove)
drv->ops.remove(dev,ACPI_BUS_REMOVAL_NORMAL);
+ spin_lock(&acpi_device_lock);
dev->driver = NULL;
dev->driver_data = NULL;
atomic_dec(&drv->references);
struct acpi_device *root)
{
int result = 0;
+ struct acpi_device *device = NULL;
ACPI_FUNCTION_TRACE("acpi_bus_scan_fixed");
- acpi_fixed_pwr_button = NULL;
- acpi_fixed_sleep_button = NULL;
-
-
if (!root)
return_VALUE(-ENODEV);
* Enumerate all fixed-feature devices.
*/
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);
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);
return_VALUE(result);