Skip to content

Commit

Permalink
staging:iio:lpc32xx_adc: Use resource_size instead of opencoding it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Oct 19, 2012
1 parent 6fae58f commit 6c724cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/adc/lpc32xx_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c724cb

Please sign in to comment.