]> Pileus Git - ~andy/linux/commitdiff
staging: android-alarm: HACK: wakelock workaround
authorJohn Stultz <john.stultz@linaro.org>
Thu, 9 Feb 2012 22:24:35 +0000 (14:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Feb 2012 18:06:19 +0000 (10:06 -0800)
Allow Android alarmtimer device to build while wakelocks are still
out of tree.

CC: Arve Hjønnevåg <arve@android.com>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/alarm-dev.c
drivers/staging/android/alarm.c

index 758d828784f41848c9e87ead968ded187873b623..03efb34cbe2e4e83717e6468dfff6b8ec9a2eeac 100644 (file)
 #include <linux/sched.h>
 #include <linux/spinlock.h>
 #include <linux/uaccess.h>
-#include <linux/wakelock.h>
 #include "android_alarm.h"
 
+/* XXX - Hack out wakelocks, while they are out of tree */
+struct wake_lock {
+       int i;
+};
+#define wake_lock(x)
+#define wake_lock_timeout(x, y)
+#define wake_unlock(x)
+#define WAKE_LOCK_SUSPEND 0
+#define wake_lock_init(x, y, z) ((x)->i = 1)
+#define wake_lock_destroy(x)
+
 #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);
 
index 1f8bb5ca5682d372397c8e905af53396d2749c8c..5370fdc8b016b66c96e35a27d413a9078c2149e6 100644 (file)
 #include <linux/rtc.h>
 #include <linux/sched.h>
 #include <linux/spinlock.h>
-#include <linux/wakelock.h>
 #include "android_alarm.h"
 
+/* XXX - Hack out wakelocks, while they are out of tree */
+struct wake_lock {
+       int i;
+};
+#define wake_lock(x)
+#define wake_lock_timeout(x, y)
+#define wake_unlock(x)
+#define WAKE_LOCK_SUSPEND 0
+#define wake_lock_init(x, y, z) ((x)->i = 1)
+#define wake_lock_destroy(x)
+
 #define ANDROID_ALARM_PRINT_ERROR (1U << 0)
 #define ANDROID_ALARM_PRINT_INIT_STATUS (1U << 1)
 #define ANDROID_ALARM_PRINT_TSET (1U << 2)