mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
watchdog: use assign_bit() where applicable
Convert open-coded if/else with set_bit/clear_bit and their non-atomic __set_bit/__clear_bit variants to the assign_bit/__assign_bit API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20260918141915.3023207-1-peng.fan@oss.nxp.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
b2937ea44b
commit
07c03fc1d0
|
|
@ -314,10 +314,7 @@ static int ___watchdog_register_device(struct watchdog_device *wdd)
|
|||
|
||||
/* Module parameter to force watchdog policy on reboot. */
|
||||
if (stop_on_reboot != -1) {
|
||||
if (stop_on_reboot)
|
||||
set_bit(WDOG_STOP_ON_REBOOT, &wdd->status);
|
||||
else
|
||||
clear_bit(WDOG_STOP_ON_REBOOT, &wdd->status);
|
||||
assign_bit(WDOG_STOP_ON_REBOOT, &wdd->status, stop_on_reboot);
|
||||
}
|
||||
|
||||
if (test_bit(WDOG_STOP_ON_REBOOT, &wdd->status)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user