Merge branch 'acpi-bus'
* acpi-bus: ACPI: bus: Eliminate acpi_bus_get_device()
This commit is contained in:
commit
87ad236001
|
@ -588,19 +588,6 @@ static struct acpi_device *handle_to_device(acpi_handle handle,
|
||||||
return adev;
|
return adev;
|
||||||
}
|
}
|
||||||
|
|
||||||
int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
|
|
||||||
{
|
|
||||||
if (!device)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
*device = handle_to_device(handle, NULL);
|
|
||||||
if (!*device)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(acpi_bus_get_device);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* acpi_fetch_acpi_dev - Retrieve ACPI device object.
|
* acpi_fetch_acpi_dev - Retrieve ACPI device object.
|
||||||
* @handle: ACPI handle associated with the requested ACPI device object.
|
* @handle: ACPI handle associated with the requested ACPI device object.
|
||||||
|
|
|
@ -2406,7 +2406,8 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data)
|
||||||
} else {
|
} else {
|
||||||
struct acpi_device *adev;
|
struct acpi_device *adev;
|
||||||
|
|
||||||
if (acpi_bus_get_device(parent_handle, &adev))
|
adev = acpi_fetch_acpi_dev(parent_handle);
|
||||||
|
if (!adev)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
ctlr = acpi_spi_find_controller_by_adev(adev);
|
ctlr = acpi_spi_find_controller_by_adev(adev);
|
||||||
|
|
|
@ -509,7 +509,6 @@ extern int unregister_acpi_notifier(struct notifier_block *);
|
||||||
* External Functions
|
* External Functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
|
|
||||||
struct acpi_device *acpi_fetch_acpi_dev(acpi_handle handle);
|
struct acpi_device *acpi_fetch_acpi_dev(acpi_handle handle);
|
||||||
acpi_status acpi_bus_get_status_handle(acpi_handle handle,
|
acpi_status acpi_bus_get_status_handle(acpi_handle handle,
|
||||||
unsigned long long *sta);
|
unsigned long long *sta);
|
||||||
|
|
Loading…
Reference in New Issue