summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2019-10-24 17:24:27 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-29 10:23:43 +0100
commite1ef5d828320cec35232126497b1b8dd4c22d540 (patch)
tree58f9b88018b753863b2d5a75cd51c0a412bd6d03
parent07dc9dfd190da4caaed828fd1e1b6b024133614f (diff)
downloadbarebox-e1ef5d828320cec35232126497b1b8dd4c22d540.tar.gz
barebox-e1ef5d828320cec35232126497b1b8dd4c22d540.tar.xz
watchdog: rename timeout_curr to poller_timeout_curr internally
timeout_curr is the timeout programmed into the watchdog hardware every 500 milliseconds. If watchdog poller support is disabled, it serves no purpose, prefix it with poller_ to better communicate this fact. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/watchdog/wd_core.c10
-rw-r--r--include/watchdog.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/watchdog/wd_core.c b/drivers/watchdog/wd_core.c
index 80bde82f7c..07fe9b030e 100644
--- a/drivers/watchdog/wd_core.c
+++ b/drivers/watchdog/wd_core.c
@@ -63,7 +63,7 @@ static int watchdog_set_cur(struct param_d *param, void *priv)
{
struct watchdog *wd = priv;
- if (wd->timeout_cur > wd->timeout_max)
+ if (wd->poller_timeout_cur > wd->timeout_max)
return -EINVAL;
return 0;
@@ -73,7 +73,7 @@ static void watchdog_poller_cb(void *priv);
static void watchdog_poller_start(struct watchdog *wd)
{
- watchdog_set_timeout(wd, wd->timeout_cur);
+ watchdog_set_timeout(wd, wd->poller_timeout_cur);
poller_call_async(&wd->poller, 500 * MSECOND,
watchdog_poller_cb, wd);
@@ -158,8 +158,8 @@ int watchdog_register(struct watchdog *wd)
if (!wd->timeout_max)
wd->timeout_max = 60 * 60 * 24;
- if (!wd->timeout_cur || wd->timeout_cur > wd->timeout_max)
- wd->timeout_cur = wd->timeout_max;
+ if (!wd->poller_timeout_cur || wd->poller_timeout_cur > wd->timeout_max)
+ wd->poller_timeout_cur = wd->timeout_max;
p = dev_add_param_uint32_ro(&wd->dev, "timeout_max",
&wd->timeout_max, "%u");
@@ -167,7 +167,7 @@ int watchdog_register(struct watchdog *wd)
return PTR_ERR(p);
p = dev_add_param_uint32(&wd->dev, "timeout_cur", watchdog_set_cur, NULL,
- &wd->timeout_cur, "%u", wd);
+ &wd->poller_timeout_cur, "%u", wd);
if (IS_ERR(p))
return PTR_ERR(p);
diff --git a/include/watchdog.h b/include/watchdog.h
index 891a0920e4..184a218916 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -23,7 +23,7 @@ struct watchdog {
struct device_d dev;
unsigned int priority;
unsigned int timeout_max;
- unsigned int timeout_cur;
+ unsigned int poller_timeout_cur;
unsigned int poller_enable;
struct poller_async poller;
struct list_head list;