mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
rtc: ds1305: use guard
Use guard() to simplify locking Link: https://patch.msgid.link/20261019211827.126262-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
f371caa420
commit
d1fd5232fa
|
|
@ -440,7 +440,7 @@ static void ds1305_work(struct work_struct *work)
|
|||
int status;
|
||||
|
||||
/* lock to protect ds1305->ctrl */
|
||||
rtc_lock(ds1305->rtc);
|
||||
guard(rtc_ops)(ds1305->rtc);
|
||||
|
||||
/* Disable the IRQ, and clear its status ... for now, we "know"
|
||||
* that if more than one alarm is active, they're in sync.
|
||||
|
|
@ -458,8 +458,6 @@ static void ds1305_work(struct work_struct *work)
|
|||
if (status < 0)
|
||||
dev_dbg(&spi->dev, "clear irq --> %d\n", status);
|
||||
|
||||
rtc_unlock(ds1305->rtc);
|
||||
|
||||
if (!test_bit(FLAG_EXITING, &ds1305->flags))
|
||||
enable_irq(spi->irq);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user