diff options
| author | Yuta Hayama <hayama@lineo.co.jp> | 2025-10-15 12:07:05 +0900 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2025-11-08 20:56:12 +0100 |
| commit | 162f24cbb0f6ec596e7e9f3e91610d79dc805229 (patch) | |
| tree | 4e5b1201d206ff7bbdf7f386c46ee27c53c8d115 /drivers/rtc | |
| parent | 0d510778c2f4913b5ca062b8a538929bff94e0be (diff) | |
rtc: rx8025: fix incorrect register reference
This code is intended to operate on the CTRL1 register, but ctrl[1] is
actually CTRL2. Correctly, ctrl[0] is CTRL1.
Signed-off-by: Yuta Hayama <hayama@lineo.co.jp>
Fixes: 71af91565052 ("rtc: rx8025: fix 12/24 hour mode detection on RX-8035")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/eae5f479-5d28-4a37-859d-d54794e7628c@lineo.co.jp
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
| -rw-r--r-- | drivers/rtc/rtc-rx8025.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c index aabe62c283a1..7e9f7cb90c28 100644 --- a/drivers/rtc/rtc-rx8025.c +++ b/drivers/rtc/rtc-rx8025.c @@ -316,7 +316,7 @@ static int rx8025_init_client(struct i2c_client *client) return hour_reg; rx8025->is_24 = (hour_reg & RX8035_BIT_HOUR_1224); } else { - rx8025->is_24 = (ctrl[1] & RX8025_BIT_CTRL1_1224); + rx8025->is_24 = (ctrl[0] & RX8025_BIT_CTRL1_1224); } out: return err; |
