Skip to content

Commit

Permalink
regulator: get pcap data from the parent device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonio Ospite authored and Samuel Ortiz committed Sep 17, 2009
1 parent d0a8213 commit 70fde5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/pcap-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 70fde5c

Please sign in to comment.