Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29138
b: refs/heads/master
c: 06ea8e0
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed May 14, 2006
1 parent 8650c26 commit 3966ff6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4513a57ef719d3d6d1cee0ca4d9f4016aa452bb
refs/heads/master: 06ea8e08ae7e7e450b6a78e7ce5e10b3c5f954ea
32 changes: 10 additions & 22 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static void acpi_device_register(struct acpi_device *device,
create_sysfs_device_files(device);
}

static int acpi_device_unregister(struct acpi_device *device, int type)
static void acpi_device_unregister(struct acpi_device *device, int type)
{
spin_lock(&acpi_device_lock);
if (device->parent) {
Expand All @@ -158,7 +158,6 @@ static int acpi_device_unregister(struct acpi_device *device, int type)
acpi_detach_data(device->handle, acpi_bus_data_handler);
remove_sysfs_device_files(device);
kobject_unregister(&device->kobj);
return 0;
}

void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context)
Expand Down Expand Up @@ -577,7 +576,7 @@ static void acpi_driver_attach(struct acpi_driver *drv)
spin_unlock(&acpi_device_lock);
}

static int acpi_driver_detach(struct acpi_driver *drv)
static void acpi_driver_detach(struct acpi_driver *drv)
{
struct list_head *node, *next;

Expand All @@ -599,7 +598,6 @@ static int acpi_driver_detach(struct acpi_driver *drv)
}
}
spin_unlock(&acpi_device_lock);
return_VALUE(0);
}

/**
Expand All @@ -617,9 +615,6 @@ int acpi_bus_register_driver(struct acpi_driver *driver)
if (acpi_disabled)
return_VALUE(-ENODEV);

if (!driver)
return_VALUE(-EINVAL);

spin_lock(&acpi_device_lock);
list_add_tail(&driver->node, &acpi_bus_drivers);
spin_unlock(&acpi_device_lock);
Expand All @@ -637,23 +632,16 @@ EXPORT_SYMBOL(acpi_bus_register_driver);
* Unregisters a driver with the ACPI bus. Searches the namespace for all
* devices that match the driver's criteria and unbinds.
*/
int acpi_bus_unregister_driver(struct acpi_driver *driver)
void acpi_bus_unregister_driver(struct acpi_driver *driver)
{
int error = 0;

ACPI_FUNCTION_TRACE("acpi_bus_unregister_driver");

if (driver) {
acpi_driver_detach(driver);
acpi_driver_detach(driver);

if (!atomic_read(&driver->references)) {
spin_lock(&acpi_device_lock);
list_del_init(&driver->node);
spin_unlock(&acpi_device_lock);
}
} else
error = -EINVAL;
return_VALUE(error);
if (!atomic_read(&driver->references)) {
spin_lock(&acpi_device_lock);
list_del_init(&driver->node);
spin_unlock(&acpi_device_lock);
}
return;
}

EXPORT_SYMBOL(acpi_bus_unregister_driver);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/acpi/acpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ int acpi_bus_set_power(acpi_handle handle, int state);
int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data);
int acpi_bus_receive_event(struct acpi_bus_event *event);
int acpi_bus_register_driver(struct acpi_driver *driver);
int acpi_bus_unregister_driver(struct acpi_driver *driver);
void acpi_bus_unregister_driver(struct acpi_driver *driver);
int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
acpi_handle handle, int type);
int acpi_bus_trim(struct acpi_device *start, int rmdevice);
Expand Down

0 comments on commit 3966ff6

Please sign in to comment.