linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: "linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>
Subject: Fwd: [lm-sensors] [patch] watchdog: sch56xx-common: set correct bits in register()
Date: Thu, 24 May 2012 22:07:51 +0200	[thread overview]
Message-ID: <4FBE9517.4010402@redhat.com> (raw)
In-Reply-To: <20120524155802.GB11037@elgon.mountain>

Hi,

Thanks for the patch! Since the rest of the watchdog related
sch56xx-common patches, which introduce this problem in the first
place, are going into 3.5 through the watchdog tree, this patch
should probably go in through that tree too -> forwarding this
to linux-watchdog.

Also:
Acked-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans




-------- Original Message --------
Subject: [lm-sensors] [patch] watchdog: sch56xx-common: set correct bits in register()
Date: Thu, 24 May 2012 18:58:02 +0300
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jean Delvare <khali@linux-fr.org>
CC: lm-sensors@lm-sensors.org, kernel-janitors@vger.kernel.org

WDOG_NO_WAY_OUT (3) and WDOG_ACTIVE (0) are the bit numbers, not a mask.
So "data->wddev.status |= WDOG_ACTIVE;" was intended to set bit zero but
it is a no-op.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c
index 839087c..4380f5d 100644
--- a/drivers/hwmon/sch56xx-common.c
+++ b/drivers/hwmon/sch56xx-common.c
@@ -464,9 +464,9 @@ struct sch56xx_watchdog_data *sch56xx_watchdog_register(struct device *parent,
  	data->wddev.min_timeout = 1;
  	data->wddev.max_timeout = 255 * 60;
  	if (nowayout)
-		data->wddev.status |= WDOG_NO_WAY_OUT;
+		set_bit(WDOG_NO_WAY_OUT, &data->wddev.status);
  	if (output_enable & SCH56XX_WDOG_OUTPUT_ENABLE)
-		data->wddev.status |= WDOG_ACTIVE;
+		set_bit(WDOG_ACTIVE, &data->wddev.status);

  	/* Since the watchdog uses a downcounter there is no register to read
  	   the BIOS set timeout from (if any was set at all) ->

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

           reply	other threads:[~2012-05-24 20:07 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20120524155802.GB11037@elgon.mountain>]

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=4FBE9517.4010402@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=linux-watchdog@vger.kernel.org \
    --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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).