summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2015-09-18 23:55:00 +0800
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 11:01:44 -0600
commitd0a7d8845c932439be6b00d061f9eb1332a443d0 (patch)
treeea3d24a6147c97fd75745dea96b56975e54bf7d4 /include
parent2e74c862c9abe07bb4a8ecc7f8aa8102e76e2d7d (diff)
MLK-11566-5 drvier: imx_sema4: add dummy function
When CONFIG_IMX_SEMA4 is NOT set, some modules may still call SEMA4 APIs, need to add dummy function to make sure build pass. Signed-off-by: Anson Huang <b20788@freescale.com> (cherry picked from commit 5a2537095621da25c8967a0ccdbb8b0029e14c94)
Diffstat (limited to 'include')
-rw-r--r--include/linux/imx_sema4.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/imx_sema4.h b/include/linux/imx_sema4.h
index 83f319f805e9..fe4808908f77 100644
--- a/include/linux/imx_sema4.h
+++ b/include/linux/imx_sema4.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Freescale Semiconductor, Inc.
+ * Copyright (C) 2014-2015 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -57,8 +57,27 @@ struct imx_sema4_mutex_device {
struct imx_sema4_mutex *
imx_sema4_mutex_create(u32 dev_num, u32 mutex_num);
+#ifdef CONFIG_IMX_SEMA4
int imx_sema4_mutex_destroy(struct imx_sema4_mutex *mutex_ptr);
int imx_sema4_mutex_trylock(struct imx_sema4_mutex *mutex_ptr);
int imx_sema4_mutex_lock(struct imx_sema4_mutex *mutex_ptr);
int imx_sema4_mutex_unlock(struct imx_sema4_mutex *mutex_ptr);
+#else
+static inline int imx_sema4_mutex_destroy(struct imx_sema4_mutex *mutex_ptr)
+{
+ return 0;
+}
+static inline int imx_sema4_mutex_trylock(struct imx_sema4_mutex *mutex_ptr)
+{
+ return 0;
+}
+static inline int imx_sema4_mutex_lock(struct imx_sema4_mutex *mutex_ptr)
+{
+ return 0;
+}
+static inline int imx_sema4_mutex_unlock(struct imx_sema4_mutex *mutex_ptr)
+{
+ return 0;
+}
+#endif
#endif /* __LINUX_IMX_SEMA4_H__ */