mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
gpio: dln2: 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/20260918141713.3022960-1-peng.fan@oss.nxp.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
parent
b5c2668630
commit
b399579a8e
|
|
@ -243,10 +243,8 @@ static int dln2_gpio_set_direction(struct gpio_chip *chip, unsigned offset,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (dir == DLN2_GPIO_DIRECTION_OUT)
|
||||
set_bit(offset, dln2->output_enabled);
|
||||
else
|
||||
clear_bit(offset, dln2->output_enabled);
|
||||
assign_bit(offset, dln2->output_enabled,
|
||||
dir == DLN2_GPIO_DIRECTION_OUT);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user