]> git.itanic.dy.fi Git - linux-stable/commitdiff
rtc: max31335: fix interrupt status reg
authorAntoniu Miclaus <antoniu.miclaus@analog.com>
Mon, 19 Feb 2024 09:16:15 +0000 (11:16 +0200)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:17:30 +0000 (18:17 -0400)
[ Upstream commit c12e67e076cbcb86fd9c3cb003a344ec684138a6 ]

Fix the register value comparison in the `max31335_volatile_reg`
function for the interrupt status register.

MAX31335_STATUS1 macro definition corresponds to the actual
interrupt status register.

Fixes: dedaf03b99d6 ("rtc: max31335: add driver support")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240219091616.24480-1-antoniu.miclaus@analog.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rtc/rtc-max31335.c

index 402fda8fd54884eb8d1485ab456de696049dc510..a2441e5c2c74d6f452646b68f6df706447bd486d 100644 (file)
@@ -204,7 +204,7 @@ static bool max31335_volatile_reg(struct device *dev, unsigned int reg)
                return true;
 
        /* interrupt status register */
-       if (reg == MAX31335_INT_EN1_A1IE)
+       if (reg == MAX31335_STATUS1)
                return true;
 
        /* temperature registers */