dahdi: Embed the proc entries in struct dahdi_span.
Part of preparations for replacing the array of spans with a list of spans. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9354 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
5514b84e06
commit
ee7057f87a
@ -151,7 +151,7 @@ EXPORT_SYMBOL(dahdi_unregister_echocan_factory);
|
||||
EXPORT_SYMBOL(dahdi_set_hpec_ioctl);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
static struct proc_dir_entry *proc_entries[DAHDI_MAX_SPANS];
|
||||
static struct proc_dir_entry *root_proc_entry;
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
|
||||
@ -6026,8 +6026,9 @@ int dahdi_register(struct dahdi_span *span, int prefmaster)
|
||||
{
|
||||
char tempfile[17];
|
||||
snprintf(tempfile, sizeof(tempfile), "dahdi/%d", span->spanno);
|
||||
proc_entries[span->spanno] = create_proc_read_entry(tempfile, 0444,
|
||||
NULL, dahdi_proc_read, (int *) (long) span->spanno);
|
||||
span->proc_entry = create_proc_read_entry(tempfile, 0444,
|
||||
NULL, dahdi_proc_read,
|
||||
(int *) (long) span->spanno);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -8729,7 +8730,7 @@ static int __init dahdi_init(void)
|
||||
int res = 0;
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
proc_entries[0] = proc_mkdir("dahdi", NULL);
|
||||
root_proc_entry = proc_mkdir("dahdi", NULL);
|
||||
#endif
|
||||
|
||||
if ((res = register_chrdev(DAHDI_MAJOR, "dahdi", &dahdi_fops))) {
|
||||
|
@ -871,6 +871,10 @@ struct dahdi_span {
|
||||
int watchcounter;
|
||||
int watchstate;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
struct proc_dir_entry *proc_entry;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct dahdi_transcoder_channel {
|
||||
|
Loading…
Reference in New Issue
Block a user