From: Hans de Goede <hdegoede@redhat.com> To: linux-watchdog@vger.kernel.org Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Wim Van Sebroeck <wim@iguana.be>, LM Sensors <lm-sensors@lm-sensors.org>, Thilo Cestonaro <thilo.cestonaro@ts.fujitsu.com>, Hans de Goede <hdegoede@redhat.com> Subject: [PATCH 1/5] watchdog_dev: Use wddev function parameter instead of wdd global Date: Mon, 12 Sep 2011 11:56:56 +0200 [thread overview] Message-ID: <1315821420-16205-2-git-send-email-hdegoede@redhat.com> (raw) In-Reply-To: <1315821420-16205-1-git-send-email-hdegoede@redhat.com> Various functions in watchdog_dev take the dev to operate on as a parameter, yet they do some operations on the global wdd pointer, this patch fixes this. This is a preperation patch for adding support for multiple watchdogs. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/watchdog/watchdog_dev.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index d33520d..1199da0 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -59,7 +59,7 @@ static struct watchdog_device *wdd; static int watchdog_ping(struct watchdog_device *wddev) { - if (test_bit(WDOG_ACTIVE, &wdd->status)) { + if (test_bit(WDOG_ACTIVE, &wddev->status)) { if (wddev->ops->ping) return wddev->ops->ping(wddev); /* ping the watchdog */ else @@ -81,12 +81,12 @@ static int watchdog_start(struct watchdog_device *wddev) { int err; - if (!test_bit(WDOG_ACTIVE, &wdd->status)) { + if (!test_bit(WDOG_ACTIVE, &wddev->status)) { err = wddev->ops->start(wddev); if (err < 0) return err; - set_bit(WDOG_ACTIVE, &wdd->status); + set_bit(WDOG_ACTIVE, &wddev->status); } return 0; } @@ -105,18 +105,18 @@ static int watchdog_stop(struct watchdog_device *wddev) { int err = -EBUSY; - if (test_bit(WDOG_NO_WAY_OUT, &wdd->status)) { + if (test_bit(WDOG_NO_WAY_OUT, &wddev->status)) { pr_info("%s: nowayout prevents watchdog to be stopped!\n", - wdd->info->identity); + wddev->info->identity); return err; } - if (test_bit(WDOG_ACTIVE, &wdd->status)) { + if (test_bit(WDOG_ACTIVE, &wddev->status)) { err = wddev->ops->stop(wddev); if (err < 0) return err; - clear_bit(WDOG_ACTIVE, &wdd->status); + clear_bit(WDOG_ACTIVE, &wddev->status); } return 0; } -- 1.7.6.2
WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com> To: linux-watchdog@vger.kernel.org Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Wim Van Sebroeck <wim@iguana.be>, LM Sensors <lm-sensors@lm-sensors.org>, Thilo Cestonaro <thilo.cestonaro@ts.fujitsu.com>, Hans de Goede <hdegoede@redhat.com> Subject: [lm-sensors] [PATCH 1/5] watchdog_dev: Use wddev function parameter Date: Mon, 12 Sep 2011 09:56:56 +0000 [thread overview] Message-ID: <1315821420-16205-2-git-send-email-hdegoede@redhat.com> (raw) In-Reply-To: <1315821420-16205-1-git-send-email-hdegoede@redhat.com> Various functions in watchdog_dev take the dev to operate on as a parameter, yet they do some operations on the global wdd pointer, this patch fixes this. This is a preperation patch for adding support for multiple watchdogs. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/watchdog/watchdog_dev.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index d33520d..1199da0 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -59,7 +59,7 @@ static struct watchdog_device *wdd; static int watchdog_ping(struct watchdog_device *wddev) { - if (test_bit(WDOG_ACTIVE, &wdd->status)) { + if (test_bit(WDOG_ACTIVE, &wddev->status)) { if (wddev->ops->ping) return wddev->ops->ping(wddev); /* ping the watchdog */ else @@ -81,12 +81,12 @@ static int watchdog_start(struct watchdog_device *wddev) { int err; - if (!test_bit(WDOG_ACTIVE, &wdd->status)) { + if (!test_bit(WDOG_ACTIVE, &wddev->status)) { err = wddev->ops->start(wddev); if (err < 0) return err; - set_bit(WDOG_ACTIVE, &wdd->status); + set_bit(WDOG_ACTIVE, &wddev->status); } return 0; } @@ -105,18 +105,18 @@ static int watchdog_stop(struct watchdog_device *wddev) { int err = -EBUSY; - if (test_bit(WDOG_NO_WAY_OUT, &wdd->status)) { + if (test_bit(WDOG_NO_WAY_OUT, &wddev->status)) { pr_info("%s: nowayout prevents watchdog to be stopped!\n", - wdd->info->identity); + wddev->info->identity); return err; } - if (test_bit(WDOG_ACTIVE, &wdd->status)) { + if (test_bit(WDOG_ACTIVE, &wddev->status)) { err = wddev->ops->stop(wddev); if (err < 0) return err; - clear_bit(WDOG_ACTIVE, &wdd->status); + clear_bit(WDOG_ACTIVE, &wddev->status); } return 0; } -- 1.7.6.2 _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-09-12 9:58 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-09-12 9:56 Watchdog timer core enhancements + sch5636 watchdog driver Hans de Goede 2011-09-12 9:56 ` [lm-sensors] Watchdog timer core enhancements + sch5636 watchdog Hans de Goede 2011-09-12 9:56 ` Hans de Goede [this message] 2011-09-12 9:56 ` [lm-sensors] [PATCH 1/5] watchdog_dev: Use wddev function parameter Hans de Goede 2011-09-12 9:56 ` [PATCH 2/5] watchdog_dev: Add support for having more then 1 watchdog Hans de Goede 2011-09-12 9:56 ` [lm-sensors] [PATCH 2/5] watchdog_dev: Add support for having more Hans de Goede 2011-09-12 9:56 ` [PATCH 3/5] watchdog_dev: Add support for dynamically allocated watchdog_device structs Hans de Goede 2011-09-12 9:56 ` [lm-sensors] [PATCH 3/5] watchdog_dev: Add support for dynamically Hans de Goede 2011-09-12 9:56 ` [PATCH 4/5] watchdog_dev: Let the driver update the timeout field on set_timeout success Hans de Goede 2011-09-12 9:56 ` [lm-sensors] [PATCH 4/5] watchdog_dev: Let the driver update the Hans de Goede 2011-09-12 9:57 ` [PATCH 5/5] hwmon/sch5636: Add support for the integrated watchdog Hans de Goede 2011-09-12 9:57 ` [lm-sensors] [PATCH 5/5] hwmon/sch5636: Add support for the Hans de Goede 2011-09-12 17:33 ` [lm-sensors] [PATCH 5/5] hwmon/sch5636: Add support for the integrated watchdog Guenter Roeck 2011-09-12 17:33 ` [lm-sensors] [PATCH 5/5] hwmon/sch5636: Add support for the Guenter Roeck 2011-09-12 17:53 ` [lm-sensors] [PATCH 5/5] hwmon/sch5636: Add support for the integrated watchdog Hans de Goede 2011-09-12 17:53 ` [lm-sensors] [PATCH 5/5] hwmon/sch5636: Add support for the Hans de Goede 2011-09-12 18:03 ` [lm-sensors] [PATCH 5/5] hwmon/sch5636: Add support for the integrated watchdog Jean Delvare 2011-09-12 18:03 ` [lm-sensors] [PATCH 5/5] hwmon/sch5636: Add support for the Jean Delvare 2011-09-12 18:48 ` [lm-sensors] [PATCH 5/5] hwmon/sch5636: Add support for the integrated watchdog Guenter Roeck 2011-09-12 18:48 ` [lm-sensors] [PATCH 5/5] hwmon/sch5636: Add support for the Guenter Roeck
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1315821420-16205-2-git-send-email-hdegoede@redhat.com \ --to=hdegoede@redhat.com \ --cc=alan@lxorguk.ukuu.org.uk \ --cc=linux-watchdog@vger.kernel.org \ --cc=lm-sensors@lm-sensors.org \ --cc=thilo.cestonaro@ts.fujitsu.com \ --cc=wim@iguana.be \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.