Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Kernel CAPI 2.0 Module |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 3 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * Copyright 1999 by Carsten Paeth <calle@calle.de> |
| 5 | * Copyright 2002 by Kai Germaschewski <kai@germaschewski.name> |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 6 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
| 12 | |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/spinlock.h> |
| 15 | #include <linux/list.h> |
| 16 | #include <linux/isdn/capilli.h> |
| 17 | |
| 18 | #ifdef KCAPI_DEBUG |
Joe Perches | 475be4d | 2012-02-19 19:52:38 -0800 | [diff] [blame] | 19 | #define DBG(format, arg...) do { \ |
| 20 | printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \ |
| 21 | } while (0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | #else |
| 23 | #define DBG(format, arg...) /* */ |
| 24 | #endif |
| 25 | |
| 26 | enum { |
Jan Kiszka | 0ca3a01 | 2010-02-08 10:12:14 +0000 | [diff] [blame] | 27 | CAPI_CTR_DETACHED = 0, |
Jan Kiszka | 5225303 | 2010-02-08 10:12:10 +0000 | [diff] [blame] | 28 | CAPI_CTR_DETECTED = 1, |
| 29 | CAPI_CTR_LOADING = 2, |
| 30 | CAPI_CTR_RUNNING = 3, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | extern struct list_head capi_drivers; |
Jan Kiszka | 9717fb8 | 2010-02-08 10:12:11 +0000 | [diff] [blame] | 34 | extern struct mutex capi_drivers_lock; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
Jan Kiszka | 5225303 | 2010-02-08 10:12:10 +0000 | [diff] [blame] | 36 | extern struct capi_ctr *capi_controller[CAPI_MAXCONTR]; |
Jan Kiszka | 0ca3a01 | 2010-02-08 10:12:14 +0000 | [diff] [blame] | 37 | extern struct mutex capi_controller_lock; |
| 38 | |
| 39 | extern struct capi20_appl *capi_applications[CAPI_MAXAPPL]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | |
| 41 | #ifdef CONFIG_PROC_FS |
| 42 | |
| 43 | void kcapi_proc_init(void); |
| 44 | void kcapi_proc_exit(void); |
| 45 | |
| 46 | #else |
| 47 | |
| 48 | static inline void kcapi_proc_init(void) { }; |
| 49 | static inline void kcapi_proc_exit(void) { }; |
| 50 | |
| 51 | #endif |