diff mbox

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

Message ID 20150317155038.1194512ff8817b9079a81897@linux-foundation.org
State Accepted
Headers show

Commit Message

Andrew Morton March 17, 2015, 10:50 p.m. UTC
On Sun, 15 Mar 2015 15:18:29 +0100 Lars-Peter Clausen <lars@metafoo.de> 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@linux-foundation.org>
Subject: drivers-rtc-rtc-mrst-fix-suspend-resume-fix

device_driver.name is const char *

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Feng Tang <feng.tang@intel.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

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

Patch

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,
 	}
 };