diff mbox

dma: mmp_pdma: add missing platform_set_drvdata() in mmp_pdma_probe()

Message ID CAPgLHd_5P0f7stb8G=uUUvcrFsjbiaufjGqKwmD8RZy-2=0Dwg@mail.gmail.com (mailing list archive)
State Accepted
Commit 086b0af19ae43d1ac5d77b5d423aa58374ad2709
Delegated to: Vinod Koul
Headers show

Commit Message

Wei Yongjun Nov. 25, 2013, 7:15 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Add missing platform_set_drvdata() in mmp_pdma_probe(), otherwise
calling platform_get_drvdata() in mmp_pdma_remove() returns NULL.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/dma/mmp_pdma.c | 1 +
 1 file changed, 1 insertion(+)


--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Vinod Koul Nov. 28, 2013, 8:09 a.m. UTC | #1
On Mon, Nov 25, 2013 at 03:15:14PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Add missing platform_set_drvdata() in mmp_pdma_probe(), otherwise
> calling platform_get_drvdata() in mmp_pdma_remove() returns NULL.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Applied, thanks

> ---
>  drivers/dma/mmp_pdma.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
> index dcb1e05..8869500 100644
> --- a/drivers/dma/mmp_pdma.c
> +++ b/drivers/dma/mmp_pdma.c
> @@ -1017,6 +1017,7 @@ static int mmp_pdma_probe(struct platform_device *op)
>  		}
>  	}
>  
> +	platform_set_drvdata(op, pdev);
>  	dev_info(pdev->device.dev, "initialized %d channels\n", dma_channels);
>  	return 0;
>  }
>
diff mbox

Patch

diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index dcb1e05..8869500 100644
--- a/drivers/dma/mmp_pdma.c
+++ b/drivers/dma/mmp_pdma.c
@@ -1017,6 +1017,7 @@  static int mmp_pdma_probe(struct platform_device *op)
 		}
 	}
 
+	platform_set_drvdata(op, pdev);
 	dev_info(pdev->device.dev, "initialized %d channels\n", dma_channels);
 	return 0;
 }