Message ID | 1478276094-19135-6-git-send-email-s.nawrocki@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Nov 04, 2016 at 05:14:51PM +0100, Sylwester Nawrocki wrote: > All related platforms use either devicetree or the DMA slave > map API for mapping DMA channels to slave devices so we can now > stop using platform_data for passing DMA details. Acked-by: Mark Brown <broonie@kernel.org>
On Friday 04 November 2016, Sylwester Nawrocki wrote: > - ret = samsung_asoc_dma_platform_register(&pdev->dev, pri_dai->filter, > + ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL, > NULL, NULL); If we remove the filter argument from every caller here, maybe we should also change the prototype to not expect those three NULL arguments any more. Arnd
On 11/05/2016 12:29 AM, Arnd Bergmann wrote: > On Friday 04 November 2016, Sylwester Nawrocki wrote: >> > - ret = samsung_asoc_dma_platform_register(&pdev->dev, pri_dai->filter, >> > + ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL, >> > NULL, NULL); > > If we remove the filter argument from every caller here, maybe we should also > change the prototype to not expect those three NULL arguments any more. There is one occurrence where the third argument needs to be not NULL. I'm planning to modify sound/sound/samsung/i2s.c so there is no need to create another platform device just for the overlay DAI, afterwards the above function could be simplified.
On Monday, November 7, 2016 5:02:54 PM CET Sylwester Nawrocki wrote: > On 11/05/2016 12:29 AM, Arnd Bergmann wrote: > > On Friday 04 November 2016, Sylwester Nawrocki wrote: > >> > - ret = samsung_asoc_dma_platform_register(&pdev->dev, pri_dai->filter, > >> > + ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL, > >> > NULL, NULL); > > > > If we remove the filter argument from every caller here, maybe we should also > > change the prototype to not expect those three NULL arguments any more. > > There is one occurrence where the third argument needs to be not NULL. > I'm planning to modify sound/sound/samsung/i2s.c so there is no need > to create another platform device just for the overlay DAI, afterwards > the above function could be simplified. Ok, sounds good. Arnd
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 7e32cf4..95a9a3f 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -90,7 +90,6 @@ struct i2s_dai { struct snd_dmaengine_dai_dma_data dma_playback; struct snd_dmaengine_dai_dma_data dma_capture; struct snd_dmaengine_dai_dma_data idma_playback; - dma_filter_fn filter; u32 quirks; u32 suspend_i2smod; u32 suspend_i2scon; @@ -1244,7 +1243,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) return ret; return samsung_asoc_dma_platform_register(&pdev->dev, - sec_dai->filter, "tx-sec", NULL); + NULL, "tx-sec", NULL); } pri_dai = i2s_alloc_dai(pdev, false); @@ -1262,10 +1261,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) return -EINVAL; } - pri_dai->dma_playback.filter_data = i2s_pdata->dma_playback; - pri_dai->dma_capture.filter_data = i2s_pdata->dma_capture; - pri_dai->filter = i2s_pdata->dma_filter; - if (&i2s_pdata->type) i2s_cfg = &i2s_pdata->type.i2s; @@ -1327,11 +1322,6 @@ static int samsung_i2s_probe(struct platform_device *pdev) sec_dai->dma_playback.addr = regs_base + I2STXDS; sec_dai->dma_playback.chan_name = "tx-sec"; - if (!np) { - sec_dai->dma_playback.filter_data = i2s_pdata->dma_play_sec; - sec_dai->filter = i2s_pdata->dma_filter; - } - sec_dai->dma_playback.addr_width = 4; sec_dai->addr = pri_dai->addr; sec_dai->clk = pri_dai->clk; @@ -1353,7 +1343,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) if (ret < 0) goto err_free_dai; - ret = samsung_asoc_dma_platform_register(&pdev->dev, pri_dai->filter, + ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL, NULL, NULL); if (ret < 0) goto err_free_dai;
All related platforms use either devicetree or the DMA slave map API for mapping DMA channels to slave devices so we can now stop using platform_data for passing DMA details. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> --- sound/soc/samsung/i2s.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)