ARM: OMAP3+: SmartReflex: add missing platform_set_drvdata()
authorFelipe Balbi <balbi@ti.com>
Wed, 29 Feb 2012 22:33:44 +0000 (23:33 +0100)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 15 May 2016 12:43:21 +0000 (15:43 +0300)
That's very useful to fetch the correct struct sr_info
from the PM handlers.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/smartreflex.c

index 7ec14fd..dea345f 100644 (file)
@@ -888,6 +888,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
                return -ENOMEM;
        }
 
+       platform_set_drvdata(pdev, sr_info);
+
        if (!pdata) {
                dev_err(&pdev->dev, "%s: platform data missing\n", __func__);
                ret = -EINVAL;
        if (!pdata) {
                dev_err(&pdev->dev, "%s: platform data missing\n", __func__);
                ret = -EINVAL;