summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
Diffstat (limited to 'zaptel.c')
-rw-r--r--zaptel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/zaptel.c b/zaptel.c
index 606deb1..814cb30 100644
--- a/zaptel.c
+++ b/zaptel.c
@@ -4720,8 +4720,10 @@ int zt_register(struct zt_span *span, int prefmaster)
#ifdef CONFIG_ZAP_UDEV
for (x = 0; x < span->channels; x++) {
char chan_name[50];
- sprintf(chan_name, "zap%d", span->chans[x].channo);
- CLASS_DEV_CREATE(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo), NULL, chan_name);
+ if (span->chans[x].channo < 250) {
+ sprintf(chan_name, "zap%d", span->chans[x].channo);
+ CLASS_DEV_CREATE(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo), NULL, chan_name);
+ }
}
#endif /* CONFIG_ZAP_UDEV */
@@ -4774,7 +4776,8 @@ int zt_unregister(struct zt_span *span)
#ifdef CONFIG_ZAP_UDEV
for (x = 0; x < span->channels; x++) {
- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo));
+ if (span->chans[x].channo < 250)
+ class_device_destroy(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo));
}
#endif /* CONFIG_ZAP_UDEV */