ACPI / bind: Rework struct acpi_bus_type

Replace the .find_device function pointer in struct acpi_bus_type
with a new one, .find_companion, that is supposed to point to a
function returning struct acpi_device pointer (instead of an int)
and takes one argument (instead of two).  This way the role of
this callback is more clear and the implementation of it can
be more straightforward.

Update all of the users of struct acpi_bus_type (PCI, PNP/ACPI and
USB) to reflect the structure change.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Lan Tianyu <tianyu.lan@intel.com> # for USB/ACPI
This commit is contained in:
Rafael J. Wysocki
2013-11-29 16:27:34 +01:00
szülő 9c5ad36d98
commit e3f02c5228
5 fájl változott, egészen pontosan 39 új sor hozzáadva és 48 régi sor törölve

Fájl megtekintése

@@ -412,7 +412,7 @@ struct acpi_bus_type {
struct list_head list;
const char *name;
bool (*match)(struct device *dev);
int (*find_device) (struct device *, acpi_handle *);
struct acpi_device * (*find_companion)(struct device *);
void (*setup)(struct device *);
void (*cleanup)(struct device *);
};