From patchwork Fri Aug 7 21:17:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 30986 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-gx0-f185.google.com (mail-gx0-f185.google.com [209.85.217.185]) by bilbo.ozlabs.org (Postfix) with ESMTP id 88E2BB7099 for ; Sat, 8 Aug 2009 07:19:05 +1000 (EST) Received: by gxk5 with SMTP id 5so2119130gxk.17 for ; Fri, 07 Aug 2009 14:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :received:received:received:from:to:cc:subject:date:message-id :x-mailer:x-originalarrivaltime:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=fvBT0/9OHgqwOKODHJ46aCRNHInqBv2Kn0kCLMVgNDU=; b=pZfqOxjhZl5KOHeplhvCWYxZzyOdHiu+o0ytLftD2EQeeKyrlxWA9pPFNkwkXnjaur h5RIDe6B+iKnhsYz2zPa/VShLerEKoi02XtlcHqQdoniEknOpy7yUVQLoR9U8m45zMku o9KKjNdmKcQfyCCVvZ1asB9Y88ykCKsMDdSn4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results:from :to:cc:subject:date:message-id:x-mailer:x-originalarrivaltime :reply-to:sender:precedence:x-google-loop:mailing-list:list-id :list-post:list-help:list-unsubscribe:x-beenthere-env:x-beenthere; b=2fE9lrWa3aYhR2Vaol4BMzFMiuOTwq0eHtiSr+DmGX9tqzpMX90RozveignosGyE1L +RXWYdSHTX0B7Ey9cyEYnFPTPjiXB5tNGwn8OCnKlRbicub1KR/z63uyHbQQNr44/cTB nib8/hWH7SogCDFMnQI1OxTmraHyS6Ro3mzA4= Received: by 10.100.34.1 with SMTP id h1mr169991anh.23.1249679939993; Fri, 07 Aug 2009 14:18:59 -0700 (PDT) Received: by 10.176.50.19 with SMTP id x19gr2711yqx.0; Fri, 07 Aug 2009 14:18:58 -0700 (PDT) X-Sender: ospite@studenti.unina.it X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.204.121.141 with SMTP id h13mr168627bkr.8.1249679937353; Fri, 07 Aug 2009 14:18:57 -0700 (PDT) Received: from smtp-out114.alice.it (smtp-out114.alice.it [85.37.17.114]) by gmr-mx.google.com with ESMTP id 15si259527bwz.6.2009.08.07.14.18.57; Fri, 07 Aug 2009 14:18:57 -0700 (PDT) Received-SPF: neutral (google.com: 85.37.17.114 is neither permitted nor denied by best guess record for domain of ospite@studenti.unina.it) client-ip=85.37.17.114; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 85.37.17.114 is neither permitted nor denied by best guess record for domain of ospite@studenti.unina.it) smtp.mail=ospite@studenti.unina.it Received: from FBCMMO02.fbc.local ([192.168.68.196]) by smtp-out114.alice.it with Microsoft SMTPSVC(6.0.3790.3959); Fri, 7 Aug 2009 23:18:57 +0200 Received: from FBCMCL01B03.fbc.local ([192.168.69.84]) by FBCMMO02.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Fri, 7 Aug 2009 23:18:14 +0200 Received: from badebec ([79.2.146.156]) by FBCMCL01B03.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Fri, 7 Aug 2009 23:18:13 +0200 Received: by badebec with local (Exim 4.69) (envelope-from ) id 1MZWpE-0004BH-Ub; Fri, 07 Aug 2009 23:18:08 +0200 From: Antonio Ospite To: Andrew Morton Cc: Antonio Ospite , Alessandro Zummo , rtc-linux@googlegroups.com, openezx-devel@lists.openezx.org Subject: [rtc-linux] [PATCH] rtc-pcap: get pcap data from the parent device Date: Fri, 7 Aug 2009 23:17:36 +0200 Message-Id: <1249679856-16044-1-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.6.3.3 X-OriginalArrivalTime: 07 Aug 2009 21:18:13.0872 (UTC) FILETIME=[92D0E700:01CA17A4] Reply-To: rtc-linux@googlegroups.com Sender: rtc-linux@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rtc-linux@googlegroups.com; contact rtc-linux+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rtc-linux@googlegroups.com X-BeenThere: rtc-linux@googlegroups.com 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 --- 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. -~----------~----~----~----~------~----~------~--~--- 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);