Skip to content

Commit

Permalink
watchdog: sch56xx-common: set correct bits in register()
Browse files Browse the repository at this point in the history
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>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Dan Carpenter authored and Wim Van Sebroeck committed May 30, 2012
1 parent 664a0d7 commit bb64491
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/sch56xx-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down

0 comments on commit bb64491

Please sign in to comment.