From patchwork Fri Aug 28 00:06:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brownell X-Patchwork-Id: 32344 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-vw0-f165.google.com (mail-vw0-f165.google.com [209.85.212.165]) by bilbo.ozlabs.org (Postfix) with ESMTP id 83F03B8010 for ; Fri, 28 Aug 2009 15:59:23 +1000 (EST) Received: by vws37 with SMTP id 37so2747489vws.29 for ; Thu, 27 Aug 2009 22:59:22 -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:received-spf:domainkey-status:received :received:received:x-yahoo-newman-id:received:domainkey-signature :received:x-ymail-osg:x-yahoo-newman-property:from:to:subject:date :user-agent:cc:mime-version:content-type:message-id:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=Vh54LQ/Id/alA5Wgwnd1csL+vqVhvdC8iApO3tyPWow=; b=PG4GihJaR/06IZKnTJLOuchcKhggVhmoifb/7z3QWbCsYtABcQmYsxGTXJyay5WW0i KulPx3N2H1e9JQPk60LgvGWpaFN0AWOVaxrdPmR/zzije1OuIOdG/FtJUndU9cd9eX3s KpPerD8hKQiM5ipdC5St/Ung7fRUCZNJqwfhk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:domainkey-status :authentication-results:x-yahoo-newman-id:domainkey-signature :x-ymail-osg:x-yahoo-newman-property:from:to:subject:date:user-agent :cc:mime-version:content-type:message-id:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; b=j+TeYKPKkEzwmsEFqaBKQq/VlzQNhFV3FEQNItAkbXzN8MDPKIqpGUXZGucJHbpl+f 0rm0ioTU+wohMuWKzTtFgqByIpJddIwl2YAMCozY2fI3JSt4q49XmCFp+ZfvHPOgXs6K Sg2yasQLokZQGMpuxFZ+FyOCIbbhRBf1lZ7ss= Received: by 10.220.43.17 with SMTP id u17mr439427vce.12.1251439154604; Thu, 27 Aug 2009 22:59:14 -0700 (PDT) Received: by 10.230.12.222 with SMTP id y30gr2783vby.0; Thu, 27 Aug 2009 22:59:14 -0700 (PDT) X-Sender: david-b@pacbell.net X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.91.85.8 with SMTP id n8mr745481agl.3.1251439153436; Thu, 27 Aug 2009 22:59:13 -0700 (PDT) Received: by 10.91.85.8 with SMTP id n8mr745480agl.3.1251439153409; Thu, 27 Aug 2009 22:59:13 -0700 (PDT) Received: from n16.bullet.mail.mud.yahoo.com (n16.bullet.mail.mud.yahoo.com [68.142.206.43]) by gmr-mx.google.com with SMTP id 13si134951gxk.2.2009.08.27.22.59.12; Thu, 27 Aug 2009 22:59:12 -0700 (PDT) Received-SPF: neutral (google.com: 68.142.206.43 is neither permitted nor denied by best guess record for domain of david-b@pacbell.net) client-ip=68.142.206.43; DomainKey-Status: good (test mode) Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 68.142.206.43 is neither permitted nor denied by best guess record for domain of david-b@pacbell.net) smtp.mail=david-b@pacbell.net; domainkeys=pass (test mode) header.From=david-b@pacbell.net Received: from [68.142.200.221] by n16.bullet.mail.mud.yahoo.com with NNFMP; 28 Aug 2009 05:59:12 -0000 Received: from [68.142.201.248] by t9.bullet.mud.yahoo.com with NNFMP; 28 Aug 2009 05:59:11 -0000 Received: from [127.0.0.1] by omp409.mail.mud.yahoo.com with NNFMP; 28 Aug 2009 05:59:11 -0000 X-Yahoo-Newman-Id: 926392.65192.bm@omp409.mail.mud.yahoo.com Received: (qmail 99816 invoked from network); 28 Aug 2009 05:59:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=pacbell.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Subject:Date:User-Agent:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id; b=B9OwzkVdz+iGfoI9v3Mgi63bDXZog0D4U5ysxbslz8KaFQPke8Jp6nLNEL0e1oM7xtywmyKYiqP2HHEY7Eo512rFe6J4k+ABwphZ9HLHAevIPBgqzLi7vCTKIHKz9dh2xrfQ9QKhfANOg9Wp/TPwGRvtrXRGZUsYOCyPEpNmUiI= ; Received: from unknown (HELO albert) (david-b@69.226.236.175 with plain) by smtp103.sbc.mail.sp1.yahoo.com with SMTP; 28 Aug 2009 05:59:11 -0000 X-YMail-OSG: Q8eT2IkVM1kbt.fTGwPAl9sbvXEhZsLTLoGwyTI9bQYhhWJJmL6OawEhQ7e1SQiIjXZxaYpOSdpb8wzwRiPVAxDNmboF9EJD9mpHoMcpkEtOc2cv9w84bVoyjtwTMkzIe05MVBPgIdR5FVab6F24jDbw1u1Go.yua7OdCwdp78YHbKg4uTrXoFvz9WD5_mapb5c0riJHRrSaZ1pFiD4SRW02NqdwgoJtf3EbzY19EBPB2hWDjsc1fnah X-Yahoo-Newman-Property: ymail-3 From: David Brownell To: Andrew Morton , rtc-linux@googlegroups.com Subject: [rtc-linux] [patch 2.6.31-rc] rtc-at91rm9200 fixes Date: Thu, 27 Aug 2009 17:06:17 -0700 User-Agent: KMail/1.9.10 Cc: Andrew Victor Mime-Version: 1.0 Message-Id: <200908271706.17665.david-b@pacbell.net> 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 From: David Brownell Fix two new-ish runtime warnings in the at91rm9200 (etc) RTC: Platform driver 'at91_rtc' needs updating - please use dev_pm_ops ... by just switching IRQ 1/at91_rtc: IRQF_DISABLED is not guaranteed on shared IRQs ... no longer needed now that rtc_update_irq() changed Signed-off-by: David Brownell --- drivers/rtc/rtc-at91rm9200.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) --~--~---------~--~----~------------~-------~--~----~ 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. -~----------~----~----~----~------~----~------~--~--- --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -289,7 +289,7 @@ static int __init at91_rtc_probe(struct AT91_RTC_CALEV); ret = request_irq(AT91_ID_SYS, at91_rtc_interrupt, - IRQF_DISABLED | IRQF_SHARED, + IRQF_SHARED, "at91_rtc", pdev); if (ret) { printk(KERN_ERR "at91_rtc: IRQ %d already in use.\n", @@ -340,7 +340,7 @@ static int __exit at91_rtc_remove(struct static u32 at91_rtc_imr; -static int at91_rtc_suspend(struct platform_device *pdev, pm_message_t state) +static int at91_rtc_suspend(struct device *dev) { /* this IRQ is shared with DBGU and other hardware which isn't * necessarily doing PM like we are... @@ -348,7 +348,7 @@ static int at91_rtc_suspend(struct platf at91_rtc_imr = at91_sys_read(AT91_RTC_IMR) & (AT91_RTC_ALARM|AT91_RTC_SECEV); if (at91_rtc_imr) { - if (device_may_wakeup(&pdev->dev)) + if (device_may_wakeup(dev)) enable_irq_wake(AT91_ID_SYS); else at91_sys_write(AT91_RTC_IDR, at91_rtc_imr); @@ -356,28 +356,34 @@ static int at91_rtc_suspend(struct platf return 0; } -static int at91_rtc_resume(struct platform_device *pdev) +static int at91_rtc_resume(struct device *dev) { if (at91_rtc_imr) { - if (device_may_wakeup(&pdev->dev)) + if (device_may_wakeup(dev)) disable_irq_wake(AT91_ID_SYS); else at91_sys_write(AT91_RTC_IER, at91_rtc_imr); } return 0; } + +static const struct dev_pm_ops at91_rtc_pm = { + .suspend = at91_rtc_suspend, + .resume = at91_rtc_resume, +}; + +#define at91_rtc_pm_ptr &at91_rtc_pm + #else -#define at91_rtc_suspend NULL -#define at91_rtc_resume NULL +#define at91_rtc_pm_ptr NULL #endif static struct platform_driver at91_rtc_driver = { .remove = __exit_p(at91_rtc_remove), - .suspend = at91_rtc_suspend, - .resume = at91_rtc_resume, .driver = { .name = "at91_rtc", .owner = THIS_MODULE, + .pm = at91_rtc_pm_ptr, }, };