Skip to content

Commit 87ad236

Browse files
committed
Merge branch 'acpi-bus'
* acpi-bus: ACPI: bus: Eliminate acpi_bus_get_device()
2 parents dfbba25 + ac2a3fe commit 87ad236

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

drivers/acpi/scan.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -588,19 +588,6 @@ static struct acpi_device *handle_to_device(acpi_handle handle,
588588
return adev;
589589
}
590590

591-
int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
592-
{
593-
if (!device)
594-
return -EINVAL;
595-
596-
*device = handle_to_device(handle, NULL);
597-
if (!*device)
598-
return -ENODEV;
599-
600-
return 0;
601-
}
602-
EXPORT_SYMBOL(acpi_bus_get_device);
603-
604591
/**
605592
* acpi_fetch_acpi_dev - Retrieve ACPI device object.
606593
* @handle: ACPI handle associated with the requested ACPI device object.

drivers/spi/spi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2406,7 +2406,8 @@ static int acpi_spi_add_resource(struct acpi_resource *ares, void *data)
24062406
} else {
24072407
struct acpi_device *adev;
24082408

2409-
if (acpi_bus_get_device(parent_handle, &adev))
2409+
adev = acpi_fetch_acpi_dev(parent_handle);
2410+
if (!adev)
24102411
return -ENODEV;
24112412

24122413
ctlr = acpi_spi_find_controller_by_adev(adev);

include/acpi/acpi_bus.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,6 @@ extern int unregister_acpi_notifier(struct notifier_block *);
509509
* External Functions
510510
*/
511511

512-
int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
513512
struct acpi_device *acpi_fetch_acpi_dev(acpi_handle handle);
514513
acpi_status acpi_bus_get_status_handle(acpi_handle handle,
515514
unsigned long long *sta);

0 commit comments

Comments
 (0)