diff options
author | Alan Cox <alan@linux.intel.com> | 2010-12-08 10:57:30 +0000 |
---|---|---|
committer | Alan Cox <alan@linux.intel.com> | 2010-12-08 10:57:30 +0000 |
commit | a5f6c2a554ee06b63e4cbe1e604aa6eaf65ee1eb (patch) | |
tree | 55b4893a064738b83b988cff382ba7f2c7b1321a /include | |
parent | 35123c4561b9e35a266da70add75927782df0f6b (diff) | |
download | mrst-s0i3-test-a5f6c2a554ee06b63e4cbe1e604aa6eaf65ee1eb.tar.gz mrst-s0i3-test-a5f6c2a554ee06b63e4cbe1e604aa6eaf65ee1eb.tar.xz mrst-s0i3-test-a5f6c2a554ee06b63e4cbe1e604aa6eaf65ee1eb.zip |
rar_register: provide alternates when compiled out
Rework this from the staging patch and rar_register_stubs in the existing
code but use inlines so we still typecheck.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rar_register.h | 20 |
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 */ |