Commit 71ab9eb6 authored by James Toy's avatar James Toy

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.

This change was suggested by Mark Brown in
http://www.spinics.net/lists/linux-input/msg04285.htmlSigned-off-by: default avatarAntonio Ospite <ospite@studenti.unina.it>
Cc: Daniel Ribeiro <drwyrm@gmail.com>
Cc: guiming zhuo <gmzhuo@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 41ab666d
...@@ -154,7 +154,7 @@ static int __devinit pcap_rtc_probe(struct platform_device *pdev) ...@@ -154,7 +154,7 @@ static int __devinit pcap_rtc_probe(struct platform_device *pdev)
if (!pcap_rtc) if (!pcap_rtc)
return err; return err;
pcap_rtc->pcap = platform_get_drvdata(pdev); pcap_rtc->pcap = dev_get_drvdata(pdev->dev.parent);
pcap_rtc->rtc = rtc_device_register("pcap", &pdev->dev, pcap_rtc->rtc = rtc_device_register("pcap", &pdev->dev,
&pcap_rtc_ops, THIS_MODULE); &pcap_rtc_ops, THIS_MODULE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment