diff options
author | Javier Carrasco <javier.carrasco.cruz@gmail.com> | 2024-03-03 23:34:41 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-03-25 21:10:12 +0100 |
commit | 8c5b0ea6179d40dac239f772da706c2b779d29aa (patch) | |
tree | 6395d61b59856eeb4e807c6ba52c24546c20d2de /drivers/iio/humidity/hts221_core.c | |
parent | io: light: st_uvis25: drop casting to void in dev_set_drvdata (diff) | |
download | linux-8c5b0ea6179d40dac239f772da706c2b779d29aa.tar.xz linux-8c5b0ea6179d40dac239f772da706c2b779d29aa.zip |
iio: humidity: hts211: 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-3-ae39027d740b@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/humidity/hts221_core.c')
-rw-r--r-- | drivers/iio/humidity/hts221_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/humidity/hts221_core.c b/drivers/iio/humidity/hts221_core.c index 2a413da87b76..87627d116eff 100644 --- a/drivers/iio/humidity/hts221_core.c +++ b/drivers/iio/humidity/hts221_core.c @@ -573,7 +573,7 @@ int hts221_probe(struct device *dev, int irq, const char *name, if (!iio_dev) return -ENOMEM; - dev_set_drvdata(dev, (void *)iio_dev); + dev_set_drvdata(dev, iio_dev); hw = iio_priv(iio_dev); hw->name = name; |