All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data()
@ 2016-03-01 13:24 ` Laxman Dewangan
  0 siblings, 0 replies; 8+ messages in thread
From: Laxman Dewangan @ 2016-03-01 13:24 UTC (permalink / raw)
  To: vinod.koul, swarren, thierry.reding
  Cc: gnurou, dmaengine, linux-tegra, linux-kernel, Laxman Dewangan

Use of_device_get_match_data() for getting matched data
instead of implementing this locally.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/dma/tegra20-apb-dma.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 935da81..ced588f 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1317,15 +1317,13 @@ static int tegra_dma_probe(struct platform_device *pdev)
 	struct tegra_dma *tdma;
 	int ret;
 	int i;
-	const struct tegra_dma_chip_data *cdata = NULL;
-	const struct of_device_id *match;
+	const struct tegra_dma_chip_data *cdata;
 
-	match = of_match_device(tegra_dma_of_match, &pdev->dev);
-	if (!match) {
-		dev_err(&pdev->dev, "Error: No device match found\n");
+	cdata = of_device_get_match_data(&pdev->dev);
+	if (!cdata) {
+		dev_err(&pdev->dev, "Error: No device match data found\n");
 		return -ENODEV;
 	}
-	cdata = match->data;
 
 	tdma = devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channels *
 			sizeof(struct tegra_dma_channel), GFP_KERNEL);
-- 
2.1.4

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

* [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data()
@ 2016-03-01 13:24 ` Laxman Dewangan
  0 siblings, 0 replies; 8+ messages in thread
From: Laxman Dewangan @ 2016-03-01 13:24 UTC (permalink / raw)
  To: vinod.koul, swarren, thierry.reding
  Cc: gnurou, dmaengine, linux-tegra, linux-kernel, Laxman Dewangan

Use of_device_get_match_data() for getting matched data
instead of implementing this locally.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/dma/tegra20-apb-dma.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 935da81..ced588f 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1317,15 +1317,13 @@ static int tegra_dma_probe(struct platform_device *pdev)
 	struct tegra_dma *tdma;
 	int ret;
 	int i;
-	const struct tegra_dma_chip_data *cdata = NULL;
-	const struct of_device_id *match;
+	const struct tegra_dma_chip_data *cdata;
 
-	match = of_match_device(tegra_dma_of_match, &pdev->dev);
-	if (!match) {
-		dev_err(&pdev->dev, "Error: No device match found\n");
+	cdata = of_device_get_match_data(&pdev->dev);
+	if (!cdata) {
+		dev_err(&pdev->dev, "Error: No device match data found\n");
 		return -ENODEV;
 	}
-	cdata = match->data;
 
 	tdma = devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channels *
 			sizeof(struct tegra_dma_channel), GFP_KERNEL);
-- 
2.1.4

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

* Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data()
  2016-03-01 13:24 ` Laxman Dewangan
@ 2016-03-01 14:26     ` Thierry Reding
  -1 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2016-03-01 14:26 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: vinod.koul-ral2JQCrhuEAvxtiuMwx3w,
	swarren-3lzwWm7+Weoh9ZMKESR00Q, gnurou-Re5JQEeQqe8AvxtiuMwx3w,
	dmaengine-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

On Tue, Mar 01, 2016 at 06:54:40PM +0530, Laxman Dewangan wrote:
> Use of_device_get_match_data() for getting matched data
> instead of implementing this locally.
> 
> Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/dma/tegra20-apb-dma.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)

Acked-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data()
@ 2016-03-01 14:26     ` Thierry Reding
  0 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2016-03-01 14:26 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: vinod.koul, swarren, gnurou, dmaengine, linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

On Tue, Mar 01, 2016 at 06:54:40PM +0530, Laxman Dewangan wrote:
> Use of_device_get_match_data() for getting matched data
> instead of implementing this locally.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> ---
>  drivers/dma/tegra20-apb-dma.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data()
  2016-03-01 13:24 ` Laxman Dewangan
@ 2016-03-03 15:53     ` Vinod Koul
  -1 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2016-03-03 15:53 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	gnurou-Re5JQEeQqe8AvxtiuMwx3w, dmaengine-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Tue, Mar 01, 2016 at 06:54:40PM +0530, Laxman Dewangan wrote:
> Use of_device_get_match_data() for getting matched data
> instead of implementing this locally.

I have applied this after fixing subsystem name. Please ensure you use the
right name

-- 
~Vinod

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

* Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data()
@ 2016-03-03 15:53     ` Vinod Koul
  0 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2016-03-03 15:53 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: swarren, thierry.reding, gnurou, dmaengine, linux-tegra, linux-kernel

On Tue, Mar 01, 2016 at 06:54:40PM +0530, Laxman Dewangan wrote:
> Use of_device_get_match_data() for getting matched data
> instead of implementing this locally.

I have applied this after fixing subsystem name. Please ensure you use the
right name

-- 
~Vinod

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

* Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data()
  2016-03-03 15:53     ` Vinod Koul
@ 2016-03-04  2:04       ` Laxman Dewangan
  -1 siblings, 0 replies; 8+ messages in thread
From: Laxman Dewangan @ 2016-03-04  2:04 UTC (permalink / raw)
  To: Vinod Koul
  Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	gnurou-Re5JQEeQqe8AvxtiuMwx3w, dmaengine-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA


On Thursday 03 March 2016 09:23 PM, Vinod Koul wrote:
> On Tue, Mar 01, 2016 at 06:54:40PM +0530, Laxman Dewangan wrote:
>> Use of_device_get_match_data() for getting matched data
>> instead of implementing this locally.
> I have applied this after fixing subsystem name. Please ensure you use the
> right name
>
>
Ooops, the directory name is "dma" and hence I used subsystem name as "dma".
File names are also containing dma only and so this mistake happened.
Will keep in mind in future patches.

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

* Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data()
@ 2016-03-04  2:04       ` Laxman Dewangan
  0 siblings, 0 replies; 8+ messages in thread
From: Laxman Dewangan @ 2016-03-04  2:04 UTC (permalink / raw)
  To: Vinod Koul
  Cc: swarren, thierry.reding, gnurou, dmaengine, linux-tegra, linux-kernel


On Thursday 03 March 2016 09:23 PM, Vinod Koul wrote:
> On Tue, Mar 01, 2016 at 06:54:40PM +0530, Laxman Dewangan wrote:
>> Use of_device_get_match_data() for getting matched data
>> instead of implementing this locally.
> I have applied this after fixing subsystem name. Please ensure you use the
> right name
>
>
Ooops, the directory name is "dma" and hence I used subsystem name as "dma".
File names are also containing dma only and so this mistake happened.
Will keep in mind in future patches.

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

end of thread, other threads:[~2016-03-04  2:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-01 13:24 [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data() Laxman Dewangan
2016-03-01 13:24 ` Laxman Dewangan
     [not found] ` <1456838680-3220-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-01 14:26   ` Thierry Reding
2016-03-01 14:26     ` Thierry Reding
2016-03-03 15:53   ` Vinod Koul
2016-03-03 15:53     ` Vinod Koul
2016-03-04  2:04     ` Laxman Dewangan
2016-03-04  2:04       ` Laxman Dewangan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.