summaryrefslogtreecommitdiff
path: root/drivers/pnp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-22 00:46:01 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-22 00:46:01 +0300
commitf400bea2d44beec76f7e7f45e5372ef790336a4d (patch)
treef50010bb10cd952462ad40ee4793f4cdaf6006c8 /drivers/pnp
parentf648372dfe3e8e9dc8583c2b1790388be49bb47f (diff)
parented945296bb90ce79a7ff331885dd37eafa38b551 (diff)
downloadlinux-f400bea2d44beec76f7e7f45e5372ef790336a4d.tar.xz
Merge tag 'pnp-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/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()
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/pnpacpi/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index afaf30a3622c..38928ff7472b 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -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);