]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: light: apds9306: remove redundant explicit pointer cast
authorSAJJA EASWAR SAI <eshwarsajja20@gmail.com>
Thu, 29 Jan 2026 21:04:31 +0000 (02:34 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 3 Mar 2026 21:20:00 +0000 (21:20 +0000)
C allows implicit conversion from void * to struct apds9306_data *, so the
explicit cast on 'ptr' is unnecessary. Removing it improves readability.

Signed-off-by: SAJJA EASWAR SAI <eshwarsajja20@gmail.com>
Acked-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/apds9306.c

index 7e68cca0edfa5159b1e789363a4425c86876dd39..5d18eabd961e44144e99bf9eb8d7f3ef2f4d8e12 100644 (file)
@@ -1176,7 +1176,7 @@ static int apds9306_init_iio_gts(struct apds9306_data *data)
 
 static void apds9306_powerdown(void *ptr)
 {
-       struct apds9306_data *data = (struct apds9306_data *)ptr;
+       struct apds9306_data *data = ptr;
        struct apds9306_regfields *rf = &data->rf;
        int ret;