Commit c562f7d2 authored by Federico Vaga's avatar Federico Vaga

sw:drv: use dma_device in drvdata for portability

The spec carrier can easy take the dma_device without knowing the DMA
details implemented in its driver.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 001c8923
......@@ -838,7 +838,7 @@ static int gn412x_dma_probe(struct platform_device *pdev)
goto err_reg;
gn412x_dma_dbg_init(gn412x_dma);
platform_set_drvdata(pdev, gn412x_dma);
platform_set_drvdata(pdev, &gn412x_dma->dma);
return 0;
err_reg:
......@@ -863,7 +863,8 @@ err_res_mem:
static int gn412x_dma_remove(struct platform_device *pdev)
{
struct gn412x_dma_device *gn412x_dma = platform_get_drvdata(pdev);
struct dma_device *dma = platform_get_drvdata(pdev);
struct gn412x_dma_device *gn412x_dma = to_gn412x_dma_device(dma);
gn412x_dma_dbg_exit(gn412x_dma);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment