watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get()
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Fri, 31 May 2024 06:57:17 +0000 (09:57 +0300)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Wed, 10 Jul 2024 18:01:32 +0000 (20:01 +0200)
commitf0ba0fcdd19943809b1a7f760f77f6673c6aa7f7
tree979b10dfe017501a5888fa3f114fbdabb6d9d581
parent9e69846c68f5489e9a3d7375215beb1842ef89e1
watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get()

pm_runtime_get_sync() may return with error. In case it returns with error
dev->power.usage_count needs to be decremented. pm_runtime_resume_and_get()
takes care of this. Thus use it.

Along with it the rzg2l_wdt_set_timeout() function was updated to
propagate the result of rzg2l_wdt_start() to its caller.

Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240531065723.1085423-4-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/rzg2l_wdt.c