diff options
Diffstat (limited to 'zaptel.c')
-rw-r--r-- | zaptel.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 */ |