* [PATCH] rtc-mt6397: enable wakeup before registering rtc device
@ 2015-07-02 8:36 Wei-Ning Huang
2015-07-02 8:49 ` Eddie Huang
2015-07-02 19:09 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: Wei-Ning Huang @ 2015-07-02 8:36 UTC (permalink / raw)
To: linux-arm-kernel
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 <wnhuang@google.com>
---
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:
--
2.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] rtc-mt6397: enable wakeup before registering rtc device
2015-07-02 8:36 [PATCH] rtc-mt6397: enable wakeup before registering rtc device Wei-Ning Huang
@ 2015-07-02 8:49 ` Eddie Huang
2015-07-02 19:09 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Eddie Huang @ 2015-07-02 8:49 UTC (permalink / raw)
To: linux-arm-kernel
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 <wnhuang@google.com>
> ---
> 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 <eddie.huang@mediatek.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] rtc-mt6397: enable wakeup before registering rtc device
2015-07-02 8:36 [PATCH] rtc-mt6397: enable wakeup before registering rtc device Wei-Ning Huang
2015-07-02 8:49 ` Eddie Huang
@ 2015-07-02 19:09 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2015-07-02 19:09 UTC (permalink / raw)
To: linux-arm-kernel
On 02/07/2015 at 16:36:56 +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 <wnhuang@google.com>
> ---
> drivers/rtc/rtc-mt6397.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied on rtc-fixes, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-02 19:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02 8:36 [PATCH] rtc-mt6397: enable wakeup before registering rtc device Wei-Ning Huang
2015-07-02 8:49 ` Eddie Huang
2015-07-02 19:09 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).