mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
mtd: cfi_cmdset_0001: use assign_bit() where applicable
Convert open-coded if/else with set_bit/clear_bit to the assign_bit API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Breno Leitao <leitao@debian.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
a018524a2e
commit
30c70e01f7
|
|
@ -2510,10 +2510,7 @@ static void cfi_intelext_save_locks(struct mtd_info *mtd)
|
|||
|
||||
status = cfi_varsize_frob(mtd,
|
||||
do_getlockstatus_oneblock, adr, len, NULL);
|
||||
if (status)
|
||||
set_bit(block, region->lockmap);
|
||||
else
|
||||
clear_bit(block, region->lockmap);
|
||||
assign_bit(block, region->lockmap, status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user