Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: tps65219-pwrbutton - use regmap_set_bits()

regmap_set_bits() is equivalent to regmap_update_bits() if mask == val.
The probe function uses regmap_clear_bits() to enable irqs, so
symmetrically make use of regmap_set_bits() to disable them. There is no
semantic difference.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/r/20230605161458.117361-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Uwe Kleine-König and committed by
Dmitry Torokhov
d9f12a3b ab892b7f

+2 -3
+2 -3
drivers/input/misc/tps65219-pwrbutton.c
··· 123 123 int ret; 124 124 125 125 /* Disable interrupt for the pushbutton */ 126 - ret = regmap_update_bits(tps->regmap, TPS65219_REG_MASK_CONFIG, 127 - TPS65219_REG_MASK_INT_FOR_PB_MASK, 128 - TPS65219_REG_MASK_INT_FOR_PB_MASK); 126 + ret = regmap_set_bits(tps->regmap, TPS65219_REG_MASK_CONFIG, 127 + TPS65219_REG_MASK_INT_FOR_PB_MASK); 129 128 if (ret) 130 129 dev_warn(&pdev->dev, "Failed to disable irq (%pe)\n", ERR_PTR(ret)); 131 130 }