iio: dac: ad5504: Remove unnecessary cast on void pointer
authorsimran singhal <singhalsimran0@gmail.com>
Sat, 1 Apr 2017 14:11:53 +0000 (19:41 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sun, 2 Apr 2017 08:48:50 +0000 (09:48 +0100)
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|
- (T*)
  e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/dac/ad5504.c

index 22a027de498a1fe32433a7ad5b2cbf57f1c6b40e..712d86b4be09b86ad5b6e224054f9bc69e57659e 100644 (file)
@@ -223,7 +223,7 @@ static irqreturn_t ad5504_event_handler(int irq, void *private)
                                            0,
                                            IIO_EV_TYPE_THRESH,
                                            IIO_EV_DIR_RISING),
-                      iio_get_time_ns((struct iio_dev *)private));
+                      iio_get_time_ns(private));
 
        return IRQ_HANDLED;
 }