dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dma: ti: dma-crossbar: convert to devm_platform_ioremap_resource()
@ 2020-01-28  5:35 qiwuchen55
  2020-01-28  7:53 ` Peter Ujfalusi
  2020-02-13 15:19 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: qiwuchen55 @ 2020-01-28  5:35 UTC (permalink / raw)
  To: vkoul, dan.j.williams, allison, peter.ujfalusi, kstewart
  Cc: tglx, wenwen, dmaengine, linux-kernel, chenqiwu

From: chenqiwu <chenqiwu@xiaomi.com>

Use a new API devm_platform_ioremap_resource() to simplify code.

Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
---
 drivers/dma/ti/dma-crossbar.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/ti/dma-crossbar.c b/drivers/dma/ti/dma-crossbar.c
index f255056..4ba8fa5 100644
--- a/drivers/dma/ti/dma-crossbar.c
+++ b/drivers/dma/ti/dma-crossbar.c
@@ -133,7 +133,6 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev)
 	const struct of_device_id *match;
 	struct device_node *dma_node;
 	struct ti_am335x_xbar_data *xbar;
-	struct resource *res;
 	void __iomem *iomem;
 	int i, ret;
 
@@ -173,8 +172,7 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev)
 		xbar->xbar_events = TI_AM335X_XBAR_LINES;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	iomem = devm_ioremap_resource(&pdev->dev, res);
+	iomem = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(iomem))
 		return PTR_ERR(iomem);
 
@@ -323,7 +321,6 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
 	struct device_node *dma_node;
 	struct ti_dra7_xbar_data *xbar;
 	struct property *prop;
-	struct resource *res;
 	u32 safe_val;
 	int sz;
 	void __iomem *iomem;
@@ -403,8 +400,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
 		kfree(rsv_events);
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	iomem = devm_ioremap_resource(&pdev->dev, res);
+	iomem = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(iomem))
 		return PTR_ERR(iomem);
 
-- 
1.9.1


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

* Re: [PATCH] dma: ti: dma-crossbar: convert to devm_platform_ioremap_resource()
  2020-01-28  5:35 [PATCH] dma: ti: dma-crossbar: convert to devm_platform_ioremap_resource() qiwuchen55
@ 2020-01-28  7:53 ` Peter Ujfalusi
  2020-02-13 15:19 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2020-01-28  7:53 UTC (permalink / raw)
  To: qiwuchen55, vkoul, dan.j.williams, allison, kstewart
  Cc: tglx, wenwen, dmaengine, linux-kernel, chenqiwu



On 28/01/2020 7.35, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
> 
> Use a new API devm_platform_ioremap_resource() to simplify code.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
> ---
>  drivers/dma/ti/dma-crossbar.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/dma/ti/dma-crossbar.c b/drivers/dma/ti/dma-crossbar.c
> index f255056..4ba8fa5 100644
> --- a/drivers/dma/ti/dma-crossbar.c
> +++ b/drivers/dma/ti/dma-crossbar.c
> @@ -133,7 +133,6 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev)
>  	const struct of_device_id *match;
>  	struct device_node *dma_node;
>  	struct ti_am335x_xbar_data *xbar;
> -	struct resource *res;
>  	void __iomem *iomem;
>  	int i, ret;
>  
> @@ -173,8 +172,7 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev)
>  		xbar->xbar_events = TI_AM335X_XBAR_LINES;
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	iomem = devm_ioremap_resource(&pdev->dev, res);
> +	iomem = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(iomem))
>  		return PTR_ERR(iomem);
>  
> @@ -323,7 +321,6 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
>  	struct device_node *dma_node;
>  	struct ti_dra7_xbar_data *xbar;
>  	struct property *prop;
> -	struct resource *res;
>  	u32 safe_val;
>  	int sz;
>  	void __iomem *iomem;
> @@ -403,8 +400,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
>  		kfree(rsv_events);
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	iomem = devm_ioremap_resource(&pdev->dev, res);
> +	iomem = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(iomem))
>  		return PTR_ERR(iomem);
>  
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: [PATCH] dma: ti: dma-crossbar: convert to devm_platform_ioremap_resource()
  2020-01-28  5:35 [PATCH] dma: ti: dma-crossbar: convert to devm_platform_ioremap_resource() qiwuchen55
  2020-01-28  7:53 ` Peter Ujfalusi
@ 2020-02-13 15:19 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-02-13 15:19 UTC (permalink / raw)
  To: qiwuchen55
  Cc: dan.j.williams, allison, peter.ujfalusi, kstewart, tglx, wenwen,
	dmaengine, linux-kernel, chenqiwu

On 28-01-20, 13:35, qiwuchen55@gmail.com wrote:
> From: chenqiwu <chenqiwu@xiaomi.com>
> 
> Use a new API devm_platform_ioremap_resource() to simplify code.

Subsystem name is 'dmaengine' pls use that tag instead.
Applied after fixing the tag, thanks

-- 
~Vinod

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-28  5:35 [PATCH] dma: ti: dma-crossbar: convert to devm_platform_ioremap_resource() qiwuchen55
2020-01-28  7:53 ` Peter Ujfalusi
2020-02-13 15:19 ` Vinod Koul

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git