mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dma: ipu_idmac.c: use resource_size in ioremap
@ 2011-06-01 22:10 H Hartley Sweeten
  2011-06-06  8:15 ` Koul, Vinod
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2011-06-01 22:10 UTC (permalink / raw)
  To: Linux Kernel; +Cc: dan.j.williams, vinod.koul, g.liakhovetski, agust

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Anatolij Gustschin <agust@denx.de>

---

diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c
index c1a125e..25447a8 100644
--- a/drivers/dma/ipu/ipu_idmac.c
+++ b/drivers/dma/ipu/ipu_idmac.c
@@ -1705,16 +1705,14 @@ static int __init ipu_probe(struct platform_device *pdev)
 		ipu_data.irq_fn, ipu_data.irq_err, ipu_data.irq_base);
 
 	/* Remap IPU common registers */
-	ipu_data.reg_ipu = ioremap(mem_ipu->start,
-				   mem_ipu->end - mem_ipu->start + 1);
+	ipu_data.reg_ipu = ioremap(mem_ipu->start, resource_size(mem_ipu));
 	if (!ipu_data.reg_ipu) {
 		ret = -ENOMEM;
 		goto err_ioremap_ipu;
 	}
 
 	/* Remap Image Converter and Image DMA Controller registers */
-	ipu_data.reg_ic = ioremap(mem_ic->start,
-				  mem_ic->end - mem_ic->start + 1);
+	ipu_data.reg_ic = ioremap(mem_ic->start, resource_size(mem_ic));
 	if (!ipu_data.reg_ic) {
 		ret = -ENOMEM;
 		goto err_ioremap_ic;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dma: ipu_idmac.c: use resource_size in ioremap
  2011-06-01 22:10 [PATCH] dma: ipu_idmac.c: use resource_size in ioremap H Hartley Sweeten
@ 2011-06-06  8:15 ` Koul, Vinod
  0 siblings, 0 replies; 2+ messages in thread
From: Koul, Vinod @ 2011-06-06  8:15 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: Linux Kernel, dan.j.williams, g.liakhovetski, agust

On Wed, 2011-06-01 at 15:10 -0700, H Hartley Sweeten wrote:
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Vinod Koul <vinod.koul@intel.com>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Cc: Anatolij Gustschin <agust@denx.de>
> 
> ---
> 
> diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c
> index c1a125e..25447a8 100644
> --- a/drivers/dma/ipu/ipu_idmac.c
> +++ b/drivers/dma/ipu/ipu_idmac.c
> @@ -1705,16 +1705,14 @@ static int __init ipu_probe(struct platform_device *pdev)
>  		ipu_data.irq_fn, ipu_data.irq_err, ipu_data.irq_base);
>  
>  	/* Remap IPU common registers */
> -	ipu_data.reg_ipu = ioremap(mem_ipu->start,
> -				   mem_ipu->end - mem_ipu->start + 1);
> +	ipu_data.reg_ipu = ioremap(mem_ipu->start, resource_size(mem_ipu));
>  	if (!ipu_data.reg_ipu) {
>  		ret = -ENOMEM;
>  		goto err_ioremap_ipu;
>  	}
>  
>  	/* Remap Image Converter and Image DMA Controller registers */
> -	ipu_data.reg_ic = ioremap(mem_ic->start,
> -				  mem_ic->end - mem_ic->start + 1);
> +	ipu_data.reg_ic = ioremap(mem_ic->start, resource_size(mem_ic));
>  	if (!ipu_data.reg_ic) {
>  		ret = -ENOMEM;
>  		goto err_ioremap_ic;
Applied, Thanks

-- 
~Vinod


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-06  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-01 22:10 [PATCH] dma: ipu_idmac.c: use resource_size in ioremap H Hartley Sweeten
2011-06-06  8:15 ` Koul, Vinod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®