From 3b10699608036b8dfab80e25efe1bee493786413 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 21 May 2008 16:48:35 +0000 Subject: replace zap_ with dahdi_, ZAP_ with DAHDI_ git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4321 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 86 ++++++++++++++++++------------------ drivers/dahdi/dahdi_config.h | 4 +- drivers/dahdi/dahdi_dummy.c | 6 +-- drivers/dahdi/dahdi_dynamic.c | 4 +- drivers/dahdi/dahdi_dynamic_eth.c | 4 +- drivers/dahdi/dahdi_transcode.c | 2 +- drivers/dahdi/hpec/hpec_dahdi.h | 2 +- drivers/dahdi/jpah.h | 2 +- drivers/dahdi/kb1ec.h | 2 +- drivers/dahdi/mg2ec.h | 2 +- drivers/dahdi/pciradio.c | 6 +-- drivers/dahdi/sec-2.h | 2 +- drivers/dahdi/sec.h | 2 +- drivers/dahdi/tor2.c | 10 ++--- drivers/dahdi/wcfxo.c | 8 ++-- drivers/dahdi/wct1xxp.c | 8 ++-- drivers/dahdi/wct4xxp/base.c | 12 ++--- drivers/dahdi/wct4xxp/wct4xxp-diag.c | 2 +- drivers/dahdi/wctc4xxp/base.c | 6 +-- drivers/dahdi/wctdm.c | 8 ++-- drivers/dahdi/wctdm24xxp/base.c | 2 +- drivers/dahdi/wcte11xp.c | 8 ++-- drivers/dahdi/wcte12xp/base.c | 2 +- 23 files changed, 95 insertions(+), 95 deletions(-) (limited to 'drivers/dahdi') diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 2d22e90..4a065a9 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -162,7 +162,7 @@ static devfs_handle_t timer; #endif /* udev necessary data structures. Yeah! */ -#ifdef CONFIG_ZAP_UDEV +#ifdef CONFIG_DAHDI_UDEV #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) #define CLASS_DEV_CREATE(class, devt, device, name) \ @@ -173,16 +173,16 @@ static devfs_handle_t timer; #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) -static struct class *zap_class = NULL; +static struct class *dahdi_class = NULL; #else -static struct class_simple *zap_class = NULL; +static struct class_simple *dahdi_class = NULL; #define class_create class_simple_create #define class_destroy class_simple_destroy #define class_device_create class_simple_device_add #define class_device_destroy(a, b) class_simple_device_remove(b) #endif -#endif /* CONFIG_ZAP_UDEV */ +#endif /* CONFIG_DAHDI_UDEV */ /* There is a table like this in the PPP driver, too */ @@ -1361,7 +1361,7 @@ static devfs_handle_t register_devfs_channel(struct dahdi_chan *chan, devfs_hand /* Set up the path of the file/link itself */ tmp_offset = devfs_generate_path(zaptel_devfs_dir, tmp, sizeof(tmp) - 1); sprintf(buf, "/%d", chan->channo); - zap_copy_string(path, tmp+tmp_offset, sizeof(path)); + dahdi_copy_string(path, tmp+tmp_offset, sizeof(path)); strncat(path, buf, sizeof(path) - 1); err = devfs_mk_symlink(NULL, path, DEVFS_FL_DEFAULT, link+link_offset, &chan->fhandle_symlink, NULL); @@ -2754,7 +2754,7 @@ static int ioctl_load_zone(unsigned long data) ptr += sizeof(*z); space -= sizeof(*z); - zap_copy_string(z->name, th.name, sizeof(z->name)); + dahdi_copy_string(z->name, th.name, sizeof(z->name)); for (x = 0; x < DAHDI_MAX_CADENCE; x++) z->ringcadence[x] = th.ringcadence[x]; @@ -3352,7 +3352,7 @@ static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned in stack.param.pulseaftertime = chan->pulseaftertime; if (chan->span) stack.param.spanno = chan->span->spanno; else stack.param.spanno = 0; - zap_copy_string(stack.param.name, chan->name, sizeof(stack.param.name)); + dahdi_copy_string(stack.param.name, chan->name, sizeof(stack.param.name)); stack.param.chanpos = chan->chanpos; stack.param.sigcap = chan->sigcap; /* Return current law */ @@ -3487,8 +3487,8 @@ static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned in stack.spaninfo.spanno = i; /* put the span # in here */ stack.spaninfo.totalspans = 0; if (maxspans) stack.spaninfo.totalspans = maxspans - 1; /* put total number of spans here */ - zap_copy_string(stack.spaninfo.desc, spans[i]->desc, sizeof(stack.spaninfo.desc)); - zap_copy_string(stack.spaninfo.name, spans[i]->name, sizeof(stack.spaninfo.name)); + dahdi_copy_string(stack.spaninfo.desc, spans[i]->desc, sizeof(stack.spaninfo.desc)); + dahdi_copy_string(stack.spaninfo.name, spans[i]->name, sizeof(stack.spaninfo.name)); stack.spaninfo.alarms = spans[i]->alarms; /* get alarm status */ stack.spaninfo.bpvcount = spans[i]->bpvcount; /* get BPV count */ stack.spaninfo.rxlevel = spans[i]->rxlevel; /* get rx level */ @@ -3510,15 +3510,15 @@ static int dahdi_common_ioctl(struct inode *node, struct file *file, unsigned in /* version 3 fields */ stack.spaninfo.irq = spans[i]->irq; stack.spaninfo.linecompat = spans[i]->linecompat; - zap_copy_string(stack.spaninfo.lboname, dahdi_lboname(spans[i]->lbo), sizeof(stack.spaninfo.lboname)); + dahdi_copy_string(stack.spaninfo.lboname, dahdi_lboname(spans[i]->lbo), sizeof(stack.spaninfo.lboname)); if (spans[i]->manufacturer) - zap_copy_string(stack.spaninfo.manufacturer, spans[i]->manufacturer, + dahdi_copy_string(stack.spaninfo.manufacturer, spans[i]->manufacturer, sizeof(stack.spaninfo.manufacturer)); if (spans[i]->devicetype) - zap_copy_string(stack.spaninfo.devicetype, spans[i]->devicetype, sizeof(stack.spaninfo.devicetype)); - zap_copy_string(stack.spaninfo.location, spans[i]->location, sizeof(stack.spaninfo.location)); + dahdi_copy_string(stack.spaninfo.devicetype, spans[i]->devicetype, sizeof(stack.spaninfo.devicetype)); + dahdi_copy_string(stack.spaninfo.location, spans[i]->location, sizeof(stack.spaninfo.location)); if (spans[i]->spantype) - zap_copy_string(stack.spaninfo.spantype, spans[i]->spantype, sizeof(stack.spaninfo.spantype)); + dahdi_copy_string(stack.spaninfo.spantype, spans[i]->spantype, sizeof(stack.spaninfo.spantype)); if (copy_to_user((struct dahdi_spaninfo *) data, &stack.spaninfo, size_to_copy)) return -EFAULT; @@ -3999,7 +3999,7 @@ static int dahdi_ctl_ioctl(struct inode *inode, struct file *file, unsigned int struct dahdi_versioninfo vi; memset(&vi, 0, sizeof(vi)); - zap_copy_string(vi.version, ZAPTEL_VERSION, sizeof(vi.version)); + dahdi_copy_string(vi.version, ZAPTEL_VERSION, sizeof(vi.version)); echo_can_identify(vi.echo_canceller, sizeof(vi.echo_canceller) - 1); if (copy_to_user((struct dahdi_versioninfo *) data, &vi, sizeof(vi))) return -EFAULT; @@ -4114,7 +4114,7 @@ static int ioctl_dahdi_dial(struct dahdi_chan *chan, unsigned long data) rv = -EBUSY; break; } - zap_copy_string(chan->txdialbuf + strlen(chan->txdialbuf), tdo->dialstr, DAHDI_MAX_DTMF_BUF - strlen(chan->txdialbuf)); + dahdi_copy_string(chan->txdialbuf + strlen(chan->txdialbuf), tdo->dialstr, DAHDI_MAX_DTMF_BUF - strlen(chan->txdialbuf)); if (!chan->dialing) { chan->dialing = 1; __do_dtmf(chan); @@ -5223,15 +5223,15 @@ int dahdi_register(struct dahdi_span *span, int prefmaster) } #endif /* CONFIG_DEVFS_FS */ -#ifdef CONFIG_ZAP_UDEV +#ifdef CONFIG_DAHDI_UDEV for (x = 0; x < span->channels; x++) { char chan_name[50]; if (span->chans[x].channo < 250) { sprintf(chan_name, "zap%d", span->chans[x].channo); - CLASS_DEV_CREATE(zap_class, MKDEV(DAHDI_MAJOR, span->chans[x].channo), NULL, chan_name); + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, span->chans[x].channo), NULL, chan_name); } } -#endif /* CONFIG_ZAP_UDEV */ +#endif /* CONFIG_DAHDI_UDEV */ if (debug) printk("Registered Span %d ('%s') with %d channels\n", span->spanno, span->name, span->channels); @@ -5280,12 +5280,12 @@ int dahdi_unregister(struct dahdi_span *span) devfs_unregister(span->dhandle); #endif /* CONFIG_DEVFS_FS */ -#ifdef CONFIG_ZAP_UDEV +#ifdef CONFIG_DAHDI_UDEV for (x = 0; x < span->channels; x++) { if (span->chans[x].channo < 250) - class_device_destroy(zap_class, MKDEV(DAHDI_MAJOR, span->chans[x].channo)); + class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, span->chans[x].channo)); } -#endif /* CONFIG_ZAP_UDEV */ +#endif /* CONFIG_DAHDI_UDEV */ spans[span->spanno] = NULL; span->spanno = 0; @@ -6930,7 +6930,7 @@ out in the later versions, and is put back now. */ skb_reset_mac_header(skb); #endif skb->dev = ztchan_to_dev(ms); -#ifdef ZAP_HDLC_TYPE_TRANS +#ifdef DAHDI_HDLC_TYPE_TRANS skb->protocol = hdlc_type_trans(skb, ztchan_to_dev(ms)); #else skb->protocol = htons (ETH_P_HDLC); @@ -7686,13 +7686,13 @@ int dahdi_register_chardev(struct dahdi_chardev *dev) umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO; #endif /* CONFIG_DEVFS_FS */ -#ifdef CONFIG_ZAP_UDEV +#ifdef CONFIG_DAHDI_UDEV char udevname[strlen(dev->name) + 3]; strcpy(udevname, "zap"); strcat(udevname, dev->name); - CLASS_DEV_CREATE(zap_class, MKDEV(DAHDI_MAJOR, dev->minor), NULL, udevname); -#endif /* CONFIG_ZAP_UDEV */ + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, dev->minor), NULL, udevname); +#endif /* CONFIG_DAHDI_UDEV */ #ifdef CONFIG_DEVFS_FS dev->devfs_handle = devfs_register(zaptel_devfs_dir, dev->name, DEVFS_FL_DEFAULT, DAHDI_MAJOR, dev->minor, mode, &dahdi_fops, NULL); @@ -7703,9 +7703,9 @@ int dahdi_register_chardev(struct dahdi_chardev *dev) int dahdi_unregister_chardev(struct dahdi_chardev *dev) { -#ifdef CONFIG_ZAP_UDEV - class_device_destroy(zap_class, MKDEV(DAHDI_MAJOR, dev->minor)); -#endif /* CONFIG_ZAP_UDEV */ +#ifdef CONFIG_DAHDI_UDEV + class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, dev->minor)); +#endif /* CONFIG_DAHDI_UDEV */ #ifdef CONFIG_DEVFS_FS devfs_unregister(dev->devfs_handle); @@ -7721,13 +7721,13 @@ static int __init dahdi_init(void) { proc_entries[0] = proc_mkdir("zaptel", NULL); #endif -#ifdef CONFIG_ZAP_UDEV /* udev support functions */ - zap_class = class_create(THIS_MODULE, "zaptel"); - CLASS_DEV_CREATE(zap_class, MKDEV(DAHDI_MAJOR, 253), NULL, "zaptimer"); - CLASS_DEV_CREATE(zap_class, MKDEV(DAHDI_MAJOR, 254), NULL, "zapchannel"); - CLASS_DEV_CREATE(zap_class, MKDEV(DAHDI_MAJOR, 255), NULL, "zappseudo"); - CLASS_DEV_CREATE(zap_class, MKDEV(DAHDI_MAJOR, 0), NULL, "zapctl"); -#endif /* CONFIG_ZAP_UDEV */ +#ifdef CONFIG_DAHDI_UDEV /* udev support functions */ + dahdi_class = class_create(THIS_MODULE, "zaptel"); + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 253), NULL, "zaptimer"); + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 254), NULL, "zapchannel"); + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 255), NULL, "zappseudo"); + CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 0), NULL, "zapctl"); +#endif /* CONFIG_DAHDI_UDEV */ #ifdef CONFIG_DEVFS_FS { @@ -7782,13 +7782,13 @@ static void __exit dahdi_cleanup(void) { devfs_unregister(zaptel_devfs_dir); devfs_unregister_chrdev(DAHDI_MAJOR, "zaptel"); #else -#ifdef CONFIG_ZAP_UDEV - class_device_destroy(zap_class, MKDEV(DAHDI_MAJOR, 253)); /* timer */ - class_device_destroy(zap_class, MKDEV(DAHDI_MAJOR, 254)); /* channel */ - class_device_destroy(zap_class, MKDEV(DAHDI_MAJOR, 255)); /* pseudo */ - class_device_destroy(zap_class, MKDEV(DAHDI_MAJOR, 0)); /* ctl */ - class_destroy(zap_class); -#endif /* CONFIG_ZAP_UDEV */ +#ifdef CONFIG_DAHDI_UDEV + class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 253)); /* timer */ + class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 254)); /* channel */ + class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 255)); /* pseudo */ + class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 0)); /* ctl */ + class_destroy(dahdi_class); +#endif /* CONFIG_DAHDI_UDEV */ unregister_chrdev(DAHDI_MAJOR, "zaptel"); #endif #ifdef CONFIG_ZAPTEL_WATCHDOG diff --git a/drivers/dahdi/dahdi_config.h b/drivers/dahdi/dahdi_config.h index 35056e3..84f8d21 100644 --- a/drivers/dahdi/dahdi_config.h +++ b/drivers/dahdi/dahdi_config.h @@ -89,7 +89,7 @@ /* udev support */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,1) -#define CONFIG_ZAP_UDEV +#define CONFIG_DAHDI_UDEV #endif /* We now use the linux kernel config to detect which options to use */ @@ -102,7 +102,7 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23) /* Starting with 2.4.23 the kernel hdlc api changed again */ /* Now we have to use hdlc_type_trans(skb, dev) instead of htons(ETH_P_HDLC) */ -#define ZAP_HDLC_TYPE_TRANS +#define DAHDI_HDLC_TYPE_TRANS #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,3) #define HDLC_MAINTAINERS_ARE_MORE_STUPID_THAN_I_THOUGHT diff --git a/drivers/dahdi/dahdi_dummy.c b/drivers/dahdi/dahdi_dummy.c index 046da79..3e83721 100644 --- a/drivers/dahdi/dahdi_dummy.c +++ b/drivers/dahdi/dahdi_dummy.c @@ -390,7 +390,7 @@ static int ztdummy_initialize(struct ztdummy *ztd) sprintf(ztd->span.name, "ZTDUMMY/1"); snprintf(ztd->span.desc, sizeof(ztd->span.desc) - 1, "%s (source: " CLOCK_SRC ") %d", ztd->span.name, 1); sprintf(ztd->chan.name, "ZTDUMMY/%d/%d", 1, 0); - zap_copy_string(ztd->span.devicetype, "Zaptel Dummy Timing Driver", sizeof(ztd->span.devicetype)); + dahdi_copy_string(ztd->span.devicetype, "Zaptel Dummy Timing Driver", sizeof(ztd->span.devicetype)); ztd->chan.chanpos = 1; ztd->span.chans = &ztd->chan; ztd->span.channels = 0; /* no channels on our span */ @@ -483,13 +483,13 @@ int init_module(void) irq=s->irq; spin_lock_irq(&mylock); free_irq(s->irq, s); /* remove uhci_interrupt temporaly */ - if (request_irq (irq, ztdummy_interrupt, ZAP_IRQ_SHARED, "ztdummy", ztd)) { + if (request_irq (irq, ztdummy_interrupt, DAHDI_IRQ_SHARED, "ztdummy", ztd)) { spin_unlock_irq(&mylock); err("Our request_irq %d failed!",irq); kfree(ztd); return -EIO; } /* we add our handler first, to assure, that our handler gets called first */ - if (request_irq (irq, uhci_interrupt, ZAP_IRQ_SHARED, s->uhci_pci->driver->name, s)) { + if (request_irq (irq, uhci_interrupt, DAHDI_IRQ_SHARED, s->uhci_pci->driver->name, s)) { spin_unlock_irq(&mylock); err("Original request_irq %d failed!",irq); } diff --git a/drivers/dahdi/dahdi_dynamic.c b/drivers/dahdi/dahdi_dynamic.c index 6daa052..2fa8a61 100644 --- a/drivers/dahdi/dahdi_dynamic.c +++ b/drivers/dahdi/dahdi_dynamic.c @@ -610,8 +610,8 @@ static int create_dynamic(DAHDI_DYNAMIC_SPAN *zds) memset(z->msgbuf, 0, bufsize); /* Setup parameters properly assuming we're going to be okay. */ - zap_copy_string(z->dname, zds->driver, sizeof(z->dname)); - zap_copy_string(z->addr, zds->addr, sizeof(z->addr)); + dahdi_copy_string(z->dname, zds->driver, sizeof(z->dname)); + dahdi_copy_string(z->addr, zds->addr, sizeof(z->addr)); z->timing = zds->timing; sprintf(z->span.name, "ZTD/%s/%s", zds->driver, zds->addr); sprintf(z->span.desc, "Dynamic '%s' span at '%s'", zds->driver, zds->addr); diff --git a/drivers/dahdi/dahdi_dynamic_eth.c b/drivers/dahdi/dahdi_dynamic_eth.c index 5c2851f..e840904 100644 --- a/drivers/dahdi/dahdi_dynamic_eth.c +++ b/drivers/dahdi/dahdi_dynamic_eth.c @@ -314,12 +314,12 @@ static void *ztdeth_create(struct dahdi_span *span, char *addr) memset(z, 0, sizeof(struct ztdeth)); /* Address should be /[/subaddr] */ - zap_copy_string(tmp, addr, sizeof(tmp)); + dahdi_copy_string(tmp, addr, sizeof(tmp)); tmp2 = strchr(tmp, '/'); if (tmp2) { *tmp2 = '\0'; tmp2++; - zap_copy_string(z->ethdev, tmp, sizeof(z->ethdev)); + dahdi_copy_string(z->ethdev, tmp, sizeof(z->ethdev)); } else { printk("Invalid TDMoE address (no device) '%s'\n", addr); kfree(z); diff --git a/drivers/dahdi/dahdi_transcode.c b/drivers/dahdi/dahdi_transcode.c index d21d89a..d6c27bb 100644 --- a/drivers/dahdi/dahdi_transcode.c +++ b/drivers/dahdi/dahdi_transcode.c @@ -313,7 +313,7 @@ static int dahdi_tc_getinfo(unsigned long data) if (!tc) return -ENOSYS; - zap_copy_string(info.name, tc->name, sizeof(info.name)); + dahdi_copy_string(info.name, tc->name, sizeof(info.name)); info.numchannels = tc->numchannels; info.srcfmts = tc->srcfmts; info.dstfmts = tc->dstfmts; diff --git a/drivers/dahdi/hpec/hpec_dahdi.h b/drivers/dahdi/hpec/hpec_dahdi.h index 3eddbf2..9a98b1a 100644 --- a/drivers/dahdi/hpec/hpec_dahdi.h +++ b/drivers/dahdi/hpec/hpec_dahdi.h @@ -67,7 +67,7 @@ static void echo_can_init(void) static void echo_can_identify(char *buf, size_t len) { - zap_copy_string(buf, "HPEC", len); + dahdi_copy_string(buf, "HPEC", len); } static void echo_can_shutdown(void) diff --git a/drivers/dahdi/jpah.h b/drivers/dahdi/jpah.h index fb661ed..d52f1cf 100644 --- a/drivers/dahdi/jpah.h +++ b/drivers/dahdi/jpah.h @@ -49,7 +49,7 @@ static void echo_can_init(void) static void echo_can_identify(char *buf, size_t len) { - zap_copy_string(buf, "JP1", len); + dahdi_copy_string(buf, "JP1", len); } static void echo_can_shutdown(void) diff --git a/drivers/dahdi/kb1ec.h b/drivers/dahdi/kb1ec.h index caeefbd..936090b 100644 --- a/drivers/dahdi/kb1ec.h +++ b/drivers/dahdi/kb1ec.h @@ -140,7 +140,7 @@ static void echo_can_init(void) static void echo_can_identify(char *buf, size_t len) { - zap_copy_string(buf, "KB1", len); + dahdi_copy_string(buf, "KB1", len); } static void echo_can_shutdown(void) diff --git a/drivers/dahdi/mg2ec.h b/drivers/dahdi/mg2ec.h index fce1d03..7d61090 100644 --- a/drivers/dahdi/mg2ec.h +++ b/drivers/dahdi/mg2ec.h @@ -166,7 +166,7 @@ static void echo_can_init(void) static void echo_can_identify(char *buf, size_t len) { - zap_copy_string(buf, "MG2", len); + dahdi_copy_string(buf, "MG2", len); } static void echo_can_shutdown(void) diff --git a/drivers/dahdi/pciradio.c b/drivers/dahdi/pciradio.c index 82c8a39..1abb3d3 100644 --- a/drivers/dahdi/pciradio.c +++ b/drivers/dahdi/pciradio.c @@ -739,7 +739,7 @@ static void pciradio_interrupt(int irq, void *dev_id, struct pt_regs *regs) #endif #endif -ZAP_IRQ_HANDLER(pciradio_interrupt) +DAHDI_IRQ_HANDLER(pciradio_interrupt) { struct pciradio *rad = dev_id; unsigned char ints,byte1,byte2,gotcor,gotctcss,gotslowctcss,ctcss; @@ -1814,7 +1814,7 @@ static int __devinit pciradio_init_one(struct pci_dev *pdev, const struct pci_de } - if (request_irq(pdev->irq, pciradio_interrupt, ZAP_IRQ_SHARED, "pciradio", rad)) { + if (request_irq(pdev->irq, pciradio_interrupt, DAHDI_IRQ_SHARED, "pciradio", rad)) { printk("pciradio: Unable to request IRQ %d\n", pdev->irq); if (rad->freeregion) release_region(rad->ioaddr, 0xff); @@ -1905,7 +1905,7 @@ static int __init pciradio_init(void) { int res; - res = zap_pci_module(&pciradio_driver); + res = dahdi_pci_module(&pciradio_driver); if (res) return -ENODEV; return 0; diff --git a/drivers/dahdi/sec-2.h b/drivers/dahdi/sec-2.h index 1759606..6a70e3c 100644 --- a/drivers/dahdi/sec-2.h +++ b/drivers/dahdi/sec-2.h @@ -107,7 +107,7 @@ static void echo_can_init(void) static void echo_can_identify(char *buf, size_t len) { - zap_copy_string(buf, "STEVE2", len); + dahdi_copy_string(buf, "STEVE2", len); } static void echo_can_shutdown(void) diff --git a/drivers/dahdi/sec.h b/drivers/dahdi/sec.h index f15b681..62213ec 100644 --- a/drivers/dahdi/sec.h +++ b/drivers/dahdi/sec.h @@ -107,7 +107,7 @@ static void echo_can_init(void) static void echo_can_identify(char *buf, size_t len) { - zap_copy_string(buf, "STEVE", len); + dahdi_copy_string(buf, "STEVE", len); } static void echo_can_shutdown(void) diff --git a/drivers/dahdi/tor2.c b/drivers/dahdi/tor2.c index 2863363..85345f4 100644 --- a/drivers/dahdi/tor2.c +++ b/drivers/dahdi/tor2.c @@ -186,7 +186,7 @@ static int tor2_shutdown(struct dahdi_span *span); static int tor2_rbsbits(struct dahdi_chan *chan, int bits); static int tor2_maint(struct dahdi_span *span, int cmd); static int tor2_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long data); -ZAP_IRQ_HANDLER(tor2_intr); +DAHDI_IRQ_HANDLER(tor2_intr); /* translations of data channels for 24 channels in a 32 bit PCM highway */ unsigned datxlt_t1[] = { @@ -274,7 +274,7 @@ static void init_spans(struct tor2 *tor) "Tormenta 2 (PCI) Quad %s Card %d Span %d", (tor->cardtype == TYPE_T1) ? "T1" : "E1", tor->num, x + 1); tor->spans[x].manufacturer = "Digium"; - zap_copy_string(tor->spans[x].devicetype, tor->type, sizeof(tor->spans[x].devicetype)); + dahdi_copy_string(tor->spans[x].devicetype, tor->type, sizeof(tor->spans[x].devicetype)); snprintf(tor->spans[x].location, sizeof(tor->spans[x].location) - 1, "PCI Bus %02d Slot %02d", tor->pci->bus->number, PCI_SLOT(tor->pci->devfn) + 1); tor->spans[x].spanconfig = tor2_spanconfig; @@ -533,7 +533,7 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id for (x = 0; x < 256; x++) tor->mem32[x] = 0x7f7f7f7f; - if (request_irq(tor->irq, tor2_intr, ZAP_IRQ_SHARED_DISABLED, "tor2", tor)) { + if (request_irq(tor->irq, tor2_intr, DAHDI_IRQ_SHARED_DISABLED, "tor2", tor)) { printk(KERN_ERR "Unable to request tormenta IRQ %d\n", tor->irq); goto err_out_release_all; } @@ -639,7 +639,7 @@ static struct pci_driver tor2_driver = { static int __init tor2_init(void) { int res; - res = zap_pci_module(&tor2_driver); + res = dahdi_pci_module(&tor2_driver); printk("Registered Tormenta2 PCI\n"); return res; } @@ -1180,7 +1180,7 @@ found: return 0; } -ZAP_IRQ_HANDLER(tor2_intr) +DAHDI_IRQ_HANDLER(tor2_intr) { int n, i, j, k, syncsrc; unsigned int rxword,txword; diff --git a/drivers/dahdi/wcfxo.c b/drivers/dahdi/wcfxo.c index d9b23a6..d08f658 100644 --- a/drivers/dahdi/wcfxo.c +++ b/drivers/dahdi/wcfxo.c @@ -431,7 +431,7 @@ static void wcfxo_tasklet(unsigned long data) static void wcfxo_stop_dma(struct wcfxo *wc); static void wcfxo_restart_dma(struct wcfxo *wc); -ZAP_IRQ_HANDLER(wcfxo_interrupt) +DAHDI_IRQ_HANDLER(wcfxo_interrupt) { struct wcfxo *wc = dev_id; unsigned char ints; @@ -665,7 +665,7 @@ static int wcfxo_initialize(struct wcfxo *wc) snprintf(wc->span.location, sizeof(wc->span.location) - 1, "PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1); wc->span.manufacturer = "Digium"; - zap_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); + dahdi_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); wc->chan.sigcap = DAHDI_SIG_FXSKS | DAHDI_SIG_FXSLS | DAHDI_SIG_SF; wc->chan.chanpos = 1; wc->span.chans = &wc->chan; @@ -961,7 +961,7 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic /* Keep track of which device we are */ pci_set_drvdata(pdev, wc); - if (request_irq(pdev->irq, wcfxo_interrupt, ZAP_IRQ_SHARED, "wcfxo", wc)) { + if (request_irq(pdev->irq, wcfxo_interrupt, DAHDI_IRQ_SHARED, "wcfxo", wc)) { printk("wcfxo: Unable to request IRQ %d\n", pdev->irq); if (wc->freeregion) release_region(wc->ioaddr, 0xff); @@ -1068,7 +1068,7 @@ static int __init wcfxo_init(void) printk("%d: %s\n", x, fxo_modes[x].name); return -ENODEV; } - res = zap_pci_module(&wcfxo_driver); + res = dahdi_pci_module(&wcfxo_driver); if (res) return -ENODEV; return 0; diff --git a/drivers/dahdi/wct1xxp.c b/drivers/dahdi/wct1xxp.c index fdd2f3f..f2aedc1 100644 --- a/drivers/dahdi/wct1xxp.c +++ b/drivers/dahdi/wct1xxp.c @@ -760,7 +760,7 @@ static int t1xxp_software_init(struct t1xxp *wc) sprintf(wc->span.name, "WCT1/%d", wc->num); snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Card %d", wc->variety, wc->num); wc->span.manufacturer = "Digium"; - zap_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); + dahdi_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); snprintf(wc->span.location, sizeof(wc->span.location) - 1, "PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1); wc->span.spanconfig = t1xxp_spanconfig; @@ -1150,7 +1150,7 @@ static void t1xxp_do_counters(struct t1xxp *wc) spin_unlock_irqrestore(&wc->lock, flags); } -ZAP_IRQ_HANDLER(t1xxp_interrupt) +DAHDI_IRQ_HANDLER(t1xxp_interrupt) { struct t1xxp *wc = dev_id; unsigned char ints; @@ -1321,7 +1321,7 @@ static int __devinit t1xxp_init_one(struct pci_dev *pdev, const struct pci_devic /* Keep track of which device we are */ pci_set_drvdata(pdev, wc); - if (request_irq(pdev->irq, t1xxp_interrupt, ZAP_IRQ_SHARED_DISABLED, "t1xxp", wc)) { + if (request_irq(pdev->irq, t1xxp_interrupt, DAHDI_IRQ_SHARED_DISABLED, "t1xxp", wc)) { printk("t1xxp: Unable to request IRQ %d\n", pdev->irq); kfree(wc); return -EIO; @@ -1410,7 +1410,7 @@ static struct pci_driver t1xxp_driver = { static int __init t1xxp_init(void) { int res; - res = zap_pci_module(&t1xxp_driver); + res = dahdi_pci_module(&t1xxp_driver); if (res) return -ENODEV; return 0; diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 7608f73..23b4b0b 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -1561,7 +1561,7 @@ static void init_spans(struct t4 *wc) snprintf(ts->span.desc, sizeof(ts->span.desc) - 1, "T%dXXP (PCI) Card %d Span %d", wc->numspans, wc->num, x+1); ts->span.manufacturer = "Digium"; - zap_copy_string(ts->span.devicetype, wc->variety, sizeof(ts->span.devicetype)); + dahdi_copy_string(ts->span.devicetype, wc->variety, sizeof(ts->span.devicetype)); if (wc->vpm == T4_VPM_PRESENT) { if (!wc->vpm450m) strncat(ts->span.devicetype, " with VPM400M", sizeof(ts->span.devicetype) - 1); @@ -2784,7 +2784,7 @@ static inline void t4_framer_interrupt(struct t4 *wc, int span) } #ifdef SUPPORT_GEN1 -ZAP_IRQ_HANDLER(t4_interrupt) +DAHDI_IRQ_HANDLER(t4_interrupt) { struct t4 *wc = dev_id; unsigned long flags; @@ -2901,7 +2901,7 @@ static void t4_isr_bh(unsigned long data) #endif } -ZAP_IRQ_HANDLER(t4_interrupt_gen2) +DAHDI_IRQ_HANDLER(t4_interrupt_gen2) { struct t4 *wc = dev_id; unsigned int status; @@ -3660,14 +3660,14 @@ static int __devinit t4_init_one(struct pci_dev *pdev, const struct pci_device_i #ifdef SUPPORT_GEN1 - if (request_irq(pdev->irq, (dt->flags & FLAG_2NDGEN) ? t4_interrupt_gen2 :t4_interrupt, ZAP_IRQ_SHARED_DISABLED, (wc->numspans == 2) ? "wct2xxp" : "wct4xxp", wc)) + if (request_irq(pdev->irq, (dt->flags & FLAG_2NDGEN) ? t4_interrupt_gen2 :t4_interrupt, DAHDI_IRQ_SHARED_DISABLED, (wc->numspans == 2) ? "wct2xxp" : "wct4xxp", wc)) #else if (!(wc->tspans[0]->spanflags & FLAG_2NDGEN)) { printk("This driver does not support 1st gen modules\n"); kfree(wc); return -ENODEV; } - if (request_irq(pdev->irq, t4_interrupt_gen2, ZAP_IRQ_SHARED_DISABLED, "t4xxp", wc)) + if (request_irq(pdev->irq, t4_interrupt_gen2, DAHDI_IRQ_SHARED_DISABLED, "t4xxp", wc)) #endif { printk("t4xxp: Unable to request IRQ %d\n", pdev->irq); @@ -3834,7 +3834,7 @@ static struct pci_driver t4_driver = { static int __init t4_init(void) { int res; - res = zap_pci_module(&t4_driver); + res = dahdi_pci_module(&t4_driver); if (res) return -ENODEV; return 0; diff --git a/drivers/dahdi/wct4xxp/wct4xxp-diag.c b/drivers/dahdi/wct4xxp/wct4xxp-diag.c index 3616f17..2019066 100644 --- a/drivers/dahdi/wct4xxp/wct4xxp-diag.c +++ b/drivers/dahdi/wct4xxp/wct4xxp-diag.c @@ -379,7 +379,7 @@ int main(int argc, char *argv[]) exit(1); } if (*(argv[1]) == '/') - zap_copy_string(fn, argv[1], sizeof(fn)); + dahdi_copy_string(fn, argv[1], sizeof(fn)); else snprintf(fn, sizeof(fn), "/dev/zap/%d", atoi(argv[1])); fd = open(fn, O_RDWR); diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c index 8ad84f2..37bdfa2 100644 --- a/drivers/dahdi/wctc4xxp/base.c +++ b/drivers/dahdi/wctc4xxp/base.c @@ -1182,7 +1182,7 @@ static void dte_wque_run(void *work_data) transmit_demand(wc); } -ZAP_IRQ_HANDLER(wcdte_interrupt) +DAHDI_IRQ_HANDLER(wcdte_interrupt) { struct wcdte *wc = dev_id; unsigned int ints; @@ -1837,7 +1837,7 @@ static int __devinit wcdte_init_one(struct pci_dev *pdev, const struct pci_devic /* Keep track of which device we are */ pci_set_drvdata(pdev, wc); - if (request_irq(pdev->irq, wcdte_interrupt, ZAP_IRQ_SHARED, "tc400b", wc)) { + if (request_irq(pdev->irq, wcdte_interrupt, DAHDI_IRQ_SHARED, "tc400b", wc)) { printk("wcdte error: Unable to request IRQ %d\n", pdev->irq); if (wc->freeregion) release_region(wc->iobase, 0xff); @@ -1999,7 +1999,7 @@ int ztdte_init(void) { int res; - res = zap_pci_module(&wcdte_driver); + res = dahdi_pci_module(&wcdte_driver); if (res) return -ENODEV; return 0; diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c index aa38945..e14eb73 100644 --- a/drivers/dahdi/wctdm.c +++ b/drivers/dahdi/wctdm.c @@ -1003,7 +1003,7 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card) wc->mod[card].fxs.lastrxhook = hook; } -ZAP_IRQ_HANDLER(wctdm_interrupt) +DAHDI_IRQ_HANDLER(wctdm_interrupt) { struct wctdm *wc = dev_id; unsigned char ints; @@ -2042,7 +2042,7 @@ static int wctdm_initialize(struct wctdm *wc) snprintf(wc->span.location, sizeof(wc->span.location) - 1, "PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1); wc->span.manufacturer = "Digium"; - zap_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); + dahdi_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); if (alawoverride) { printk("ALAW override parameter detected. Device will be operating in ALAW\n"); wc->span.deflaw = DAHDI_LAW_ALAW; @@ -2332,7 +2332,7 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic /* Keep track of which device we are */ pci_set_drvdata(pdev, wc); - if (request_irq(pdev->irq, wctdm_interrupt, ZAP_IRQ_SHARED, "wctdm", wc)) { + if (request_irq(pdev->irq, wctdm_interrupt, DAHDI_IRQ_SHARED, "wctdm", wc)) { printk("wctdm: Unable to request IRQ %d\n", pdev->irq); if (wc->freeregion) release_region(wc->ioaddr, 0xff); @@ -2492,7 +2492,7 @@ static int __init wctdm_init(void) battthresh = fxo_modes[_opermode].battthresh; } - res = zap_pci_module(&wctdm_driver); + res = dahdi_pci_module(&wctdm_driver); if (res) return -ENODEV; return 0; diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index b9c63fa..9cd3ae4 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -3981,7 +3981,7 @@ static int __init wctdm_init(void) battthresh = fxo_modes[_opermode].battthresh; } - res = zap_pci_module(&wctdm_driver); + res = dahdi_pci_module(&wctdm_driver); if (res) return -ENODEV; return 0; diff --git a/drivers/dahdi/wcte11xp.c b/drivers/dahdi/wcte11xp.c index 430d80a..ca7a9c2 100644 --- a/drivers/dahdi/wcte11xp.c +++ b/drivers/dahdi/wcte11xp.c @@ -975,7 +975,7 @@ static int t1xxp_software_init(struct t1 *wc) sprintf(wc->span.name, "WCT1/%d", wc->num); snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Card %d", wc->variety, wc->num); wc->span.manufacturer = "Digium"; - zap_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); + dahdi_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); snprintf(wc->span.location, sizeof(wc->span.location) - 1, "PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1); wc->span.spanconfig = t1xxp_spanconfig; @@ -1324,7 +1324,7 @@ static void t1_do_counters(struct t1 *wc) spin_unlock_irqrestore(&wc->lock, flags); } -ZAP_IRQ_HANDLER(t1xxp_interrupt) +DAHDI_IRQ_HANDLER(t1xxp_interrupt) { struct t1 *wc = dev_id; unsigned char ints; @@ -1522,7 +1522,7 @@ static int __devinit t1xxp_init_one(struct pci_dev *pdev, const struct pci_devic /* Keep track of which device we are */ pci_set_drvdata(pdev, wc); - if (request_irq(pdev->irq, t1xxp_interrupt, ZAP_IRQ_SHARED_DISABLED, "wcte11xp", wc)) { + if (request_irq(pdev->irq, t1xxp_interrupt, DAHDI_IRQ_SHARED_DISABLED, "wcte11xp", wc)) { printk("wcte11xp: Unable to request IRQ %d\n", pdev->irq); kfree(wc); return -EIO; @@ -1609,7 +1609,7 @@ static struct pci_driver t1xxp_driver = { static int __init t1xxp_init(void) { int res; - res = zap_pci_module(&t1xxp_driver); + res = dahdi_pci_module(&t1xxp_driver); if (res) return -ENODEV; return 0; diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 0a4e9b2..1bff18a 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -1717,7 +1717,7 @@ static int __init te12xp_init(void) { int res; - res = zap_pci_module(&te12xp_driver); + res = dahdi_pci_module(&te12xp_driver); return res ? -ENODEV : 0; } -- cgit v1.2.3