Skip to contentSkip to conversation

HID: amd_sfh: Set the AMD SFH driver to depend on x86

PATCH Applied Basavaraj Natikar 2 participants 2 messages Feb 28, 2024

Subsystems (2)
lore
Share & tools
lore

Basavaraj Natikar

author maintainer
#0 lore raw

PATCH 1/1 HID: amd_sfh: Set the AMD SFH driver to depend on x86

Considering that amd_sfh exists only on AMD platforms, set the AMD SFH driver to depend on x86 to avoid build warnings or errors on other architectures, as shown below.

drivers/hid/amd-sfh-hid/amd_sfh_pcie.c: In function 'amd_mp2_pci_probe':
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:413:21: error: 'boot_cpu_data' undeclared (first use in this function); did you mean 'boot_cpu_hwid'?

  413 |                 if (boot_cpu_data.x86 >= 0x1A)
      |                     ^~~~~~~~~~~~~
      |                     boot_cpu_hwid
Fixes 6296562f30b1 ("HID: amd_sfh: Extend MP2 register access to SFH")
---
 drivers/hid/amd-sfh-hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hid/amd-sfh-hid/Kconfig +1 -0
index af752dd3a340..329de5e12c1a 100644
@@ -6,6 +6,7 @@ menu "AMD SFH HID Support"
 config AMD_SFH_HID
 	tristate "AMD Sensor Fusion Hub"
 	depends on HID
+	depends on X86
 	help
 	  If you say yes to this option, support will be included for the
 	  AMD Sensor Fusion Hub.
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Basavaraj Natikar

Considering that amd_sfh exists only on AMD platforms, set the AMD SFH driver to depend on x86 to avoid build warnings or errors on other architectures, as shown below.

drivers/hid/amd-sfh-hid/amd_sfh_pcie.c: In function 'amd_mp2_pci_probe':
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:413:21: error: 'boot_cpu_data' undeclared (first use in this function); did you mean 'boot_cpu_hwid'?

Quoted 8 lines
  413 |                 if (boot_cpu_data.x86 >= 0x1A)
      |                     ^~~~~~~~~~~~~
      |                     boot_cpu_hwid
Fixes 6296562f30b1 ("HID: amd_sfh: Extend MP2 register access to SFH")

Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs