[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150317155038.1194512ff8817b9079a81897@linux-foundation.org>
Date:	Tue, 17 Mar 2015 15:50:38 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Lars-Peter Clausen <lars@...afoo.de>
Cc:	Alessandro Zummo <a.zummo@...ertech.it>,
	Feng Tang <feng.tang@...el.com>, rtc-linux@...glegroups.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/rtc/rtc-mrst: Fix suspend/resume
On Sun, 15 Mar 2015 15:18:29 +0100 Lars-Peter Clausen <lars@...afoo.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@...ux-foundation.org>
Subject: drivers-rtc-rtc-mrst-fix-suspend-resume-fix
device_driver.name is const char *
Cc: Alessandro Zummo <a.zummo@...ertech.it>
Cc: Feng Tang <feng.tang@...el.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
