rtc: max77686: Remove unused code to read in 12-hour mode
authorLuca Ceresoli <luca@lucaceresoli.net>
Wed, 23 Feb 2022 17:59:03 +0000 (18:59 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 7 Mar 2022 13:54:32 +0000 (13:54 +0000)
commit3e2e90fefc9bc6f81a477d35db5e3be1bcb9e62d
treeacb87aaac2dfba9d9bfdbf2cf80abe23ac4fdd0a
parenta26d84633c2ba3c41fd7692986fb2231c9228c4e
rtc: max77686: Remove unused code to read in 12-hour mode

The MAX77714 RTC chip is explicitly set to 24-hour mode in
max77686_rtc_probe() -> max77686_rtc_init_reg() and never changed back to
12-hour mode. Accordingly info->rtc_24hr_mode is set to 1 in the same place
and never modified later, so it is de facto a constant. Yet there is code
to read 12-hour time, which is unreachable.

Remove the unused variable, the unreachable code to manage 12-hour mode and
the defines that become unused due to the above changes.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/rtc/rtc-max77686.c