HID: Intel-thc-hid: Intel-thc: fix dma_unmap_sg() nents value

[ Upstream commit 0e13150c1a ]

The `dma_unmap_sg()` functions should be called with the same nents as the
`dma_map_sg()`, not the value the map function returned.

Save the number of entries in struct thc_dma_configuration.

Fixes: a688404b2e ("HID: intel-thc-hid: intel-thc: Add THC DMA interfaces")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Even Xu <even.xu@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Thomas Fourier 2025-12-03 17:56:35 +01:00 • committed by Greg Kroah-Hartman
commit a5eeebb994
2 changed files with 5 additions and 1 deletions