summaryrefslogtreecommitdiff
path: root/drivers/mfd/fsl-imx25-tsadc.c
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2017-05-29 18:45:57 +0300
committerLee Jones <lee.jones@linaro.org>2017-07-06 10:29:12 +0300
commita55196eff6d63be4c439d707ce3b68ee82794ee9 (patch)
treea2a4469f88a490e715a936a734ad795f1d70d5f9 /drivers/mfd/fsl-imx25-tsadc.c
parent2eb131efb13d1fb98c08fccfe25908a5a3ad04f6 (diff)
downloadlinux-a55196eff6d63be4c439d707ce3b68ee82794ee9.tar.xz
mfd: fsl-imx25: Use devm_of_platform_populate()
Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/fsl-imx25-tsadc.c')
-rw-r--r--drivers/mfd/fsl-imx25-tsadc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c
index 190e375dc57a..b3767c3141e5 100644
--- a/drivers/mfd/fsl-imx25-tsadc.c
+++ b/drivers/mfd/fsl-imx25-tsadc.c
@@ -129,7 +129,6 @@ static void mx25_tsadc_setup_clk(struct platform_device *pdev,
static int mx25_tsadc_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct device_node *np = dev->of_node;
struct mx25_tsadc *tsadc;
struct resource *res;
int ret;
@@ -178,9 +177,7 @@ static int mx25_tsadc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, tsadc);
- of_platform_populate(np, NULL, NULL, dev);
-
- return 0;
+ return devm_of_platform_populate(dev);
}
static const struct of_device_id mx25_tsadc_ids[] = {