mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
misc: ad525x_dpot: 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> Link: https://patch.msgid.link/20260919130759.3041493-1-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ff7472afb3
commit
f3ada175eb
|
|
@ -451,10 +451,8 @@ static ssize_t sysfs_set_reg(struct device *dev,
|
|||
int err;
|
||||
|
||||
if (reg & DPOT_ADDR_OTP_EN) {
|
||||
if (sysfs_streq(buf, "enabled"))
|
||||
set_bit(DPOT_RDAC_MASK & reg, data->otp_en_mask);
|
||||
else
|
||||
clear_bit(DPOT_RDAC_MASK & reg, data->otp_en_mask);
|
||||
assign_bit(DPOT_RDAC_MASK & reg, data->otp_en_mask,
|
||||
sysfs_streq(buf, "enabled"));
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user