aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rar_register.h
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2010-11-24 14:33:43 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-29 14:17:22 -0500
commit62a8c3a32e4143812ed8e0f3783ef1ea40dc87e4 (patch)
tree8b6e78234c767b615bfc58523089c1e951c6f0ab /include/linux/rar_register.h
parentde92e3a3b25dd0cda00a07b30c325785b5c2d939 (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.h16
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
35struct rar_device; 35struct rar_device;
36 36
37#if defined(CONFIG_RAR_REGISTER)
37int register_rar(int num, 38int register_rar(int num,
38 int (*callback)(unsigned long data), unsigned long data); 39 int (*callback)(unsigned long data), unsigned long data);
39void unregister_rar(int num); 40void unregister_rar(int num);
40int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end); 41int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end);
41int rar_lock(int rar_index); 42int rar_lock(int rar_index);
43#else
44extern void unregister_rar(int num) { }
45extern int rar_lock(int rar_index) { return -EIO; }
46
47extern inline int register_rar(int num,
48 int (*callback)(unsigned long data), unsigned long data)
49{
50 return -ENODEV;
51}
52
53extern 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 */