From patchwork Mon Feb 3 18:16:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 24047 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f199.google.com (mail-yk0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 827B2202B2 for ; Mon, 3 Feb 2014 18:16:42 +0000 (UTC) Received: by mail-yk0-f199.google.com with SMTP id 142sf45114610ykq.2 for ; Mon, 03 Feb 2014 10:16:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=r+bbjSAUah3bramxjWqxIcEF+eb1aAap67S2SsIGgDU=; b=JJ63/Km1m+NnQpyLBehLC4PNvqtFYD7a3pFnGX6i1WZ2Thv+aZ2LH8G4q3ryxVAMUX iQbzrnhQ9t1HbIlO1xaQMpVLoLOJZacvJOFzFN0+bWegDCBHE3+CBcoToS4ckHG0rCAM 4ju6qNjVmKeR6iQeCmMMjI6jFGPnm3NT1uc5+Hn5n5JV9RCbeUL6lGBM/ADxKxB05u5W BJ2UUEPFMouKAFDjAQaCRcRtksSdAwDPHwuDDrHvpZEwQ+HhOliaUwrI9ef1bU9YF3Om BjfNwGjGFpqZGsd8J8QiB2uwWEV3KX4CIQBivIFEKrhUJ6vUJ+W2fH+nrjmv/YqEPq23 2aCg== X-Gm-Message-State: ALoCoQkJaGyARaHFsv9i0RydpmFtqYX1cDbOsjJkp7nqIPrIdFv9r+QzF5knoFclPJpHPZNi1Rr5 X-Received: by 10.236.149.198 with SMTP id x46mr13778800yhj.7.1391451401649; Mon, 03 Feb 2014 10:16:41 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.7 with SMTP id o7ls2144702qgo.15.gmail; Mon, 03 Feb 2014 10:16:41 -0800 (PST) X-Received: by 10.58.24.196 with SMTP id w4mr185247vef.48.1391451401586; Mon, 03 Feb 2014 10:16:41 -0800 (PST) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id fb12si7039846veb.52.2014.02.03.10.16.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Feb 2014 10:16:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so5115385veb.2 for ; Mon, 03 Feb 2014 10:16:41 -0800 (PST) X-Received: by 10.58.132.203 with SMTP id ow11mr29998903veb.1.1391451401379; Mon, 03 Feb 2014 10:16:41 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp174161vcz; Mon, 3 Feb 2014 10:16:40 -0800 (PST) X-Received: by 10.66.145.166 with SMTP id sv6mr39240310pab.31.1391451399695; Mon, 03 Feb 2014 10:16:39 -0800 (PST) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by mx.google.com with ESMTPS id of8si8710549pbc.163.2014.02.03.10.16.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Feb 2014 10:16:39 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.45 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.220.45; Received: by mail-pa0-f45.google.com with SMTP id lf10so7401856pab.32 for ; Mon, 03 Feb 2014 10:16:39 -0800 (PST) X-Received: by 10.68.34.37 with SMTP id w5mr4497580pbi.159.1391451399271; Mon, 03 Feb 2014 10:16:39 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id y9sm150496099pas.10.2014.02.03.10.16.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Feb 2014 10:16:38 -0800 (PST) From: John Stultz To: LKML Cc: Greg Hackmann , Greg KH , Colin Cross , Android Kernel Team , John Stultz Subject: [PATCH 05/16] staging: sw_sync: Add stubs for kernels without CONFIG_SW_SYNC Date: Mon, 3 Feb 2014 10:16:17 -0800 Message-Id: <1391451388-23906-6-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1391451388-23906-1-git-send-email-john.stultz@linaro.org> References: <1391451388-23906-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Greg Hackmann Add stubs for kernels without CONFIG_SW_SYNC Cc: Greg KH Cc: Colin Cross Cc: Android Kernel Team Signed-off-by: Greg Hackmann [jstultz: resolved minor conflict, tweaked commit message] Signed-off-by: John Stultz --- drivers/staging/android/sw_sync.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/staging/android/sw_sync.h b/drivers/staging/android/sw_sync.h index 06aa0b3..1a50669 100644 --- a/drivers/staging/android/sw_sync.h +++ b/drivers/staging/android/sw_sync.h @@ -34,9 +34,26 @@ struct sw_sync_pt { u32 value; }; +#if IS_ENABLED(CONFIG_SW_SYNC) struct sw_sync_timeline *sw_sync_timeline_create(const char *name); void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc); struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value); +#else +static inline struct sw_sync_timeline *sw_sync_timeline_create(const char *name) +{ + return NULL; +} + +static inline void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc) +{ +} + +static inline struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, + u32 value) +{ + return NULL; +} +#endif /* IS_ENABLED(CONFIG_SW_SYNC) */ #endif /* _LINUX_SW_SYNC_H */