diff mbox series

[3/9] watchdog: of_xilinx_wdt: Used dev_dbg()

Message ID 1615805214-24857-4-git-send-email-srinivas.neeli@xilinx.com
State New
Headers show
Series [1/9] watchdog: of_xilinx_wdt: Add comment to spinlock | expand

Commit Message

Srinivas Neeli March 15, 2021, 10:46 a.m. UTC
From: Srinivas Goud <srinivas.goud@xilinx.com>

This patch removes pr_info in stop function and adds dev_dbg()
in start/stop function to display device specific debug info.

Signed-off-by: Srinivas Goud <srinivas.goud@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
---
 drivers/watchdog/of_xilinx_wdt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Guenter Roeck March 16, 2021, 2:27 a.m. UTC | #1
On 3/15/21 3:46 AM, Srinivas Neeli wrote:
> From: Srinivas Goud <srinivas.goud@xilinx.com>

> 

> This patch removes pr_info in stop function and adds dev_dbg()

> in start/stop function to display device specific debug info.

> 

> Signed-off-by: Srinivas Goud <srinivas.goud@xilinx.com>

> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>

> ---

>  drivers/watchdog/of_xilinx_wdt.c | 6 +++++-

>  1 file changed, 5 insertions(+), 1 deletion(-)

> 

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

> index 0d7df2370db7..9e67b598907e 100644

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

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

> @@ -50,6 +50,7 @@ static int xilinx_wdt_start(struct watchdog_device *wdd)

>  	int ret;

>  	u32 control_status_reg;

>  	struct xwdt_device *xdev = watchdog_get_drvdata(wdd);

> +	struct watchdog_device *xilinx_wdt_wdd = &xdev->xilinx_wdt_wdd;

>  

This is the same as wdd and thus pointless.

>  	ret = clk_enable(xdev->clk);

>  	if (ret) {

> @@ -70,6 +71,8 @@ static int xilinx_wdt_start(struct watchdog_device *wdd)

>  

>  	spin_unlock(&xdev->spinlock);

>  

> +	dev_dbg(xilinx_wdt_wdd->parent, "Watchdog Started!\n");

> +

>  	return 0;

>  }

>  

> @@ -77,6 +80,7 @@ static int xilinx_wdt_stop(struct watchdog_device *wdd)

>  {

>  	u32 control_status_reg;

>  	struct xwdt_device *xdev = watchdog_get_drvdata(wdd);

> +	struct watchdog_device *xilinx_wdt_wdd = &xdev->xilinx_wdt_wdd;

>  

Same as above: This is the same as wdd and thus pointless.

>  	spin_lock(&xdev->spinlock);

>  

> @@ -91,7 +95,7 @@ static int xilinx_wdt_stop(struct watchdog_device *wdd)

>  

>  	clk_disable(xdev->clk);

>  

> -	pr_info("Stopped!\n");

> +	dev_dbg(xilinx_wdt_wdd->parent, "Watchdog Stopped!\n");

>  

>  	return 0;

>  }

>
diff mbox series

Patch

diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
index 0d7df2370db7..9e67b598907e 100644
--- a/drivers/watchdog/of_xilinx_wdt.c
+++ b/drivers/watchdog/of_xilinx_wdt.c
@@ -50,6 +50,7 @@  static int xilinx_wdt_start(struct watchdog_device *wdd)
 	int ret;
 	u32 control_status_reg;
 	struct xwdt_device *xdev = watchdog_get_drvdata(wdd);
+	struct watchdog_device *xilinx_wdt_wdd = &xdev->xilinx_wdt_wdd;
 
 	ret = clk_enable(xdev->clk);
 	if (ret) {
@@ -70,6 +71,8 @@  static int xilinx_wdt_start(struct watchdog_device *wdd)
 
 	spin_unlock(&xdev->spinlock);
 
+	dev_dbg(xilinx_wdt_wdd->parent, "Watchdog Started!\n");
+
 	return 0;
 }
 
@@ -77,6 +80,7 @@  static int xilinx_wdt_stop(struct watchdog_device *wdd)
 {
 	u32 control_status_reg;
 	struct xwdt_device *xdev = watchdog_get_drvdata(wdd);
+	struct watchdog_device *xilinx_wdt_wdd = &xdev->xilinx_wdt_wdd;
 
 	spin_lock(&xdev->spinlock);
 
@@ -91,7 +95,7 @@  static int xilinx_wdt_stop(struct watchdog_device *wdd)
 
 	clk_disable(xdev->clk);
 
-	pr_info("Stopped!\n");
+	dev_dbg(xilinx_wdt_wdd->parent, "Watchdog Stopped!\n");
 
 	return 0;
 }