aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2014-02-04 19:08:34 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-07 12:03:16 -0500
commitbbd9ae8a05e05a608ff9158cf3b95be7b857a6fa (patch)
treef4f12c32aaa98d5991710723073ab9108829dfd6
parent102f1a2a496a76f16675ee4bf13e2a5e512c447e (diff)
staging: sw_sync: Add stubs for kernels without CONFIG_SW_SYNC
Add stubs for kernels without CONFIG_SW_SYNC Cc: Colin Cross <ccross@android.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Greg Hackmann <ghackmann@google.com> [jstultz: resolved minor conflict, tweaked commit message] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/android/sw_sync.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/staging/android/sw_sync.h b/drivers/staging/android/sw_sync.h
index 585040be5f18..5aaf71d6974b 100644
--- a/drivers/staging/android/sw_sync.h
+++ b/drivers/staging/android/sw_sync.h
@@ -35,10 +35,27 @@ struct sw_sync_pt {
35 u32 value; 35 u32 value;
36}; 36};
37 37
38#if IS_ENABLED(CONFIG_SW_SYNC)
38struct sw_sync_timeline *sw_sync_timeline_create(const char *name); 39struct sw_sync_timeline *sw_sync_timeline_create(const char *name);
39void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc); 40void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc);
40 41
41struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value); 42struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value);
43#else
44static inline struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
45{
46 return NULL;
47}
48
49static inline void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
50{
51}
52
53static inline struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj,
54 u32 value)
55{
56 return NULL;
57}
58#endif /* IS_ENABLED(CONFIG_SW_SYNC) */
42 59
43#endif /* __KERNEL __ */ 60#endif /* __KERNEL __ */
44 61