]> git.kernelconcepts.de Git - karo-tx-linux.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)
commitfc1dcb0b39dbb10d3290f2fcd6e154670f699166
treefc0252ddaa4eada3cb9150607bbddf80bfffa68d
parent95c60c1c8f51521e7f2174fd0fff4dae6d522b83
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