Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70fde5cb authored by Antonio Ospite's avatar Antonio Ospite Committed by Samuel Ortiz
Browse files

regulator: get pcap data from the parent device



Right now the pcap core driver passes a reference to its pcap data abusing the
subdrivers platform drvdata, this is not good.

Get the reference directly from the parent device.

Signed-off-by: default avatarAntonio Ospite <ospite@studenti.unina.it>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent d0a82132
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ static struct regulator_desc pcap_regulators[] = {
static int __devinit pcap_regulator_probe(struct platform_device *pdev)
{
	struct regulator_dev *rdev;
	void *pcap = platform_get_drvdata(pdev);
	void *pcap = dev_get_drvdata(pdev->dev.parent);

	rdev = regulator_register(&pcap_regulators[pdev->id], &pdev->dev,
				pdev->dev.platform_data, pcap);