aboutsummaryrefslogtreecommitdiff
path: root/kernel/time
diff options
context:
space:
mode:
authorMister Oyster <oysterized@gmail.com>2017-04-09 02:58:08 +0200
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:35:34 +0200
commit260c0c1a0a737c3a42de218b98f2f558d0c66320 (patch)
treea1c0ba963ff32d510b99c03b716d2b41f15c3e29 /kernel/time
parente9889e345222792293c038ebe62ccf0689835d0d (diff)
mtk: alarmtimer: get rid of xlog and debug
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/alarmtimer.c33
1 files changed, 4 insertions, 29 deletions
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index 714be6181..764f7588c 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -25,25 +25,9 @@
#include <linux/posix-timers.h>
#include <linux/workqueue.h>
#include <linux/freezer.h>
-#include <linux/xlog.h>
#include <linux/module.h>
#include <mach/mtk_rtc.h>
-#define XLOG_MYTAG "Power/Alarm"
-
-#define ANDROID_ALARM_PRINT_INFO (1U << 0)
-#define ANDROID_ALARM_PRINT_IO (1U << 1)
-#define ANDROID_ALARM_PRINT_INT (1U << 2)
-
-static int debug_mask = ANDROID_ALARM_PRINT_INFO;
-module_param_named(debug_mask, debug_mask, int, S_IRUGO | S_IWUSR | S_IWGRP);
-
-#define alarm_dbg(debug_level_mask, fmt, args...) \
-do { \
- if (debug_mask & ANDROID_ALARM_PRINT_##debug_level_mask) \
- xlog_printk(ANDROID_LOG_INFO, XLOG_MYTAG, fmt, ##args); \
-} while (0)
-
/**
* struct alarm_base - Alarm timer bases
* @lock: Lock for syncrhonized access to the base
@@ -102,8 +86,8 @@ static int alarmtimer_rtc_add_device(struct device *dev,
if (!rtc->ops->set_alarm)
return -1;
- //if (!device_may_wakeup(rtc->dev.parent))
- // return -1;
+ /*if (!device_may_wakeup(rtc->dev.parent))
+ return -1;*/
spin_lock_irqsave(&rtcdev_lock, flags);
if (!rtcdev) {
@@ -245,8 +229,6 @@ static enum hrtimer_restart alarmtimer_fired(struct hrtimer *timer)
int ret = HRTIMER_NORESTART;
int restart = ALARMTIMER_NORESTART;
- alarm_dbg(INT, "alarmtimer_fired \n");
-
spin_lock_irqsave(&base->lock, flags);
alarmtimer_dequeue(base, alarm);
spin_unlock_irqrestore(&base->lock, flags);
@@ -318,12 +300,10 @@ static int alarmtimer_suspend(struct device *dev)
if (!min.tv64 || (delta.tv64 < min.tv64))
min = delta;
}
- if (min.tv64 == 0) {
- alarm_dbg(INT, "min.tv64 == 0\n");
+ if (min.tv64 == 0)
return 0;
- }
+
if (ktime_to_ns(min) < 2 * NSEC_PER_SEC) {
- alarm_dbg(INT, "min.tv64 < 2S, give up suspend\n");
__pm_wakeup_event(ws, 2 * MSEC_PER_SEC);
return -EBUSY;
}
@@ -334,11 +314,6 @@ static int alarmtimer_suspend(struct device *dev)
now = rtc_tm_to_ktime(tm);
now = ktime_add(now, min);
- alarm_dbg(INFO, "now:%02d=%02d:%02d %02d/%02d/%04d. min.tv64=%lld\n",
- tm.tm_hour, tm.tm_min,
- tm.tm_sec, tm.tm_mon + 1,
- tm.tm_mday,
- tm.tm_year + 1900, min.tv64);
/* Set alarm, if in the past reject suspend briefly to handle */
ret = rtc_timer_start(rtc, &rtctimer, now, ktime_set(0, 0));
if (ret < 0)