mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-03 21:19:09 +08:00
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>
This commit is contained in:
committed by
Dmitry Torokhov
parent
ab892b7fd4
commit
d9f12a3bbb
@@ -123,9 +123,8 @@ static void tps65219_pb_remove(struct platform_device *pdev)
|
||||
int ret;
|
||||
|
||||
/* Disable interrupt for the pushbutton */
|
||||
ret = regmap_update_bits(tps->regmap, TPS65219_REG_MASK_CONFIG,
|
||||
TPS65219_REG_MASK_INT_FOR_PB_MASK,
|
||||
TPS65219_REG_MASK_INT_FOR_PB_MASK);
|
||||
ret = regmap_set_bits(tps->regmap, TPS65219_REG_MASK_CONFIG,
|
||||
TPS65219_REG_MASK_INT_FOR_PB_MASK);
|
||||
if (ret)
|
||||
dev_warn(&pdev->dev, "Failed to disable irq (%pe)\n", ERR_PTR(ret));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user