]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: ds3232: use rtc->ops_lock to protect alarm operations
authorAkinobu Mita <akinobu.mita@gmail.com>
Sun, 6 Mar 2016 15:27:53 +0000 (00:27 +0900)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 14 Mar 2016 16:08:38 +0000 (17:08 +0100)
commit9ed4c36101d5a9c33588b0bebef490cd1e613faa
treefc0252ddaa4eada3cb9150607bbddf80bfffa68d
parent2109a4c09490db52c3de76d9a21a8d25951c9be9
rtc: ds3232: use rtc->ops_lock to protect alarm operations

ds3232->mutex is used to protect for alarm operations which
need to access status and control registers.

But we can use rtc->ops_lock instead.  rtc->ops_lock is held when most
of rtc_class_ops methods are called, so we only need to explicitly
acquire it from irq handler in order to protect form concurrent
accesses.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-ds3232.c