From patchwork Thu Feb 9 22:24:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 6739 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 7932523E01 for ; Thu, 9 Feb 2012 22:25:29 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 42719A18167 for ; Thu, 9 Feb 2012 22:25:29 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id z7so4255939iab.11 for ; Thu, 09 Feb 2012 14:25:29 -0800 (PST) Received: by 10.42.74.195 with SMTP id x3mr5363868icj.41.1328826329062; Thu, 09 Feb 2012 14:25:29 -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.231.12.131 with SMTP id x3cs56324ibx; Thu, 9 Feb 2012 14:25:28 -0800 (PST) Received: by 10.101.134.12 with SMTP id l12mr1657834ann.76.1328826327967; Thu, 09 Feb 2012 14:25:27 -0800 (PST) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com. [32.97.110.150]) by mx.google.com with ESMTPS id y1si4070539yha.125.2012.02.09.14.25.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Feb 2012 14:25:27 -0800 (PST) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.150 as permitted sender) client-ip=32.97.110.150; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.150 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Feb 2012 15:25:26 -0700 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 9 Feb 2012 15:25:04 -0700 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id CB1BF1FF0049; Thu, 9 Feb 2012 15:25:03 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q19MOnaB097720; Thu, 9 Feb 2012 15:24:55 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q19MOnlu001527; Thu, 9 Feb 2012 15:24:49 -0700 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q19MOnLo001495; Thu, 9 Feb 2012 15:24:49 -0700 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id 25367BFEC6; Thu, 9 Feb 2012 14:24:48 -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/12] HACK: android-alarm: wakelock workaround Date: Thu, 9 Feb 2012 14:24:35 -0800 Message-Id: <1328826281-27148-7-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1328826281-27148-1-git-send-email-john.stultz@linaro.org> References: <1328826281-27148-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12020922-3270-0000-0000-000003E0D3B6 X-Gm-Message-State: ALoCoQkk8iuXUAyMwNu4NtJ9Y0RNSrVSpYPWZ+91whuUPOovC5RCzz+lUUASfPX1HnBcYgv6PV4S 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 758d828..03efb34 100644 --- a/drivers/staging/android/alarm-dev.c +++ b/drivers/staging/android/alarm-dev.c @@ -22,13 +22,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 1f8bb5c..5370fdc 100644 --- a/drivers/staging/android/alarm.c +++ b/drivers/staging/android/alarm.c @@ -21,9 +21,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)