aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel/pmt/class.c
diff options
context:
space:
mode:
authorShyam Sundar S K <[email protected]>2024-11-04 05:48:29 +0000
committerIlpo Järvinen <[email protected]>2024-11-04 13:13:45 +0000
commitba6ad33d5c870d8b1d22388292c872ba4af98ea1 (patch)
tree4b14f2bdeb6c5abb555113d357d161efbcb7599e /drivers/platform/x86/intel/pmt/class.c
parentMAINTAINERS: Change AMD PMF driver status to "Supported" (diff)
downloadkernel-ba6ad33d5c870d8b1d22388292c872ba4af98ea1.tar.gz
kernel-ba6ad33d5c870d8b1d22388292c872ba4af98ea1.zip
platform/x86/amd/pmf: Switch to platform_get_resource() and devm_ioremap_resource()
Use platform_get_resource() to fetch the memory resource instead of acpi_walk_resources() and devm_ioremap_resource() for mapping the resources. PS: We cannot use resource_size() here because it adds an extra byte to round off the size. In the case of PMF ResourceTemplate(), this rounding is already handled within the _CRS. Using resource_size() would increase the resource size by 1, causing a mismatch with the length field and leading to issues. Therefore, simply use end-start of the ACPI resource to obtain the actual length. Co-developed-by: Patil Rajesh Reddy <[email protected]> Signed-off-by: Patil Rajesh Reddy <[email protected]> Signed-off-by: Shyam Sundar S K <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ij: added a cast to resource_size_t printing] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions