kcapi.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Kernel CAPI 2.0 Module
  3. *
  4. * Copyright 1999 by Carsten Paeth <calle@calle.de>
  5. * Copyright 2002 by Kai Germaschewski <kai@germaschewski.name>
  6. *
  7. * This software may be used and distributed according to the terms
  8. * of the GNU General Public License, incorporated herein by reference.
  9. *
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/spinlock.h>
  13. #include <linux/list.h>
  14. #include <linux/isdn/capilli.h>
  15. #ifdef KCAPI_DEBUG
  16. #define DBG(format, arg...) do { \
  17. printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \
  18. } while (0)
  19. #else
  20. #define DBG(format, arg...) /* */
  21. #endif
  22. enum {
  23. CAPI_CTR_DETACHED = 0,
  24. CAPI_CTR_DETECTED = 1,
  25. CAPI_CTR_LOADING = 2,
  26. CAPI_CTR_RUNNING = 3,
  27. };
  28. extern struct list_head capi_drivers;
  29. extern struct mutex capi_drivers_lock;
  30. extern struct capi_ctr *capi_controller[CAPI_MAXCONTR];
  31. extern struct mutex capi_controller_lock;
  32. extern struct capi20_appl *capi_applications[CAPI_MAXAPPL];
  33. #ifdef CONFIG_PROC_FS
  34. void kcapi_proc_init(void);
  35. void kcapi_proc_exit(void);
  36. #else
  37. static inline void kcapi_proc_init(void) { };
  38. static inline void kcapi_proc_exit(void) { };
  39. #endif