Re: [PATCH 2/4] staging:iio:lpc32xx_adc: Use resource_size instead of opencoding it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/18/2012 04:43 PM, Lars-Peter Clausen wrote:
> 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@xxxxxxxxxx>

Acked-by: Roland Stigge <stigge@xxxxxxxxx>

> Cc: Roland Stigge <stigge@xxxxxxxxx>
> ---
>  drivers/staging/iio/adc/lpc32xx_adc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux