| 1 |
#ifndef _DAHDI_H |
| 2 |
#define _DAHDI_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
extern int debug; |
| 29 |
extern const char *const dahdi_version; |
| 30 |
|
| 31 |
int dahdi_register_chardev(struct dahdi_chardev *dev); |
| 32 |
int dahdi_unregister_chardev(struct dahdi_chardev *dev); |
| 33 |
int span_sysfs_create(struct dahdi_span *span); |
| 34 |
void span_sysfs_remove(struct dahdi_span *span); |
| 35 |
int __init dahdi_sysfs_init(const struct file_operations *dahdi_fops); |
| 36 |
void dahdi_sysfs_exit(void); |
| 37 |
|
| 38 |
void dahdi_sysfs_init_device(struct dahdi_device *ddev); |
| 39 |
int dahdi_sysfs_add_device(struct dahdi_device *ddev, struct device *parent); |
| 40 |
void dahdi_sysfs_unregister_device(struct dahdi_device *ddev); |
| 41 |
|
| 42 |
int dahdi_assign_span(struct dahdi_span *span, unsigned int spanno, |
| 43 |
unsigned int basechan, int prefmaster); |
| 44 |
int dahdi_unassign_span(struct dahdi_span *span); |
| 45 |
int dahdi_assign_device_spans(struct dahdi_device *ddev); |
| 46 |
|
| 47 |
static inline int get_span(struct dahdi_span *span) |
| 48 |
{ |
| 49 |
return try_module_get(span->ops->owner); |
| 50 |
} |
| 51 |
|
| 52 |
static inline void put_span(struct dahdi_span *span) |
| 53 |
{ |
| 54 |
module_put(span->ops->owner); |
| 55 |
} |
| 56 |
|
| 57 |
static inline int local_spanno(struct dahdi_span *span) |
| 58 |
{ |
| 59 |
return span->offset + 1; |
| 60 |
} |
| 61 |
|
| 62 |
#endif |