regulator: gpio-regulator: do not pass drvdata pointer as reference
authorHeiko Stübner <heiko@sntech.de>
Sun, 3 Jun 2012 19:30:33 +0000 (21:30 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 4 Jun 2012 09:44:18 +0000 (10:44 +0100)
Commit c172708d38a4 (regulator: core: Use a struct to pass in
regulator runtime configuration) added the drvdata pointer
only per reference to the new config array in the gpio-regulator.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/gpio-regulator.c

index 9997d7aaca84294d03462f428b606d93de39a9df..ebe2b5c2e2df4c5b983559b928badd97d0aee51c 100644 (file)
@@ -286,7 +286,7 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev)
 
        cfg.dev = &pdev->dev;
        cfg.init_data = config->init_data;
-       cfg.driver_data = &drvdata;
+       cfg.driver_data = drvdata;
 
        drvdata->dev = regulator_register(&drvdata->desc, &cfg);
        if (IS_ERR(drvdata->dev)) {