Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: set max8998->dev to &pdev->dev.

max8998->dev is NULL in current implementation, set it to &pdev->dev.

regulator_register() still return success if max8998->dev is NULL,
but rdev->dev.parent will be set to NULL which is incorrect.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

authored by

Axel Lin and committed by
Liam Girdwood
747cc851 938b4592

+1
+1
drivers/regulator/max8998.c
··· 557 557 } 558 558 559 559 rdev = max8998->rdev; 560 + max8998->dev = &pdev->dev; 560 561 max8998->iodev = iodev; 561 562 max8998->num_regulators = pdata->num_regulators; 562 563 platform_set_drvdata(pdev, max8998);