diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-10-18 15:43:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-10-19 16:25:31 +0100 |
commit | 6c724cb0ad772ae43928467f0a44731848eb22b2 (patch) | |
tree | ca90b3544de75692b9b5b92ca600cf6862ec48a5 /drivers/staging/iio | |
parent | 6fae58f39207d03ae78b0b03347810d0f8452ab6 (diff) | |
download | op-kernel-dev-6c724cb0ad772ae43928467f0a44731848eb22b2.zip op-kernel-dev-6c724cb0ad772ae43928467f0a44731848eb22b2.tar.gz |
staging:iio:lpc32xx_adc: Use resource_size instead of opencoding it
Fixes the following error from coccicheck:
drivers/staging/iio/adc/lpc32xx_adc.c:153:43-46: ERROR: Missing resource_size with res
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/adc/lpc32xx_adc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/adc/lpc32xx_adc.c b/drivers/staging/iio/adc/lpc32xx_adc.c index 7e9bd00..10c5962 100644 --- a/drivers/staging/iio/adc/lpc32xx_adc.c +++ b/drivers/staging/iio/adc/lpc32xx_adc.c @@ -150,7 +150,7 @@ static int __devinit lpc32xx_adc_probe(struct platform_device *pdev) info = iio_priv(iodev); - info->adc_base = ioremap(res->start, res->end - res->start + 1); + info->adc_base = ioremap(res->start, resource_size(res)); if (!info->adc_base) { dev_err(&pdev->dev, "failed mapping memory\n"); retval = -EBUSY; |