linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] watchdog: iTCO_wdt: use pm_ptr()
@ 2021-06-16 18:17 Enrico Weigelt, metux IT consult
  2021-06-16 18:17 ` [PATCH 2/2] watchdog: iTCO_wdt: use dev_err() instead of pr_err() Enrico Weigelt, metux IT consult
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2021-06-16 18:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: wim, linux, linux-watchdog

Reduce a little bit of boilerplate by using pm_ptr().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/watchdog/iTCO_wdt.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index bf31d7b67a69..6ba2b2f60737 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -636,16 +636,13 @@ static const struct dev_pm_ops iTCO_wdt_pm = {
 	.resume_noirq = iTCO_wdt_resume_noirq,
 };
 
-#define ITCO_WDT_PM_OPS	(&iTCO_wdt_pm)
-#else
-#define ITCO_WDT_PM_OPS	NULL
 #endif /* CONFIG_PM_SLEEP */
 
 static struct platform_driver iTCO_wdt_driver = {
 	.probe          = iTCO_wdt_probe,
 	.driver         = {
 		.name   = DRV_NAME,
-		.pm     = ITCO_WDT_PM_OPS,
+		.pm     = pm_ptr(&iTCO_wdt_pm),
 	},
 };
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-19 23:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 18:17 [PATCH 1/2] watchdog: iTCO_wdt: use pm_ptr() Enrico Weigelt, metux IT consult
2021-06-16 18:17 ` [PATCH 2/2] watchdog: iTCO_wdt: use dev_err() instead of pr_err() Enrico Weigelt, metux IT consult
2021-06-17  2:02   ` Guenter Roeck
2021-06-17  2:02 ` [PATCH 1/2] watchdog: iTCO_wdt: use pm_ptr() Guenter Roeck
2021-06-19 22:27 ` kernel test robot
2021-06-19 23:19   ` Guenter Roeck

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).