Skip to content

Commit f5adb1f

Browse files
andredalexandrebelloni
authored andcommitted
rtc: s5m: replace regmap_update_bits with regmap_clear/set_bits
The regmap_clear_bits() and regmap_set_bits() helper macros state the intention a bit more obviously. Use those. Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: André Draszik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 1dd6095 commit f5adb1f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/rtc/rtc-s5m.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ static int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
338338

339339
/* On S2MPS13 the AUDR is not auto-cleared */
340340
if (info->device_type == S2MPS13X)
341-
regmap_update_bits(info->regmap, info->regs->udr_update,
342-
S2MPS13_RTC_AUDR_MASK, 0);
341+
regmap_clear_bits(info->regmap, info->regs->udr_update,
342+
S2MPS13_RTC_AUDR_MASK);
343343

344344
return ret;
345345
}
@@ -351,10 +351,8 @@ static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm)
351351
int ret;
352352

353353
if (info->regs->read_time_udr_mask) {
354-
ret = regmap_update_bits(info->regmap,
355-
info->regs->udr_update,
356-
info->regs->read_time_udr_mask,
357-
info->regs->read_time_udr_mask);
354+
ret = regmap_set_bits(info->regmap, info->regs->udr_update,
355+
info->regs->read_time_udr_mask);
358356
if (ret) {
359357
dev_err(dev,
360358
"Failed to prepare registers for time reading: %d\n",

0 commit comments

Comments
 (0)