diff options
author | Alan Cox <alan@linux.intel.com> | 2010-11-24 14:33:43 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-29 14:17:22 -0500 |
commit | 62a8c3a32e4143812ed8e0f3783ef1ea40dc87e4 (patch) | |
tree | 8b6e78234c767b615bfc58523089c1e951c6f0ab /include/linux/rar_register.h | |
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/rar_register.h')
-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 @@ | |||
34 | 34 | ||
35 | struct rar_device; | 35 | struct rar_device; |
36 | 36 | ||
37 | #if defined(CONFIG_RAR_REGISTER) | ||
37 | int register_rar(int num, | 38 | int register_rar(int num, |
38 | int (*callback)(unsigned long data), unsigned long data); | 39 | int (*callback)(unsigned long data), unsigned long data); |
39 | void unregister_rar(int num); | 40 | void unregister_rar(int num); |
40 | int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end); | 41 | int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end); |
41 | int rar_lock(int rar_index); | 42 | int rar_lock(int rar_index); |
43 | #else | ||
44 | extern void unregister_rar(int num) { } | ||
45 | extern int rar_lock(int rar_index) { return -EIO; } | ||
46 | |||
47 | extern inline int register_rar(int num, | ||
48 | int (*callback)(unsigned long data), unsigned long data) | ||
49 | { | ||
50 | return -ENODEV; | ||
51 | } | ||
52 | |||
53 | extern int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end) | ||
54 | { | ||
55 | return -ENODEV; | ||
56 | } | ||
57 | #endif /* RAR_REGISTER */ | ||
42 | 58 | ||
43 | #endif /* __KERNEL__ */ | 59 | #endif /* __KERNEL__ */ |
44 | #endif /* _RAR_REGISTER_H */ | 60 | #endif /* _RAR_REGISTER_H */ |