From: Antonio Ospite Date: Fri, 7 Aug 2009 21:18:41 +0000 (+0200) Subject: regulator: get pcap data from the parent device X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=70fde5cbd421773f0b9d684933ecb441efe89c84;p=linux.git 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: Antonio Ospite Acked-by: Mark Brown Signed-off-by: Samuel Ortiz --- diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c index 137b455ecb442..33d7d899e0307 100644 --- a/drivers/regulator/pcap-regulator.c +++ b/drivers/regulator/pcap-regulator.c @@ -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);