summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAntonio Ospite <ospite@studenti.unina.it>2009-08-07 23:18:41 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2009-09-17 09:47:13 +0200
commit70fde5cbd421773f0b9d684933ecb441efe89c84 (patch)
tree78f488740cb11460f79d41317558599b32b6fcf2 /drivers/regulator
parentd0a821324819a2908b886ae8b2f33fc7824ff83f (diff)
downloadblackbird-op-linux-70fde5cbd421773f0b9d684933ecb441efe89c84.tar.gz
blackbird-op-linux-70fde5cbd421773f0b9d684933ecb441efe89c84.zip
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 <ospite@studenti.unina.it> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/pcap-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c
index 137b455ecb44..33d7d899e030 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);
OpenPOWER on IntegriCloud