Commit 2e1363f0 authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] export acpi_match_ids()

Signed-off-by: default avatarDavid Shaohua Li <shaohua.li@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 2b5ef8fb
......@@ -161,7 +161,7 @@ acpi_bus_get_power_flags (
return 0;
}
static int
int
acpi_match_ids (
struct acpi_device *device,
char *ids)
......@@ -312,12 +312,9 @@ acpi_bus_match (
struct acpi_device *device,
struct acpi_driver *driver)
{
int error = 0;
error = driver->ops.match ? driver->ops.match(device, driver) :
acpi_match_ids(device, driver->ids) ;
return error;
if (driver && driver->ops.match)
return driver->ops.match(device, driver);
return acpi_match_ids(device, driver->ids);
}
......@@ -498,9 +495,6 @@ acpi_bus_find_driver (
ACPI_FUNCTION_TRACE("acpi_bus_find_driver");
if (!device->flags.hardware_id && !device->flags.compatible_ids)
goto Done;
spin_lock(&acpi_device_lock);
list_for_each_safe(node,next,&acpi_bus_drivers) {
struct acpi_driver * driver = container_of(node,struct acpi_driver,node);
......
......@@ -104,7 +104,8 @@ typedef int (*acpi_op_suspend) (struct acpi_device *device, int state);
typedef int (*acpi_op_resume) (struct acpi_device *device, int state);
typedef int (*acpi_op_scan) (struct acpi_device *device);
typedef int (*acpi_op_bind) (struct acpi_device *device);
typedef int (*acpi_op_match) (struct acpi_device *device, struct acpi_driver *driver);
typedef int (*acpi_op_match) (struct acpi_device *device,
struct acpi_driver *driver);
struct acpi_device_ops {
acpi_op_add add;
......@@ -324,6 +325,7 @@ 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);
int acpi_match_ids (struct acpi_device *device, char *ids);
int acpi_create_dir(struct acpi_device *);
void acpi_remove_dir(struct acpi_device *);
......
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