diff options
| author | Basavaraj Natikar <Basavaraj.Natikar@amd.com> | 2025-09-18 18:02:02 +0530 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2025-09-19 17:30:02 +0200 |
| commit | bba920e6f803138587248079de47ad3464a396f6 (patch) | |
| tree | f7f3d74f1e391f37be12e366a88f18cb8764e53c /drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | |
| parent | HID: asus: add support for missing PX series fn keys (diff) | |
| download | linux-bba920e6f803138587248079de47ad3464a396f6.tar.gz linux-bba920e6f803138587248079de47ad3464a396f6.zip | |
HID: amd_sfh: Add sync across amd sfh work functions
The process of the report is delegated across different work functions.
Hence, add a sync mechanism to protect SFH work data across functions.
Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
Reported-by: Matthew Schwartz <matthew.schwartz@linux.dev>
Closes: https://lore.kernel.org/all/a21abca5-4268-449d-95f1-bdd7a25894a5@linux.dev/
Tested-by: Prakruthi SP <Prakruthi.SP@amd.com>
Co-developed-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
Signed-off-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to '')
| -rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c index 2983af969579..1d9f955573aa 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c @@ -466,6 +466,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i if (!privdata->cl_data) return -ENOMEM; + rc = devm_mutex_init(&pdev->dev, &privdata->lock); + if (rc) + return rc; + privdata->sfh1_1_ops = (const struct amd_sfh1_1_ops *)id->driver_data; if (privdata->sfh1_1_ops) { if (boot_cpu_data.x86 >= 0x1A) |
