iio: humidity: hts221: Remove unnecessary cast on void pointer
authorsimran singhal <singhalsimran0@gmail.com>
Sat, 1 Apr 2017 14:14:15 +0000 (19:44 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sun, 2 Apr 2017 08:50:32 +0000 (09:50 +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/humidity/hts221_buffer.c

index 72ddcdac21a2713cda916bd488369538ae3b68aa..7d19a3da7ab740394463a0ed2c3128ea57ea5dff 100644 (file)
@@ -41,7 +41,7 @@ static const struct iio_trigger_ops hts221_trigger_ops = {
 
 static irqreturn_t hts221_trigger_handler_thread(int irq, void *private)
 {
-       struct hts221_hw *hw = (struct hts221_hw *)private;
+       struct hts221_hw *hw = private;
        u8 status;
        int err;