]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
auxdisplay: max6959: use regmap_assign_bits() in max6959_enable()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 4 May 2026 10:00:28 +0000 (12:00 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 5 May 2026 09:07:46 +0000 (11:07 +0200)
Replace the ternary with a direct call to the regmap_assign_bits()
helper and save a couple lines of code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/auxdisplay/max6959.c

index 6bbc8d48fb1b26d4733135a4e3777333d1db2d23..3bdef099a2259755a50384580fdd3ceb04810d3c 100644 (file)
@@ -86,10 +86,7 @@ static const struct linedisp_ops max6959_linedisp_ops = {
 
 static int max6959_enable(struct max6959_priv *priv, bool enable)
 {
-       u8 mask = REG_CONFIGURATION_S_BIT;
-       u8 value = enable ? mask : 0;
-
-       return regmap_update_bits(priv->regmap, REG_CONFIGURATION, mask, value);
+       return regmap_assign_bits(priv->regmap, REG_CONFIGURATION, REG_CONFIGURATION_S_BIT, enable);
 }
 
 static void max6959_power_off(void *priv)