mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
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>
This commit is contained in:
parent
d0a8213248
commit
70fde5cbd4
1 changed files with 1 additions and 1 deletions
|
@ -271,7 +271,7 @@ static struct regulator_desc pcap_regulators[] = {
|
||||||
static int __devinit pcap_regulator_probe(struct platform_device *pdev)
|
static int __devinit pcap_regulator_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct regulator_dev *rdev;
|
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,
|
rdev = regulator_register(&pcap_regulators[pdev->id], &pdev->dev,
|
||||||
pdev->dev.platform_data, pcap);
|
pdev->dev.platform_data, pcap);
|
||||||
|
|
Loading…
Reference in a new issue