aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-03-03 23:34:42 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-03-23 17:55:20 +0000
commit7ecb809c2a9532a14b31a76edc55bad4555dced4 (patch)
tree38f78ca200ce7aec62e8a009c238e0b0d06efab3
parentf360f34ef57b25c0a15dc62cdf1f787858dccc18 (diff)
downloadiio-7ecb809c2a9532a14b31a76edc55bad4555dced4.tar.gz
iio: imu: st_lsm6dsx: drop casting to void in dev_set_drvdata
The C standard specifies that there is no need to cast from a pointer to void [1]. Therefore, it can be safely dropped. [1] C Standard Committee: https://c0x.shape-of-code.com/6.3.2.3.html Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240303-void_in_dev_set_drvdata-v1-4-ae39027d740b@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
index 0716986f98129..937ff9c5a74c7 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -2726,7 +2726,7 @@ int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id,
if (!hw)
return -ENOMEM;
- dev_set_drvdata(dev, (void *)hw);
+ dev_set_drvdata(dev, hw);
mutex_init(&hw->fifo_lock);
mutex_init(&hw->conf_lock);