From patchwork Tue Jan 31 03:49:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 6456 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8CB3423EB0 for ; Tue, 31 Jan 2012 03:49:54 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 7C826A18772 for ; Tue, 31 Jan 2012 03:49:54 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id r19so5134385bka.11 for ; Mon, 30 Jan 2012 19:49:54 -0800 (PST) Received: by 10.205.121.2 with SMTP id ga2mr9656979bkc.38.1327981794308; Mon, 30 Jan 2012 19:49:54 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.204.130.220 with SMTP id u28cs170404bks; Mon, 30 Jan 2012 19:49:54 -0800 (PST) Received: by 10.68.218.106 with SMTP id pf10mr29484974pbc.36.1327981793058; Mon, 30 Jan 2012 19:49:53 -0800 (PST) Received: from e38.co.us.ibm.com (e38.co.us.ibm.com. [32.97.110.159]) by mx.google.com with ESMTPS id x10si24821075pbm.235.2012.01.30.19.49.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jan 2012 19:49:53 -0800 (PST) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.159 as permitted sender) client-ip=32.97.110.159; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.159 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Jan 2012 20:49:51 -0700 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 30 Jan 2012 20:49:48 -0700 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 37A581FF0051; Mon, 30 Jan 2012 20:49:48 -0700 (MST) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0V3nlrg157934; Mon, 30 Jan 2012 20:49:48 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0V3nlU0027455; Mon, 30 Jan 2012 20:49:47 -0700 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q0V3nk89027444; Mon, 30 Jan 2012 20:49:47 -0700 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 7830ABFE5F; Mon, 30 Jan 2012 19:49:45 -0800 (PST) From: John Stultz To: Greg KH Cc: John Stultz , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Greg KH , Android Kernel Team Subject: [PATCH 06/11] HACK: android-alarm: wakelock workaround Date: Mon, 30 Jan 2012 19:49:27 -0800 Message-Id: <1327981772-12329-7-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1327981772-12329-1-git-send-email-john.stultz@linaro.org> References: <1327981772-12329-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12013103-5518-0000-0000-000001E508DD Allow Android alarmtimer device to build while wakelocks are still out of tree. CC: Arve Hjønnevåg CC: Greg KH CC: Android Kernel Team Signed-off-by: John Stultz --- drivers/staging/android/alarm-dev.c | 13 ++++++++++++- drivers/staging/android/alarm.c | 12 +++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c index 21a6200..415368a 100644 --- a/drivers/staging/android/alarm-dev.c +++ b/drivers/staging/android/alarm-dev.c @@ -23,13 +23,24 @@ #include #include #include -#include #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); diff --git a/drivers/staging/android/alarm.c b/drivers/staging/android/alarm.c index fa7a7d8..29135ed 100644 --- a/drivers/staging/android/alarm.c +++ b/drivers/staging/android/alarm.c @@ -22,9 +22,19 @@ #include #include #include -#include #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)