aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rar_register.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/rar_register.h b/include/linux/rar_register.h
index ffa805780f8..80b68fc8eeb 100644
--- a/include/linux/rar_register.h
+++ b/include/linux/rar_register.h
@@ -32,6 +32,7 @@
#ifdef __KERNEL__
+#if defined(CONFIG_RAR_REGISTER)
struct rar_device;
int register_rar(int num,
@@ -40,5 +41,24 @@ void unregister_rar(int num);
int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end);
int rar_lock(int rar_index);
+#else
+
+extern inline int register_rar(int num,
+ int (*callback)(unsigned long data), unsigned long data)
+{
+ return -ENODEV;
+}
+
+extern inline void unregister_rar(int num) { return; }
+
+extern inline int rar_get_address(int rar_index, dma_addr_t *start,
+ dma_addr_t *end)
+{
+ return -ENODEV;
+}
+
+extern inline int rar_lock(int rar_index) { return -1; }
+
+#endif /* RAR_REGISTER */
#endif /* __KERNEL__ */
#endif /* _RAR_REGISTER_H */