diff options
author | Tapasweni Pathak <tapaswenipathak@gmail.com> | 2014-10-30 17:02:25 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-30 13:05:47 -0700 |
commit | 31f8f066f5bc8dc5ce1efbbdfddec401ed790a2b (patch) | |
tree | 733ec178458479a8ca2c964fcc666ed8b9a8095d /drivers/staging/iio | |
parent | edb3cc10e03874067c7e86107462a89b54bfdfc9 (diff) |
staging: iio: adc: Remove useless cast on void pointer
void pointers do not need to be cast to other pointer types.
The semantic patch used to find this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Build tested it.
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/adc/ad7606_spi.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/adc/lpc32xx_adc.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/adc/spear_adc.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/iio/adc/ad7606_spi.c b/drivers/staging/iio/adc/ad7606_spi.c index 6a8ecd73a1a7..7303983e64a7 100644 --- a/drivers/staging/iio/adc/ad7606_spi.c +++ b/drivers/staging/iio/adc/ad7606_spi.c @@ -23,7 +23,7 @@ static int ad7606_spi_read_block(struct device *dev, int i, ret; unsigned short *data = buf; - ret = spi_read(spi, (u8 *)buf, count * 2); + ret = spi_read(spi, buf, count * 2); if (ret < 0) { dev_err(&spi->dev, "SPI read error\n"); return ret; diff --git a/drivers/staging/iio/adc/lpc32xx_adc.c b/drivers/staging/iio/adc/lpc32xx_adc.c index a876ce755351..84a53a9430ef 100644 --- a/drivers/staging/iio/adc/lpc32xx_adc.c +++ b/drivers/staging/iio/adc/lpc32xx_adc.c @@ -116,7 +116,7 @@ static const struct iio_chan_spec lpc32xx_adc_iio_channels[] = { static irqreturn_t lpc32xx_adc_isr(int irq, void *dev_id) { - struct lpc32xx_adc_info *info = (struct lpc32xx_adc_info *) dev_id; + struct lpc32xx_adc_info *info = dev_id; /* Read value and clear irq */ info->value = __raw_readl(LPC32XX_ADC_VALUE(info->adc_base)) & diff --git a/drivers/staging/iio/adc/spear_adc.c b/drivers/staging/iio/adc/spear_adc.c index 67a364c2e794..de37b35ea154 100644 --- a/drivers/staging/iio/adc/spear_adc.c +++ b/drivers/staging/iio/adc/spear_adc.c @@ -226,7 +226,7 @@ static const struct iio_chan_spec spear_adc_iio_channels[] = { static irqreturn_t spear_adc_isr(int irq, void *dev_id) { - struct spear_adc_state *st = (struct spear_adc_state *)dev_id; + struct spear_adc_state *st = dev_id; /* Read value to clear IRQ */ st->value = spear_adc_get_average(st); |