]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
alarmtimer: ensure RTC module is not unloaded
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sun, 20 Aug 2017 22:01:46 +0000 (00:01 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 21 Aug 2017 10:52:12 +0000 (12:52 +0200)
commit281097a5df296487f80132eb5812bfbf40e1e1ea
tree77db3f5350a0f6f97117bb66c0d4f8f25754376e
parent5e5e895822d6c555ced3416657b68b278e127125
alarmtimer: ensure RTC module is not unloaded

When registering the rtc device to be used to handle alarm timers,
get_device is used to ensure the device doesn't go away but the module can
still be unloaded. Call try_module_get to ensure the rtc driver will not go
away.

Reported-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
kernel/time/alarmtimer.c