Alarm uses first registered rtc device for setting alarm
as of now. Changed this to use system rtc so time and
alarm are in sync
Bug
1698877
Change-Id: I8c04736230fb50b8fc77332549414e72e6b43bed
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/
1012790
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
/*
* Alarmtimer interface
*
+ * Copyright (C) 2014 NVIDIA CORPORATION. All rights reserved.
+ *
* This interface provides a timer which is similarto hrtimers,
* but triggers a RTC alarm if the box is suspend.
*
#include <linux/posix-timers.h>
#include <linux/workqueue.h>
#include <linux/freezer.h>
+#include <linux/device.h>
/**
* struct alarm_base - Alarm timer bases
if (rtcdev)
return -EBUSY;
+#ifdef CONFIG_RTC_HCTOSYS_DEVICE
+ if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0)
+ return -EINVAL;
+#endif
+
if (!rtc->ops->set_alarm)
return -1;