summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-10-18 15:43:00 +0100
committerJonathan Cameron <jic23@kernel.org>2012-10-19 16:25:31 +0100
commit6c724cb0ad772ae43928467f0a44731848eb22b2 (patch)
treeca90b3544de75692b9b5b92ca600cf6862ec48a5 /drivers
parent6fae58f39207d03ae78b0b03347810d0f8452ab6 (diff)
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')
-rw-r--r--drivers/staging/iio/adc/lpc32xx_adc.c2
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 7e9bd0001cc7..10c59622671f 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;