Use resource_size() for ioremap.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Molton <[email protected]>
Cc: Samuel Ortiz <[email protected]>
---
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index 0a255c1..20bbd1d 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -341,7 +341,7 @@ static int t7l66xb_probe(struct platform_device *dev)
if (ret)
goto err_request_scr;
- t7l66xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
+ t7l66xb->scr = ioremap(rscr->start, resource_size(rscr));
if (!t7l66xb->scr) {
ret = -ENOMEM;
goto err_ioremap;
Hi Hartley,
On Fri, Dec 11, 2009 at 07:07:32PM -0500, H Hartley Sweeten wrote:
> Use resource_size() for ioremap.
Patch applied, thanks.
> Signed-off-by: H Hartley Sweeten <[email protected]>
> Cc: Ian Molton <[email protected]>
> Cc: Samuel Ortiz <[email protected]>
>
> ---
>
> diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
> index 0a255c1..20bbd1d 100644
> --- a/drivers/mfd/t7l66xb.c
> +++ b/drivers/mfd/t7l66xb.c
> @@ -341,7 +341,7 @@ static int t7l66xb_probe(struct platform_device *dev)
> if (ret)
> goto err_request_scr;
>
> - t7l66xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
> + t7l66xb->scr = ioremap(rscr->start, resource_size(rscr));
> if (!t7l66xb->scr) {
> ret = -ENOMEM;
> goto err_ioremap;
--
Intel Open Source Technology Centre
http://oss.intel.com/