diff options
author | Alan Cox <alan@linux.intel.com> | 2010-11-24 19:33:43 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-29 11:17:22 -0800 |
commit | 62a8c3a32e4143812ed8e0f3783ef1ea40dc87e4 (patch) | |
tree | 8b6e78234c767b615bfc58523089c1e951c6f0ab /include/linux | |
parent | de92e3a3b25dd0cda00a07b30c325785b5c2d939 (diff) |
Staging: sep: handle the rar definition stuff in the header
SEP isn't the only driver that may need to handle both cases easily
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/rar_register.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/rar_register.h b/include/linux/rar_register.h index ffa805780f85..5c6118189363 100644 --- a/include/linux/rar_register.h +++ b/include/linux/rar_register.h @@ -34,11 +34,27 @@ struct rar_device; +#if defined(CONFIG_RAR_REGISTER) int register_rar(int num, int (*callback)(unsigned long data), unsigned long data); 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 void unregister_rar(int num) { } +extern int rar_lock(int rar_index) { return -EIO; } + +extern inline int register_rar(int num, + int (*callback)(unsigned long data), unsigned long data) +{ + return -ENODEV; +} + +extern int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end) +{ + return -ENODEV; +} +#endif /* RAR_REGISTER */ #endif /* __KERNEL__ */ #endif /* _RAR_REGISTER_H */ |