summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2026-05-04 12:00:28 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2026-05-05 11:07:46 +0200
commitd25e5cbac4e2287c843fc8b45c50dd8e57e3a696 (patch)
tree2f1b8d194a25b152f81308522223f67ec148cc28
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
downloadlinux-d25e5cbac4e2287c843fc8b45c50dd8e57e3a696.tar.gz
linux-d25e5cbac4e2287c843fc8b45c50dd8e57e3a696.zip
auxdisplay: max6959: use regmap_assign_bits() in max6959_enable()
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>
-rw-r--r--drivers/auxdisplay/max6959.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/auxdisplay/max6959.c b/drivers/auxdisplay/max6959.c
index 6bbc8d48fb1b..3bdef099a225 100644
--- a/drivers/auxdisplay/max6959.c
+++ b/drivers/auxdisplay/max6959.c
@@ -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)