[PATCH] gpio: dln2: use assign_bit() where applicable

Peng Fan (OSS) posted 1 patch 6 days, 8 hours ago
drivers/gpio/gpio-dln2.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
[PATCH] gpio: dln2: use assign_bit() where applicable
Posted by Peng Fan (OSS) 6 days, 8 hours ago
From: Peng Fan <peng.fan@nxp.com>

Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/gpio/gpio-dln2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-dln2.c b/drivers/gpio/gpio-dln2.c
index 4670ffd7ea7f..aef4345d265e 100644
--- a/drivers/gpio/gpio-dln2.c
+++ b/drivers/gpio/gpio-dln2.c
@@ -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;
 }
-- 
2.51.0
Re: [PATCH] gpio: dln2: use assign_bit() where applicable
Posted by Bartosz Golaszewski 2 days, 14 hours ago
On Fri, 18 Sep 2026 22:17:13 +0800, Peng Fan (OSS) wrote:
> Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.
> 
> 

Applied, thanks!

[1/1] gpio: dln2: use assign_bit() where applicable
      https://git.kernel.org/brgl/c/b399579a8e7b2a442f456df86cafc33628da420d

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>