Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1346619 > unrolled thread
| Started by | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| First post | 2016-03-01 14:40 +0100 |
| Last post | 2016-03-04 03:20 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] dma: tegra: don't open code of_device_get_match_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-01 14:40 +0100
Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data() Thierry Reding <thierry.reding@gmail.com> - 2016-03-01 15:30 +0100
Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data() Vinod Koul <vinod.koul@intel.com> - 2016-03-03 16:50 +0100
Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-04 03:20 +0100
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-03-01 14:40 +0100 |
| Subject | [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data() |
| Message-ID | <r7SGS-1jf-19@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Thierry Reding <thierry.reding@gmail.com> |
|---|---|
| Date | 2016-03-01 15:30 +0100 |
| Subject | Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data() |
| Message-ID | <r7Ttg-1QY-29@gated-at.bofh.it> |
| In reply to | #1346619 |
[Multipart message — attachments visible in raw view] — view raw
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>
[toc] | [prev] | [next] | [standalone]
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Date | 2016-03-03 16:50 +0100 |
| Subject | Re: [PATCH 1/1] dma: tegra: don't open code of_device_get_match_data() |
| Message-ID | <r8DFN-IC-19@gated-at.bofh.it> |
| In reply to | #1346619 |
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
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-03-04 03:20 +0100 |
| Message-ID | <r8Nvs-85i-1@gated-at.bofh.it> |
| In reply to | #1349306 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web