Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753852AbbGBItz (ORCPT ); Thu, 2 Jul 2015 04:49:55 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:45031 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752560AbbGBIte (ORCPT ); Thu, 2 Jul 2015 04:49:34 -0400 X-Listener-Flag: 11101 Message-ID: <1435826955.21679.2.camel@mtksdaap41> Subject: Re: [PATCH] rtc-mt6397: enable wakeup before registering rtc device From: Eddie Huang To: Wei-Ning Huang CC: LKML , Wei-Ning Huang , , , , , Date: Thu, 2 Jul 2015 16:49:15 +0800 In-Reply-To: <1435826216-11982-1-git-send-email-wnhuang@google.com> References: <1435826216-11982-1-git-send-email-wnhuang@google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1357 Lines: 43 On Thu, 2015-07-02 at 16:36 +0800, Wei-Ning Huang wrote: > rtc_sysfs_add_device checks if device can wakeup before creating the > wakealarm file in sysfs. Thus the driver must set wakeup capability > before registering the rtc device. > > Signed-off-by: Wei-Ning Huang > --- > drivers/rtc/rtc-mt6397.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c > index c0090b6..eab230b 100644 > --- a/drivers/rtc/rtc-mt6397.c > +++ b/drivers/rtc/rtc-mt6397.c > @@ -343,6 +343,8 @@ static int mtk_rtc_probe(struct platform_device *pdev) > goto out_dispose_irq; > } > > + device_init_wakeup(&pdev->dev, 1); > + > rtc->rtc_dev = rtc_device_register("mt6397-rtc", &pdev->dev, > &mtk_rtc_ops, THIS_MODULE); > if (IS_ERR(rtc->rtc_dev)) { > @@ -351,8 +353,6 @@ static int mtk_rtc_probe(struct platform_device *pdev) > goto out_free_irq; > } > > - device_init_wakeup(&pdev->dev, 1); > - > return 0; > > out_free_irq: Thanks your correction. Acked-by: Eddie Huang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/