summaryrefslogtreecommitdiff
path: root/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-01-03 16:53:55 +0300
committerJiri Kosina <jkosina@suse.cz>2021-01-04 18:08:12 +0300
commitde30491e8bfeeba1500bba293333eb51ece529d5 (patch)
tree573cee8beaef1e4dadc29293ecdfeab7190f5e13 /drivers/hid/amd-sfh-hid/amd_sfh_pcie.h
parentc3d6eb6e54373f297313b65c1f2319d36914d579 (diff)
downloadlinux-de30491e8bfeeba1500bba293333eb51ece529d5.tar.xz
HID: sfh: fix address space confusion
The new driver uses a phys_addr_t to store a DMA address, which does not work when the two are different size: drivers/hid/amd-sfh-hid/amd_sfh_client.c:157:11: error: incompatible pointer types passing 'phys_addr_t *' (aka 'unsigned int *') to parameter of type 'dma_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types] &cl_data->sensor_phys_addr[i], ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dma-mapping.h:393:15: note: passing argument to parameter 'dma_handle' here dma_addr_t *dma_handle, gfp_t gfp) ^ Change both the type and the variable name to dma_addr for consistency. Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/amd-sfh-hid/amd_sfh_pcie.h')
-rw-r--r--drivers/hid/amd-sfh-hid/amd_sfh_pcie.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h
index e8be94f935b7..8f8d19b2cfe5 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h
@@ -67,7 +67,7 @@ struct amd_mp2_dev {
struct amd_mp2_sensor_info {
u8 sensor_idx;
u32 period;
- phys_addr_t phys_address;
+ dma_addr_t dma_address;
};
void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info);