Skip to content

Commit

Permalink
Merge tag 'pnp-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/rafael/linux-pm

Pull PnP update from Rafael Wysocki:
 "Replace acpi_bus_get_device() in the PNP code with
  acpi_fetch_acpi_dev() which is better"

* tag 'pnp-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PNP: Replace acpi_bus_get_device()
  • Loading branch information
torvalds committed Mar 21, 2022
2 parents f648372 + ed94529 commit f400bea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pnp/pnpacpi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle,
u32 lvl, void *context,
void **rv)
{
struct acpi_device *device;
struct acpi_device *device = acpi_fetch_acpi_dev(handle);

if (acpi_bus_get_device(handle, &device))
if (!device)
return AE_CTRL_DEPTH;
if (acpi_is_pnp_device(device))
pnpacpi_add_device(device);
Expand Down

0 comments on commit f400bea

Please sign in to comment.