Message ID | 1249679856-16044-1-git-send-email-ospite@studenti.unina.it |
---|---|
State | Accepted, archived |
Headers | show |
diff --git a/drivers/rtc/rtc-pcap.c b/drivers/rtc/rtc-pcap.c index 566f4ac..a99c289 100644 --- a/drivers/rtc/rtc-pcap.c +++ b/drivers/rtc/rtc-pcap.c @@ -154,7 +154,7 @@ static int __devinit pcap_rtc_probe(struct platform_device *pdev) if (!pcap_rtc) 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_ops, THIS_MODULE);
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> --- This change was suggested by Mark Brown in http://www.spinics.net/lists/linux-input/msg04285.html The rtc-pcap driver is currently in -mm tree. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. -~----------~----~----~----~------~----~------~--~---