platform/x86/amd/hsmp: Cache pci_dev in struct hsmp_socket
authorSuma Hegde <suma.hegde@amd.com>
Sat, 6 Jan 2024 02:25:23 +0000 (02:25 +0000)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 25 Jan 2024 12:51:12 +0000 (14:51 +0200)
commit287a821c76be80d69d9a82a94147d0daa5232a4b
tree7c8ae79bf94a82fba7f171aa670f275d3b3f2125
parente6100ef3c0bf52e801d08d247cea93cfa73a0d31
platform/x86/amd/hsmp: Cache pci_dev in struct hsmp_socket

Cache pci_dev obj during probe as part of struct hsmp_socket
and use in amd_hsmp_rdwr(). This change will make it easier to
support both non-ACPI and ACPI devices.

Also add a check for sock_index agsint number of sockets
in the hsmp_send_message().

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240106022532.1746932-2-suma.hegde@amd.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/hsmp.c