diff mbox series

[PATCHv2,5/5] watchdog: rti-wdt: balance pm runtime enable calls

Message ID 20200703120406.7092-6-t-kristo@ti.com
State Superseded
Headers show
Series [PATCHv2,1/5] watchdog: use __watchdog_ping in startup | expand

Commit Message

Tero Kristo July 3, 2020, 12:04 p.m. UTC
PM runtime should be disabled in the fail path of probe and when
the driver is removed.

Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
Signed-off-by: Tero Kristo <t-kristo@ti.com>

---
 drivers/watchdog/rti_wdt.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Comments

Guenter Roeck July 5, 2020, 3:08 p.m. UTC | #1
On 7/3/20 5:04 AM, Tero Kristo wrote:
> PM runtime should be disabled in the fail path of probe and when

> the driver is removed.

> 

> Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")

> Signed-off-by: Tero Kristo <t-kristo@ti.com>


Reviewed-by: Guenter Roeck <linux@roeck-us.net>


> ---

>  drivers/watchdog/rti_wdt.c | 2 ++

>  1 file changed, 2 insertions(+)

> 

> diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c

> index 987e5a798cb4..7007445da80b 100644

> --- a/drivers/watchdog/rti_wdt.c

> +++ b/drivers/watchdog/rti_wdt.c

> @@ -304,6 +304,7 @@ static int rti_wdt_probe(struct platform_device *pdev)

>  

>  err_iomap:

>  	pm_runtime_put_sync(&pdev->dev);

> +	pm_runtime_disable(&pdev->dev);

>  

>  	return ret;

>  }

> @@ -314,6 +315,7 @@ static int rti_wdt_remove(struct platform_device *pdev)

>  

>  	watchdog_unregister_device(&wdt->wdd);

>  	pm_runtime_put(&pdev->dev);

> +	pm_runtime_disable(&pdev->dev);

>  

>  	return 0;

>  }

>
diff mbox series

Patch

diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
index 987e5a798cb4..7007445da80b 100644
--- a/drivers/watchdog/rti_wdt.c
+++ b/drivers/watchdog/rti_wdt.c
@@ -304,6 +304,7 @@  static int rti_wdt_probe(struct platform_device *pdev)
 
 err_iomap:
 	pm_runtime_put_sync(&pdev->dev);
+	pm_runtime_disable(&pdev->dev);
 
 	return ret;
 }
@@ -314,6 +315,7 @@  static int rti_wdt_remove(struct platform_device *pdev)
 
 	watchdog_unregister_device(&wdt->wdd);
 	pm_runtime_put(&pdev->dev);
+	pm_runtime_disable(&pdev->dev);
 
 	return 0;
 }