Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Greg Hackmann and committed by
Greg Kroah-Hartman
bbd9ae8a 102f1a2a

+17
+17
drivers/staging/android/sw_sync.h
··· 35 35 u32 value; 36 36 }; 37 37 38 + #if IS_ENABLED(CONFIG_SW_SYNC) 38 39 struct sw_sync_timeline *sw_sync_timeline_create(const char *name); 39 40 void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc); 40 41 41 42 struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value); 43 + #else 44 + static inline struct sw_sync_timeline *sw_sync_timeline_create(const char *name) 45 + { 46 + return NULL; 47 + } 48 + 49 + static inline void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc) 50 + { 51 + } 52 + 53 + static 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 60 #endif /* __KERNEL __ */ 44 61