On Sun, 15 Mar 2015 15:18:29 +0100 Lars-Peter Clausen <[email protected]> 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 <[email protected]>
Subject: drivers-rtc-rtc-mrst-fix-suspend-resume-fix

device_driver.name is const char *

Cc: Alessandro Zummo <[email protected]>
Cc: Feng Tang <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to