Re: [PATCH] drivers/rtc/rtc-mrst: Fix suspend/resume

From: Andrew Morton
Date: Tue Mar 17 2015 - 18:50:48 EST


On Sun, 15 Mar 2015 15:18:29 +0100 Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:

> The Moorestown RTC driver implements suspend and resume callbacks and
> assigns them to the suspend and resume fields of the device_driver struct.
> These callbacks are never actually called by anything though.
>
> Modify the driver to properly use dev_pm_ops so that the suspend and resume
> functions are actually executed upon suspend/resume.
>
> @@ -531,9 +533,8 @@ static struct platform_driver vrtc_mrst_platform_driver = {
> .remove = vrtc_mrst_platform_remove,
> .shutdown = vrtc_mrst_platform_shutdown,
> .driver = {
> - .name = (char *) driver_name,
> - .suspend = mrst_suspend,
> - .resume = mrst_resume,
> + .name = (char *) driver_name,
> + .pm = MRST_PM_OPS,
> }

The cast isn't needed?


From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: drivers-rtc-rtc-mrst-fix-suspend-resume-fix

device_driver.name is const char *

Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx>
Cc: Feng Tang <feng.tang@xxxxxxxxx>
Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

drivers/rtc/rtc-mrst.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/rtc/rtc-mrst.c~drivers-rtc-rtc-mrst-fix-suspend-resume-fix drivers/rtc/rtc-mrst.c
--- a/drivers/rtc/rtc-mrst.c~drivers-rtc-rtc-mrst-fix-suspend-resume-fix
+++ a/drivers/rtc/rtc-mrst.c
@@ -531,7 +531,7 @@ static struct platform_driver vrtc_mrst_
.remove = vrtc_mrst_platform_remove,
.shutdown = vrtc_mrst_platform_shutdown,
.driver = {
- .name = (char *) driver_name,
+ .name = driver_name,
.pm = MRST_PM_OPS,
}
};
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/