mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
ACPI/APMT: use platform_device_set_fwnode()
Platform devices using the split approach of calling platform_device_alloc() and platform_device_add() must not assign the firmware nodes manually but use the provided platform_device_set_fwnode() function which additionally makes sure we track the reference count of the firmware node correctly. Replace the manual assignment of the firmware node with a call to platform_device_set_fwnode(). Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Acked-by: Sudeep Holla <sudeep.holla@kernel.org> Link: https://patch.msgid.link/20260728-acpi-arm64-pdev-set-fwnode-v1-1-b5aff9b2235a@oss.qualcomm.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
committed by
Danilo Krummrich
parent
b48373c901
commit
5ab289f5ea
@@ -99,7 +99,7 @@ static int __init apmt_add_platform_device(struct acpi_apmt_node *node,
|
||||
if (ret)
|
||||
goto dev_put;
|
||||
|
||||
pdev->dev.fwnode = fwnode;
|
||||
platform_device_set_fwnode(pdev, fwnode);
|
||||
|
||||
ret = platform_device_add(pdev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user