mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
gpio: wcove: use regmap_assign_bits() in .set()
Replace the if-else with a direct call to the regmap_assign_bits() helper and save a couple lines of code. Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250715-gpiochip-set-rv-gpio-remaining-v2-1-072b4cf06330@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
2aa8ccab5a
commit
03d4bd5729
|
|
@ -208,10 +208,7 @@ static void wcove_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)
|
|||
if (reg < 0)
|
||||
return;
|
||||
|
||||
if (value)
|
||||
regmap_set_bits(wg->regmap, reg, 1);
|
||||
else
|
||||
regmap_clear_bits(wg->regmap, reg, 1);
|
||||
regmap_assign_bits(wg->regmap, reg, 1, value);
|
||||
}
|
||||
|
||||
static int wcove_gpio_set_config(struct gpio_chip *chip, unsigned int gpio,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user