diff options
Diffstat (limited to 'drivers/isdn')
56 files changed, 220 insertions, 261 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 23ae66c76d47..24c6b7ca62be 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -350,7 +350,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci) if (ncci == 0xffffffff || np->ncci == ncci) { *pp = (*pp)->next; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE - if ((mp = np->minorp) != 0) { + if ((mp = np->minorp) != NULL) { #if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) capifs_free_ncci(mp->minor); #endif @@ -366,7 +366,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci) } #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ kfree(np); - if (*pp == 0) return; + if (*pp == NULL) return; } else { pp = &(*pp)->next; } @@ -483,7 +483,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb) #endif goto bad; } - if ((nskb = gen_data_b3_resp_for(mp, skb)) == 0) { + if ((nskb = gen_data_b3_resp_for(mp, skb)) == NULL) { printk(KERN_ERR "capi: gen_data_b3_resp failed\n"); goto bad; } @@ -512,7 +512,7 @@ bad: static void handle_minor_recv(struct capiminor *mp) { struct sk_buff *skb; - while ((skb = skb_dequeue(&mp->inqueue)) != 0) { + while ((skb = skb_dequeue(&mp->inqueue)) != NULL) { unsigned int len = skb->len; mp->inbytes -= len; if (handle_recv_skb(mp, skb) < 0) { @@ -538,7 +538,7 @@ static int handle_minor_send(struct capiminor *mp) return 0; } - while ((skb = skb_dequeue(&mp->outqueue)) != 0) { + while ((skb = skb_dequeue(&mp->outqueue)) != NULL) { datahandle = mp->datahandle; len = (u16)skb->len; skb_push(skb, CAPI_DATA_B3_REQ_LEN); @@ -689,19 +689,19 @@ capi_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) if (!cdev->ap.applid) return -ENODEV; - if ((skb = skb_dequeue(&cdev->recvqueue)) == 0) { + if ((skb = skb_dequeue(&cdev->recvqueue)) == NULL) { if (file->f_flags & O_NONBLOCK) return -EAGAIN; for (;;) { interruptible_sleep_on(&cdev->recvwait); - if ((skb = skb_dequeue(&cdev->recvqueue)) != 0) + if ((skb = skb_dequeue(&cdev->recvqueue)) != NULL) break; if (signal_pending(current)) break; } - if (skb == 0) + if (skb == NULL) return -ERESTARTNOHAND; } if (skb->len > count) { @@ -940,12 +940,12 @@ capi_ioctl(struct inode *inode, struct file *file, return -EFAULT; mutex_lock(&cdev->ncci_list_mtx); - if ((nccip = capincci_find(cdev, (u32) ncci)) == 0) { + if ((nccip = capincci_find(cdev, (u32) ncci)) == NULL) { mutex_unlock(&cdev->ncci_list_mtx); return 0; } #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE - if ((mp = nccip->minorp) != 0) { + if ((mp = nccip->minorp) != NULL) { count += atomic_read(&mp->ttyopencount); } #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ @@ -966,7 +966,7 @@ capi_ioctl(struct inode *inode, struct file *file, return -EFAULT; mutex_lock(&cdev->ncci_list_mtx); nccip = capincci_find(cdev, (u32) ncci); - if (!nccip || (mp = nccip->minorp) == 0) { + if (!nccip || (mp = nccip->minorp) == NULL) { mutex_unlock(&cdev->ncci_list_mtx); return -ESRCH; } @@ -986,7 +986,7 @@ capi_open(struct inode *inode, struct file *file) if (file->private_data) return -EEXIST; - if ((file->private_data = capidev_alloc()) == 0) + if ((file->private_data = capidev_alloc()) == NULL) return -ENOMEM; return nonseekable_open(inode, file); @@ -1023,9 +1023,9 @@ static int capinc_tty_open(struct tty_struct * tty, struct file * file) struct capiminor *mp; unsigned long flags; - if ((mp = capiminor_find(iminor(file->f_path.dentry->d_inode))) == 0) + if ((mp = capiminor_find(iminor(file->f_path.dentry->d_inode))) == NULL) return -ENXIO; - if (mp->nccip == 0) + if (mp->nccip == NULL) return -ENXIO; tty->driver_data = (void *)mp; @@ -1058,7 +1058,7 @@ static void capinc_tty_close(struct tty_struct * tty, struct file * file) #ifdef _DEBUG_REFCOUNT printk(KERN_DEBUG "capinc_tty_close ocount=%d\n", atomic_read(&mp->ttyopencount)); #endif - if (mp->nccip == 0) + if (mp->nccip == NULL) capiminor_free(mp); } @@ -1526,9 +1526,9 @@ static int __init capi_init(void) char *compileinfo; int major_ret; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, sizeof(rev)); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index cb42b690b45e..d5b4cc357a3c 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c @@ -335,7 +335,7 @@ static capidrv_plci *new_plci(capidrv_contr * card, int chan) plcip = kzalloc(sizeof(capidrv_plci), GFP_ATOMIC); - if (plcip == 0) + if (plcip == NULL) return NULL; plcip->state = ST_PLCI_NONE; @@ -404,7 +404,7 @@ static inline capidrv_ncci *new_ncci(capidrv_contr * card, nccip = kzalloc(sizeof(capidrv_ncci), GFP_ATOMIC); - if (nccip == 0) + if (nccip == NULL) return NULL; nccip->ncci = ncci; @@ -426,7 +426,7 @@ static inline capidrv_ncci *find_ncci(capidrv_contr * card, u32 ncci) capidrv_plci *plcip; capidrv_ncci *p; - if ((plcip = find_plci_by_ncci(card, ncci)) == 0) + if ((plcip = find_plci_by_ncci(card, ncci)) == NULL) return NULL; for (p = plcip->ncci_list; p; p = p->next) @@ -441,7 +441,7 @@ static inline capidrv_ncci *find_ncci_by_msgid(capidrv_contr * card, capidrv_plci *plcip; capidrv_ncci *p; - if ((plcip = find_plci_by_ncci(card, ncci)) == 0) + if ((plcip = find_plci_by_ncci(card, ncci)) == NULL) return NULL; for (p = plcip->ncci_list; p; p = p->next) @@ -755,7 +755,7 @@ static inline int new_bchan(capidrv_contr * card) { int i; for (i = 0; i < card->nbchan; i++) { - if (card->bchans[i].plcip == 0) { + if (card->bchans[i].plcip == NULL) { card->bchans[i].disconnecting = 0; return i; } @@ -877,7 +877,7 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg) return; } bchan = &card->bchans[chan]; - if ((plcip = new_plci(card, chan)) == 0) { + if ((plcip = new_plci(card, chan)) == NULL) { printk(KERN_ERR "capidrv-%d: incoming call: no memory, sorry.\n", card->contrnr); return; } @@ -1388,12 +1388,12 @@ static void capidrv_recv_message(struct capi20_appl *ap, struct sk_buff *skb) _cdebbuf *cdb = capi_cmsg2str(&s_cmsg); if (cdb) { - printk(KERN_DEBUG "%s: applid=%d %s\n", __FUNCTION__, + printk(KERN_DEBUG "%s: applid=%d %s\n", __func__, ap->applid, cdb->buf); cdebbuf_free(cdb); } else printk(KERN_DEBUG "%s: applid=%d %s not traced\n", - __FUNCTION__, ap->applid, + __func__, ap->applid, capi_cmd2str(s_cmsg.Command, s_cmsg.Subcommand)); } if (s_cmsg.Command == CAPI_DATA_B3 @@ -1661,7 +1661,7 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card) NULL, /* Useruserdata */ NULL /* Facilitydataarray */ ); - if ((plcip = new_plci(card, (c->arg % card->nbchan))) == 0) { + if ((plcip = new_plci(card, (c->arg % card->nbchan))) == NULL) { cmd.command = ISDN_STAT_DHUP; cmd.driver = card->myid; cmd.arg = (c->arg % card->nbchan); @@ -1966,7 +1966,7 @@ static void enable_dchannel_trace(capidrv_contr *card) card->name, errcode); return; } - if (strstr(manufacturer, "AVM") == 0) { + if (strstr(manufacturer, "AVM") == NULL) { printk(KERN_ERR "%s: not from AVM, no d-channel trace possible (%s)\n", card->name, manufacturer); return; @@ -2291,10 +2291,10 @@ static int __init capidrv_init(void) u32 ncontr, contr; u16 errcode; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strncpy(rev, p + 2, sizeof(rev)); rev[sizeof(rev)-1] = 0; - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); @@ -2335,10 +2335,10 @@ static void __exit capidrv_exit(void) char rev[32]; char *p; - if ((p = strchr(revision, ':')) != 0) { + if ((p = strchr(revision, ':')) != NULL) { strncpy(rev, p + 1, sizeof(rev)); rev[sizeof(rev)-1] = 0; - if ((p = strchr(rev, '$')) != 0) + if ((p = strchr(rev, '$')) != NULL) *p = 0; } else { strcpy(rev, " ??? "); diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 6d7c47ec0367..550e80f390a6 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c @@ -69,6 +69,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data) } else if (sscanf(this_char, "mode=%o%c", &n, &dummy) == 1) mode = n & ~S_IFMT; else { + kfree(new_opt); printk("capifs: called with bogus options\n"); return -EINVAL; } @@ -189,9 +190,9 @@ static int __init capifs_init(void) char *p; int err; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, sizeof(rev)); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/capi/capilib.c b/drivers/isdn/capi/capilib.c index 68409d971e73..fcaa1241ee77 100644 --- a/drivers/isdn/capi/capilib.c +++ b/drivers/isdn/capi/capilib.c @@ -4,7 +4,7 @@ #include <linux/isdn/capilli.h> #define DBG(format, arg...) do { \ -printk(KERN_DEBUG "%s: " format "\n" , __FUNCTION__ , ## arg); \ +printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \ } while (0) struct capilib_msgidqueue { @@ -44,7 +44,7 @@ static inline void mq_init(struct capilib_ncci * np) static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid) { struct capilib_msgidqueue *mq; - if ((mq = np->msgidfree) == 0) + if ((mq = np->msgidfree) == NULL) return 0; np->msgidfree = mq->next; mq->msgid = msgid; diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c index 22379b94e88f..ebef4ce1b00c 100644 --- a/drivers/isdn/capi/capiutil.c +++ b/drivers/isdn/capi/capiutil.c @@ -450,7 +450,7 @@ static void pars_2_message(_cmsg * cmsg) cmsg->l += 4; break; case _CSTRUCT: - if (*(u8 **) OFF == 0) { + if (*(u8 **) OFF == NULL) { *(cmsg->m + cmsg->l) = '\0'; cmsg->l++; } else if (**(_cstruct *) OFF != 0xff) { diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index f55531869313..75726ea0fbbd 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c @@ -10,7 +10,7 @@ * */ -#define CONFIG_AVMB1_COMPAT +#define AVMB1_COMPAT #include "kcapi.h" #include <linux/module.h> @@ -29,7 +29,7 @@ #include <asm/uaccess.h> #include <linux/isdn/capicmd.h> #include <linux/isdn/capiutil.h> -#ifdef CONFIG_AVMB1_COMPAT +#ifdef AVMB1_COMPAT #include <linux/b1lli.h> #endif #include <linux/mutex.h> @@ -154,7 +154,7 @@ static void register_appl(struct capi_ctr *card, u16 applid, capi_register_param if (card) card->register_appl(card, applid, rparam); else - printk(KERN_WARNING "%s: cannot get card resources\n", __FUNCTION__); + printk(KERN_WARNING "%s: cannot get card resources\n", __func__); } @@ -178,7 +178,7 @@ static void notify_up(u32 contr) printk(KERN_DEBUG "kcapi: notify up contr %d\n", contr); } if (!card) { - printk(KERN_WARNING "%s: invalid contr %d\n", __FUNCTION__, contr); + printk(KERN_WARNING "%s: invalid contr %d\n", __func__, contr); return; } for (applid = 1; applid <= CAPI_MAXAPPL; applid++) { @@ -740,7 +740,7 @@ u16 capi20_get_profile(u32 contr, struct capi_profile *profp) EXPORT_SYMBOL(capi20_get_profile); -#ifdef CONFIG_AVMB1_COMPAT +#ifdef AVMB1_COMPAT static int old_capi_manufacturer(unsigned int cmd, void __user *data) { avmb1_loadandconfigdef ldef; @@ -826,7 +826,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data) card = capi_ctr_get(card); if (!card) return -ESRCH; - if (card->load_firmware == 0) { + if (card->load_firmware == NULL) { printk(KERN_DEBUG "kcapi: load: no load function\n"); return -ESRCH; } @@ -835,7 +835,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data) printk(KERN_DEBUG "kcapi: load: invalid parameter: length of t4file is %d ?\n", ldef.t4file.len); return -EINVAL; } - if (ldef.t4file.data == 0) { + if (ldef.t4file.data == NULL) { printk(KERN_DEBUG "kcapi: load: invalid parameter: dataptr is 0\n"); return -EINVAL; } @@ -904,7 +904,7 @@ int capi20_manufacturer(unsigned int cmd, void __user *data) struct capi_ctr *card; switch (cmd) { -#ifdef CONFIG_AVMB1_COMPAT +#ifdef AVMB1_COMPAT case AVMB1_LOAD: case AVMB1_LOAD_AND_CONFIG: case AVMB1_RESETCARD: @@ -951,7 +951,7 @@ int capi20_manufacturer(unsigned int cmd, void __user *data) if (strcmp(driver->name, cdef.driver) == 0) break; } - if (driver == 0) { + if (driver == NULL) { printk(KERN_ERR "kcapi: driver \"%s\" not loaded.\n", cdef.driver); return -ESRCH; @@ -1004,9 +1004,9 @@ static int __init kcapi_init(void) return ret; kcapi_proc_init(); - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, sizeof(rev)); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/capi/kcapi.h b/drivers/isdn/capi/kcapi.h index 1cb2c40f9921..244711f7f838 100644 --- a/drivers/isdn/capi/kcapi.h +++ b/drivers/isdn/capi/kcapi.h @@ -17,7 +17,7 @@ #ifdef KCAPI_DEBUG #define DBG(format, arg...) do { \ -printk(KERN_DEBUG "%s: " format "\n" , __FUNCTION__ , ## arg); \ +printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \ } while (0) #else #define DBG(format, arg...) /* */ diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c index 4484a6417235..abf05ec31760 100644 --- a/drivers/isdn/hardware/avm/b1.c +++ b/drivers/isdn/hardware/avm/b1.c @@ -661,11 +661,11 @@ int b1ctl_read_proc(char *page, char **start, off_t off, len += sprintf(page+len, "%-16s %s\n", "type", s); if (card->cardtype == avm_t1isa) len += sprintf(page+len, "%-16s %d\n", "cardnr", card->cardnr); - if ((s = cinfo->version[VER_DRIVER]) != 0) + if ((s = cinfo->version[VER_DRIVER]) != NULL) len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); - if ((s = cinfo->version[VER_CARDTYPE]) != 0) + if ((s = cinfo->version[VER_CARDTYPE]) != NULL) len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); - if ((s = cinfo->version[VER_SERIAL]) != 0) + if ((s = cinfo->version[VER_SERIAL]) != NULL) len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); if (card->cardtype != avm_m1) { @@ -788,9 +788,9 @@ static int __init b1_init(void) char *p; char rev[32]; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, 32); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c index 669f6f67449c..da34b98e3de7 100644 --- a/drivers/isdn/hardware/avm/b1dma.c +++ b/drivers/isdn/hardware/avm/b1dma.c @@ -883,11 +883,11 @@ int b1dmactl_read_proc(char *page, char **start, off_t off, default: s = "???"; break; } len += sprintf(page+len, "%-16s %s\n", "type", s); - if ((s = cinfo->version[VER_DRIVER]) != 0) + if ((s = cinfo->version[VER_DRIVER]) != NULL) len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); - if ((s = cinfo->version[VER_CARDTYPE]) != 0) + if ((s = cinfo->version[VER_CARDTYPE]) != NULL) len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); - if ((s = cinfo->version[VER_SERIAL]) != 0) + if ((s = cinfo->version[VER_SERIAL]) != NULL) len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); if (card->cardtype != avm_m1) { @@ -970,9 +970,9 @@ static int __init b1dma_init(void) char *p; char rev[32]; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, sizeof(rev)); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/hardware/avm/b1isa.c b/drivers/isdn/hardware/avm/b1isa.c index 80fb488848b8..1e288eeb5e2a 100644 --- a/drivers/isdn/hardware/avm/b1isa.c +++ b/drivers/isdn/hardware/avm/b1isa.c @@ -203,9 +203,9 @@ static int __init b1isa_init(void) char rev[32]; int i; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, 32); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c index 90e2e6643d19..5b314a2c4049 100644 --- a/drivers/isdn/hardware/avm/b1pci.c +++ b/drivers/isdn/hardware/avm/b1pci.c @@ -382,9 +382,9 @@ static int __init b1pci_init(void) char rev[32]; int err; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, 32); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/hardware/avm/b1pcmcia.c b/drivers/isdn/hardware/avm/b1pcmcia.c index e479c0aef38d..7740403b40e1 100644 --- a/drivers/isdn/hardware/avm/b1pcmcia.c +++ b/drivers/isdn/hardware/avm/b1pcmcia.c @@ -201,9 +201,9 @@ static int __init b1pcmcia_init(void) char *p; char rev[32]; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, 32); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index 4bbbbe688077..9df1d3f66c87 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c @@ -1088,11 +1088,11 @@ static int c4_read_proc(char *page, char **start, off_t off, default: s = "???"; break; } len += sprintf(page+len, "%-16s %s\n", "type", s); - if ((s = cinfo->version[VER_DRIVER]) != 0) + if ((s = cinfo->version[VER_DRIVER]) != NULL) len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); - if ((s = cinfo->version[VER_CARDTYPE]) != 0) + if ((s = cinfo->version[VER_CARDTYPE]) != NULL) len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); - if ((s = cinfo->version[VER_SERIAL]) != 0) + if ((s = cinfo->version[VER_SERIAL]) != NULL) len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); if (card->cardtype != avm_m1) { @@ -1167,7 +1167,7 @@ static int c4_add_card(struct capicardparams *p, struct pci_dev *dev, } card->mbase = ioremap(card->membase, 128); - if (card->mbase == 0) { + if (card->mbase == NULL) { printk(KERN_NOTICE "c4: can't remap memory at 0x%lx\n", card->membase); retval = -EIO; @@ -1291,9 +1291,9 @@ static int __init c4_init(void) char rev[32]; int err; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, 32); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/hardware/avm/t1isa.c b/drivers/isdn/hardware/avm/t1isa.c index 6130724e46e7..e7724493738c 100644 --- a/drivers/isdn/hardware/avm/t1isa.c +++ b/drivers/isdn/hardware/avm/t1isa.c @@ -551,9 +551,9 @@ static int __init t1isa_init(void) char *p; int i; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, 32); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c index d1e253c94db4..e6d298d75146 100644 --- a/drivers/isdn/hardware/avm/t1pci.c +++ b/drivers/isdn/hardware/avm/t1pci.c @@ -233,9 +233,9 @@ static int __init t1pci_init(void) char rev[32]; int err; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, 32); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0"); diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index 6d39f9360766..5fcbdccd7a53 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c @@ -393,7 +393,7 @@ void diva_free_dma_map(void *hdev, struct _diva_dma_map_entry *pmap) dma_addr_t dma_handle; void *addr_handle; - for (i = 0; (pmap != 0); i++) { + for (i = 0; (pmap != NULL); i++) { diva_get_dma_map_entry(pmap, i, &cpu_addr, &phys_addr); if (!cpu_addr) { break; diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c index 1ff98e7eb794..599fed88222d 100644 --- a/drivers/isdn/hardware/eicon/message.c +++ b/drivers/isdn/hardware/eicon/message.c @@ -742,7 +742,7 @@ static void start_internal_command (dword Id, PLCI *plci, t_std_internal_comma else { i = 1; - while (plci->internal_command_queue[i] != 0) + while (plci->internal_command_queue[i] != NULL) i++; plci->internal_command_queue[i] = command_function; } @@ -758,7 +758,7 @@ static void next_internal_command (dword Id, PLCI *plci) plci->internal_command = 0; plci->internal_command_queue[0] = NULL; - while (plci->internal_command_queue[1] != 0) + while (plci->internal_command_queue[1] != NULL) { for (i = 0; i < MAX_INTERNAL_COMMAND_LEVELS - 1; i++) plci->internal_command_queue[i] = plci->internal_command_queue[i+1]; @@ -9119,7 +9119,7 @@ word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte ho dbug(1,dprintf("AdvSigPlci=0x%x",a->AdvSignalPLCI)); return 0x2001; /* codec in use by another application */ } - if(plci!=0) + if(plci!=NULL) { a->AdvSignalPLCI = plci; plci->tel=ADV_VOICE; @@ -9144,7 +9144,7 @@ word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte ho } /* indicate D-ch connect if */ } /* codec is connected OK */ - if(plci!=0) + if(plci!=NULL) { a->AdvSignalPLCI = plci; plci->tel=ADV_VOICE; @@ -9170,7 +9170,7 @@ word AdvCodecSupport(DIVA_CAPI_ADAPTER *a, PLCI *plci, APPL *appl, byte ho { if(hook_listen) return 0x300B; /* Facility not supported */ /* no hook with SCOM */ - if(plci!=0) plci->tel = CODEC; + if(plci!=NULL) plci->tel = CODEC; dbug(1,dprintf("S/SCOM codec")); /* first time we use the scom-s codec we must shut down the internal */ /* handset application of the card. This can be done by an assign with */ @@ -14604,7 +14604,7 @@ static void channel_xmit_extended_xon (PLCI * plci) { int max_ch = ARRAY_SIZE(a->ch_flow_control); int i, one_requested = 0; - if ((!plci) || (!plci->Id) || ((a = plci->adapter) == 0)) { + if ((!plci) || (!plci->Id) || ((a = plci->adapter) == NULL)) { return; } diff --git a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c index 61e69e9c4aa9..1f879b500d83 100644 --- a/drivers/isdn/hisax/asuscom.c +++ b/drivers/isdn/hisax/asuscom.c @@ -20,8 +20,6 @@ #include "hscx.h" #include "isdnl1.h" -extern const char *CardType[]; - static const char *Asuscom_revision = "$Revision: 1.14.2.4 $"; #define byteout(addr,val) outb(val,addr) @@ -346,7 +344,7 @@ setup_asuscom(struct IsdnCard *card) err = pnp_activate_dev(pnp_d); if (err<0) { printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); + __func__, err); return(0); } card->para[1] = pnp_port_start(pnp_d, 0); @@ -376,8 +374,7 @@ setup_asuscom(struct IsdnCard *card) cs->irq = card->para[0]; if (!request_region(cs->hw.asus.cfg_reg, bytecnt, "asuscom isdn")) { printk(KERN_WARNING - "HiSax: %s config port %x-%x already in use\n", - CardType[card->typ], + "HiSax: ISDNLink config port %x-%x already in use\n", cs->hw.asus.cfg_reg, cs->hw.asus.cfg_reg + bytecnt); return (0); diff --git a/drivers/isdn/hisax/avm_a1.c b/drivers/isdn/hisax/avm_a1.c index d9028e9b9b8f..eb6b432e261f 100644 --- a/drivers/isdn/hisax/avm_a1.c +++ b/drivers/isdn/hisax/avm_a1.c @@ -16,7 +16,6 @@ #include "hscx.h" #include "isdnl1.h" -extern const char *CardType[]; static const char *avm_revision = "$Revision: 2.15.2.4 $"; #define AVM_A1_STAT_ISAC 0x01 @@ -200,16 +199,14 @@ setup_avm_a1(struct IsdnCard *card) cs->irq = card->para[0]; if (!request_region(cs->hw.avm.cfg_reg, 8, "avm cfg")) { printk(KERN_WARNING - "HiSax: %s config port %x-%x already in use\n", - CardType[card->typ], + "HiSax: AVM A1 config port %x-%x already in use\n", cs->hw.avm.cfg_reg, cs->hw.avm.cfg_reg + 8); return (0); } if (!request_region(cs->hw.avm.isac + 32, 32, "HiSax isac")) { printk(KERN_WARNING - "HiSax: %s isac ports %x-%x already in use\n", - CardType[cs->typ], + "HiSax: AVM A1 isac ports %x-%x already in use\n", cs->hw.avm.isac + 32, cs->hw.avm.isac + 64); release_ioregs(cs, 0); @@ -217,16 +214,14 @@ setup_avm_a1(struct IsdnCard *card) } if (!request_region(cs->hw.avm.isacfifo, 1, "HiSax isac fifo")) { printk(KERN_WARNING - "HiSax: %s isac fifo port %x already in use\n", - CardType[cs->typ], + "HiSax: AVM A1 isac fifo port %x already in use\n", cs->hw.avm.isacfifo); release_ioregs(cs, 1); return (0); } if (!request_region(cs->hw.avm.hscx[0] + 32, 32, "HiSax hscx A")) { printk(KERN_WARNING - "HiSax: %s hscx A ports %x-%x already in use\n", - CardType[cs->typ], + "HiSax: AVM A1 hscx A ports %x-%x already in use\n", cs->hw.avm.hscx[0] + 32, cs->hw.avm.hscx[0] + 64); release_ioregs(cs, 3); @@ -234,16 +229,14 @@ setup_avm_a1(struct IsdnCard *card) } if (!request_region(cs->hw.avm.hscxfifo[0], 1, "HiSax hscx A fifo")) { printk(KERN_WARNING - "HiSax: %s hscx A fifo port %x already in use\n", - CardType[cs->typ], + "HiSax: AVM A1 hscx A fifo port %x already in use\n", cs->hw.avm.hscxfifo[0]); release_ioregs(cs, 7); return (0); } if (!request_region(cs->hw.avm.hscx[1] + 32, 32, "HiSax hscx B")) { printk(KERN_WARNING - "HiSax: %s hscx B ports %x-%x already in use\n", - CardType[cs->typ], + "HiSax: AVM A1 hscx B ports %x-%x already in use\n", cs->hw.avm.hscx[1] + 32, cs->hw.avm.hscx[1] + 64); release_ioregs(cs, 0xf); @@ -251,8 +244,7 @@ setup_avm_a1(struct IsdnCard *card) } if (!request_region(cs->hw.avm.hscxfifo[1], 1, "HiSax hscx B fifo")) { printk(KERN_WARNING - "HiSax: %s hscx B fifo port %x already in use\n", - CardType[cs->typ], + "HiSax: AVM A1 hscx B fifo port %x already in use\n", cs->hw.avm.hscxfifo[1]); release_ioregs(cs, 0x1f); return (0); @@ -284,9 +276,8 @@ setup_avm_a1(struct IsdnCard *card) printk(KERN_INFO "AVM A1: Byte at %x is %x\n", cs->hw.avm.cfg_reg, val); - printk(KERN_INFO - "HiSax: %s config irq:%d cfg:0x%X\n", - CardType[cs->typ], cs->irq, + printk(KERN_INFO "HiSax: AVM A1 config irq:%d cfg:0x%X\n", + cs->irq, cs->hw.avm.cfg_reg); printk(KERN_INFO "HiSax: isac:0x%X/0x%X\n", diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c index 0f1db1f669b2..7cabc5a19492 100644 --- a/drivers/isdn/hisax/avm_pci.c +++ b/drivers/isdn/hisax/avm_pci.c @@ -797,7 +797,7 @@ static int __devinit avm_pnp_setup(struct IsdnCardState *cs) err = pnp_activate_dev(pnp_avm_d); if (err<0) { printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); + __func__, err); return(0); } cs->hw.avm.cfg_reg = diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c index 3d1bdc8431ad..9ca2ee54cc94 100644 --- a/drivers/isdn/hisax/bkm_a4t.c +++ b/drivers/isdn/hisax/bkm_a4t.c @@ -20,8 +20,6 @@ #include <linux/pci.h> #include "bkm_ax.h" -extern const char *CardType[]; - static const char *bkm_a4t_revision = "$Revision: 1.22.2.4 $"; @@ -284,15 +282,16 @@ static int __devinit a4t_cs_init(struct IsdnCard *card, I20_REGISTER_FILE *pI20_Regs; if (!cs->irq) { /* IRQ range check ?? */ - printk(KERN_WARNING "HiSax: %s: No IRQ\n", CardType[card->typ]); + printk(KERN_WARNING "HiSax: Telekom A4T: No IRQ\n"); return (0); } cs->hw.ax.base = (long) ioremap(pci_memaddr, 4096); /* Check suspecious address */ pI20_Regs = (I20_REGISTER_FILE *) (cs->hw.ax.base); if ((pI20_Regs->i20IntStatus & 0x8EFFFFFF) != 0) { - printk(KERN_WARNING "HiSax: %s address %lx-%lx suspecious\n", - CardType[card->typ], cs->hw.ax.base, cs->hw.ax.base + 4096); + printk(KERN_WARNING "HiSax: Telekom A4T address " + "%lx-%lx suspicious\n", + cs->hw.ax.base, cs->hw.ax.base + 4096); iounmap((void *) cs->hw.ax.base); cs->hw.ax.base = 0; return (0); @@ -302,8 +301,9 @@ static int __devinit a4t_cs_init(struct IsdnCard *card, cs->hw.ax.isac_ale = GCS_1; cs->hw.ax.jade_ale = GCS_3; - printk(KERN_INFO "HiSax: %s: Card configured at 0x%lX IRQ %d\n", - CardType[card->typ], cs->hw.ax.base, cs->irq); + printk(KERN_INFO "HiSax: Telekom A4T: Card configured at " + "0x%lX IRQ %d\n", + cs->hw.ax.base, cs->irq); setup_isac(cs); cs->readisac = &ReadISAC; @@ -349,11 +349,12 @@ setup_bkm_a4t(struct IsdnCard *card) break; } if (!found) { - printk(KERN_WARNING "HiSax: %s: Card not found\n", CardType[card->typ]); + printk(KERN_WARNING "HiSax: Telekom A4T: Card not found\n"); return (0); } if (!pci_memaddr) { - printk(KERN_WARNING "HiSax: %s: No Memory base address\n", CardType[card->typ]); + printk(KERN_WARNING "HiSax: Telekom A4T: " + "No Memory base address\n"); return (0); } diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c index 99ef3b43fcd7..e1ff4717a8a6 100644 --- a/drivers/isdn/hisax/bkm_a8.c +++ b/drivers/isdn/hisax/bkm_a8.c @@ -22,8 +22,6 @@ #define ATTEMPT_PCI_REMAPPING /* Required for PLX rev 1 */ -extern const char *CardType[]; - static const char sct_quadro_revision[] = "$Revision: 1.22.2.4 $"; static const char *sct_quadro_subtypes[] = @@ -181,8 +179,7 @@ bkm_interrupt_ipac(int intno, void *dev_id) goto Start_IPAC; } if (!icnt) - printk(KERN_WARNING "HiSax: %s (%s) IRQ LOOP\n", - CardType[cs->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s) IRQ LOOP\n", sct_quadro_subtypes[cs->subtyp]); writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xFF); writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xC0); @@ -296,8 +293,8 @@ setup_sct_quadro(struct IsdnCard *card) if (card->para[0] >= SCT_1 && card->para[0] <= SCT_4) cs->subtyp = card->para[0]; else { - printk(KERN_WARNING "HiSax: %s: Invalid subcontroller in configuration, default to 1\n", - CardType[card->typ]); + printk(KERN_WARNING "HiSax: Scitel Quadro: Invalid " + "subcontroller in configuration, default to 1\n"); return (0); } if ((cs->subtyp != SCT_1) && ((sub_sys_id != PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO) || @@ -322,16 +319,16 @@ setup_sct_quadro(struct IsdnCard *card) } } if (!found) { - printk(KERN_WARNING "HiSax: %s (%s): Card not found\n", - CardType[card->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s): " + "Card not found\n", sct_quadro_subtypes[cs->subtyp]); return (0); } #ifdef ATTEMPT_PCI_REMAPPING /* HACK: PLX revision 1 bug: PLX address bit 7 must not be set */ if ((pci_ioaddr1 & 0x80) && (dev_a8->revision == 1)) { - printk(KERN_WARNING "HiSax: %s (%s): PLX rev 1, remapping required!\n", - CardType[card->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s): " + "PLX rev 1, remapping required!\n", sct_quadro_subtypes[cs->subtyp]); /* Restart PCI negotiation */ pci_write_config_dword(dev_a8, PCI_BASE_ADDRESS_1, (u_int) - 1); @@ -344,8 +341,7 @@ setup_sct_quadro(struct IsdnCard *card) #endif /* End HACK */ } if (!pci_irq) { /* IRQ range check ?? */ - printk(KERN_WARNING "HiSax: %s (%s): No IRQ\n", - CardType[card->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s): No IRQ\n", sct_quadro_subtypes[cs->subtyp]); return (0); } @@ -355,8 +351,8 @@ setup_sct_quadro(struct IsdnCard *card) pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_4, &pci_ioaddr4); pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_5, &pci_ioaddr5); if (!pci_ioaddr1 || !pci_ioaddr2 || !pci_ioaddr3 || !pci_ioaddr4 || !pci_ioaddr5) { - printk(KERN_WARNING "HiSax: %s (%s): No IO base address(es)\n", - CardType[card->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s): " + "No IO base address(es)\n", sct_quadro_subtypes[cs->subtyp]); return (0); } @@ -411,8 +407,8 @@ setup_sct_quadro(struct IsdnCard *card) /* For isac and hscx data path */ cs->hw.ax.data_adr = cs->hw.ax.base + 4; - printk(KERN_INFO "HiSax: %s (%s) configured at 0x%.4lX, 0x%.4lX, 0x%.4lX and IRQ %d\n", - CardType[card->typ], + printk(KERN_INFO "HiSax: Scitel Quadro (%s) configured at " + "0x%.4lX, 0x%.4lX, 0x%.4lX and IRQ %d\n", sct_quadro_subtypes[cs->subtyp], cs->hw.ax.plx_adr, cs->hw.ax.base, @@ -432,8 +428,7 @@ setup_sct_quadro(struct IsdnCard *card) cs->cardmsg = &BKM_card_msg; cs->irq_func = &bkm_interrupt_ipac; - printk(KERN_INFO "HiSax: %s (%s): IPAC Version %d\n", - CardType[card->typ], + printk(KERN_INFO "HiSax: Scitel Quadro (%s): IPAC Version %d\n", sct_quadro_subtypes[cs->subtyp], readreg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_ID)); return (1); diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index a0ee43c04dd5..84d75a3f5d17 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c @@ -1169,7 +1169,9 @@ outf_cs: /* Used from an exported function but calls __devinit functions. * Tell modpost not to warn (__ref) */ -static int __ref checkcard(int cardnr, char *id, int *busy_flag, struct module *lockowner) +static int __ref checkcard(int cardnr, char *id, int *busy_flag, + struct module *lockowner, + hisax_setup_func_t card_setup) { int ret; struct IsdnCard *card = cards + cardnr; @@ -1187,7 +1189,7 @@ static int __ref checkcard(int cardnr, char *id, int *busy_flag, struct module * (card->protocol == ISDN_PTYPE_NI1) ? "NI1" : "NONE", cs->iif.id, cs->myid); - ret = hisax_cs_setup_card(card); + ret = card_setup(card); if (!ret) { ll_unload(cs); goto outf_cs; @@ -1241,7 +1243,8 @@ static int HiSax_inithardware(int *busy_flag) else sprintf(ids, "%s%d", id, i); } - if (checkcard(i, ids, busy_flag, THIS_MODULE)) { + if (checkcard(i, ids, busy_flag, THIS_MODULE, + hisax_cs_setup_card)) { foundcards++; i++; } else { @@ -1549,7 +1552,8 @@ int hisax_init_pcmcia(void *pcm_iob, int *busy_flag, struct IsdnCard *card) sprintf(ids, "HiSax%d", nrcards); else sprintf(ids, "HiSax"); - if (!checkcard(nrcards, ids, busy_flag, THIS_MODULE)) + if (!checkcard(nrcards, ids, busy_flag, THIS_MODULE, + hisax_cs_setup_card)) goto error; ret = nrcards; @@ -1595,7 +1599,7 @@ int hisax_register(struct hisax_d_if *hisax_d_if, struct hisax_b_if *b_if[], cards[i].protocol = protocol; sprintf(id, "%s%d", name, i); nrcards++; - retval = checkcard(i, id, NULL, hisax_d_if->owner); + retval = checkcard(i, id, NULL, hisax_d_if->owner, hisax_cs_setup_card); if (retval == 0) { // yuck cards[i].typ = 0; nrcards--; diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c index 2d670856d141..018bd293e580 100644 --- a/drivers/isdn/hisax/diva.c +++ b/drivers/isdn/hisax/diva.c @@ -1088,7 +1088,7 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card) err = pnp_activate_dev(pnp_d); if (err<0) { printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); + __func__, err); return(0); } card->para[1] = pnp_port_start(pnp_d, 0); diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c index d272d8ce6537..aa29d1cf16af 100644 --- a/drivers/isdn/hisax/elsa.c +++ b/drivers/isdn/hisax/elsa.c @@ -299,7 +299,7 @@ elsa_interrupt(int intno, void *dev_id) val = serial_inp(cs, UART_IIR); if (!(val & UART_IIR_NO_INT)) { debugl1(cs,"IIR %02x", val); - rs_interrupt_elsa(intno, cs); + rs_interrupt_elsa(cs); } } #endif @@ -379,7 +379,7 @@ elsa_interrupt_ipac(int intno, void *dev_id) val = serial_inp(cs, UART_IIR); if (!(val & UART_IIR_NO_INT)) { debugl1(cs,"IIR %02x", val); - rs_interrupt_elsa(intno, cs); + rs_interrupt_elsa(cs); } } #endif @@ -937,7 +937,7 @@ setup_elsa_isapnp(struct IsdnCard *card) err = pnp_activate_dev(pnp_d); if (err<0) { printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); + __func__, err); return(0); } card->para[1] = pnp_port_start(pnp_d, 0); diff --git a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c index 1642dca988a1..f181db464392 100644 --- a/drivers/isdn/hisax/elsa_ser.c +++ b/drivers/isdn/hisax/elsa_ser.c @@ -384,13 +384,13 @@ static inline void transmit_chars(struct IsdnCardState *cs, int *intr_done) } -static void rs_interrupt_elsa(int irq, struct IsdnCardState *cs) +static void rs_interrupt_elsa(struct IsdnCardState *cs) { int status, iir, msr; int pass_counter = 0; #ifdef SERIAL_DEBUG_INTR - printk("rs_interrupt_single(%d)...", irq); + printk(KERN_DEBUG "rs_interrupt_single(%d)...", cs->irq); #endif do { diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c index f66620ad8e7c..0ea3b4607680 100644 --- a/drivers/isdn/hisax/gazel.c +++ b/drivers/isdn/hisax/gazel.c @@ -19,7 +19,6 @@ #include "ipac.h" #include <linux/pci.h> -extern const char *CardType[]; static const char *gazel_revision = "$Revision: 2.19.2.4 $"; #define R647 1 @@ -479,8 +478,8 @@ reserve_regions(struct IsdnCard *card, struct IsdnCardState *cs) return 0; error: - printk(KERN_WARNING "Gazel: %s io ports 0x%x-0x%x already in use\n", - CardType[cs->typ], adr, adr + len); + printk(KERN_WARNING "Gazel: io ports 0x%x-0x%x already in use\n", + adr, adr + len); return 1; } diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index fba8b624ffcf..f1265667b062 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c @@ -22,8 +22,6 @@ #include <linux/pci.h> #include <linux/interrupt.h> -extern const char *CardType[]; - static const char *hfcpci_revision = "$Revision: 1.48.2.4 $"; /* table entry in the PCI devices list */ diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c index 05482d2688e3..d92e8d6c2ae2 100644 --- a/drivers/isdn/hisax/hfc_sx.c +++ b/drivers/isdn/hisax/hfc_sx.c @@ -18,8 +18,6 @@ #include <linux/interrupt.h> #include <linux/isapnp.h> -extern const char *CardType[]; - static const char *hfcsx_revision = "$Revision: 1.12.2.5 $"; /***************************************/ @@ -1419,7 +1417,7 @@ setup_hfcsx(struct IsdnCard *card) err = pnp_activate_dev(pnp_d); if (err<0) { printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); + __func__, err); return(0); } card->para[1] = pnp_port_start(pnp_d, 0); diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index 98b0149bca68..8df889b0c1a9 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c @@ -905,7 +905,7 @@ rx_int_complete(struct urb *urb) if (status) { printk(KERN_INFO "HFC-S USB: %s error resubmitting URB fifo(%d)\n", - __FUNCTION__, fifon); + __func__, fifon); } } @@ -1543,14 +1543,14 @@ hfc_usb_disconnect(struct usb_interface *intf) stop_isoc_chain(&context->fifos[i]); DBG(HFCUSB_DBG_INIT, "HFC-S USB: %s stopping ISOC chain Fifo(%i)", - __FUNCTION__, i); + __func__, i); } } else { if (context->fifos[i].active > 0) { context->fifos[i].active = 0; DBG(HFCUSB_DBG_INIT, "HFC-S USB: %s unlinking URB for Fifo(%i)", - __FUNCTION__, i); + __func__, i); } usb_kill_urb(context->fifos[i].urb); usb_free_urb(context->fifos[i].urb); diff --git a/drivers/isdn/hisax/hfcscard.c b/drivers/isdn/hisax/hfcscard.c index 909d6709ec16..cf082665cc8b 100644 --- a/drivers/isdn/hisax/hfcscard.c +++ b/drivers/isdn/hisax/hfcscard.c @@ -193,7 +193,7 @@ setup_hfcs(struct IsdnCard *card) err = pnp_activate_dev(pnp_d); if (err<0) { printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); + __func__, err); return(0); } card->para[1] = pnp_port_start(pnp_d, 0); diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h index 34733c903df7..e8d429fda846 100644 --- a/drivers/isdn/hisax/hisax.h +++ b/drivers/isdn/hisax/hisax.h @@ -925,7 +925,7 @@ struct IsdnCardState { int (*cardmsg) (struct IsdnCardState *, int, void *); void (*setstack_d) (struct PStack *, struct IsdnCardState *); void (*DC_Close) (struct IsdnCardState *); - int (*irq_func) (int, void *); + irq_handler_t irq_func; int (*auxcmd) (struct IsdnCardState *, isdn_ctrl *); struct Channel channel[2+MAX_WAITING_CALLS]; struct BCState bcs[2+MAX_WAITING_CALLS]; diff --git a/drivers/isdn/hisax/hisax_cfg.h b/drivers/isdn/hisax/hisax_cfg.h index ca3fe6259bca..17a2fea64efe 100644 --- a/drivers/isdn/hisax/hisax_cfg.h +++ b/drivers/isdn/hisax/hisax_cfg.h @@ -60,5 +60,7 @@ struct IsdnCard { IsdnCardState_t *cs; }; +typedef int (*hisax_setup_func_t)(struct IsdnCard *card); + extern void HiSax_closecard(int); extern int hisax_init_pcmcia(void *, int *, IsdnCard_t *); diff --git a/drivers/isdn/hisax/hisax_debug.h b/drivers/isdn/hisax/hisax_debug.h index ceafecdb1037..5ed3b1c44184 100644 --- a/drivers/isdn/hisax/hisax_debug.h +++ b/drivers/isdn/hisax/hisax_debug.h @@ -27,14 +27,14 @@ #define DBG(level, format, arg...) do { \ if (level & __debug_variable) \ -printk(KERN_DEBUG "%s: " format "\n" , __FUNCTION__ , ## arg); \ +printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \ } while (0) #define DBG_PACKET(level,data,count) \ - if (level & __debug_variable) dump_packet(__FUNCTION__,data,count) + if (level & __debug_variable) dump_packet(__func__,data,count) #define DBG_SKB(level,skb) \ - if ((level & __debug_variable) && skb) dump_packet(__FUNCTION__,skb->data,skb->len) + if ((level & __debug_variable) && skb) dump_packet(__func__,skb->data,skb->len) static void __attribute__((unused)) diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index 76043dedba5b..c0b4db2f8364 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c @@ -68,7 +68,7 @@ static struct pci_device_id fcpci_ids[] = { MODULE_DEVICE_TABLE(pci, fcpci_ids); -#ifdef __ISAPNP__ +#ifdef CONFIG_PNP static struct pnp_device_id fcpnp_ids[] __devinitdata = { { .id = "AVM0900", @@ -914,7 +914,7 @@ static int __devinit fcpci_probe(struct pci_dev *pdev, return retval; } -#ifdef __ISAPNP__ +#ifdef CONFIG_PNP static int __devinit fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) { struct fritz_adapter *adapter; @@ -935,7 +935,7 @@ static int __devinit fcpnp_probe(struct pnp_dev *pdev, const struct pnp_device_i pnp_disable_dev(pdev); retval = pnp_activate_dev(pdev); if (retval < 0) { - printk(KERN_WARNING "%s: pnp_activate_dev(%s) ret(%d)\n", __FUNCTION__, + printk(KERN_WARNING "%s: pnp_activate_dev(%s) ret(%d)\n", __func__, (char *)dev_id->driver_data, retval); goto err_free; } @@ -974,6 +974,8 @@ static struct pnp_driver fcpnp_driver = { .remove = __devexit_p(fcpnp_remove), .id_table = fcpnp_ids, }; +#else +static struct pnp_driver fcpnp_driver; #endif static void __devexit fcpci_remove(struct pci_dev *pdev) @@ -1001,7 +1003,7 @@ static int __init hisax_fcpcipnp_init(void) retval = pci_register_driver(&fcpci_driver); if (retval) return retval; -#ifdef __ISAPNP__ +#ifdef CONFIG_PNP retval = pnp_register_driver(&fcpnp_driver); if (retval < 0) { pci_unregister_driver(&fcpci_driver); @@ -1013,7 +1015,7 @@ static int __init hisax_fcpcipnp_init(void) static void __exit hisax_fcpcipnp_exit(void) { -#ifdef __ISAPNP__ +#ifdef CONFIG_PNP pnp_unregister_driver(&fcpnp_driver); #endif pci_unregister_driver(&fcpci_driver); diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c index 55de06953540..ca4161798cdf 100644 --- a/drivers/isdn/hisax/isurf.c +++ b/drivers/isdn/hisax/isurf.c @@ -17,8 +17,6 @@ #include "isdnl1.h" #include <linux/isapnp.h> -extern const char *CardType[]; - static const char *ISurf_revision = "$Revision: 1.12.2.4 $"; #define byteout(addr,val) outb(val,addr) @@ -251,22 +249,19 @@ setup_isurf(struct IsdnCard *card) return(0); } #else - printk(KERN_WARNING "HiSax: %s port/mem not set\n", - CardType[card->typ]); + printk(KERN_WARNING "HiSax: Siemens I-Surf port/mem not set\n"); return (0); #endif } if (!request_region(cs->hw.isurf.reset, 1, "isurf isdn")) { printk(KERN_WARNING - "HiSax: %s config port %x already in use\n", - CardType[card->typ], + "HiSax: Siemens I-Surf config port %x already in use\n", cs->hw.isurf.reset); return (0); } if (!request_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE, "isurf iomem")) { - printk(KERN_WARNING - "HiSax: %s memory region %lx-%lx already in use\n", - CardType[card->typ], + printk(KERN_WARNING "HiSax: Siemens I-Surf memory region " + "%lx-%lx already in use\n", cs->hw.isurf.phymem, cs->hw.isurf.phymem + ISURF_IOMEM_SIZE); release_region(cs->hw.isurf.reset, 1); diff --git a/drivers/isdn/hisax/ix1_micro.c b/drivers/isdn/hisax/ix1_micro.c index 252d79de5e5e..a92bf0d2cab2 100644 --- a/drivers/isdn/hisax/ix1_micro.c +++ b/drivers/isdn/hisax/ix1_micro.c @@ -24,7 +24,6 @@ #include "hscx.h" #include "isdnl1.h" -extern const char *CardType[]; static const char *ix1_revision = "$Revision: 2.12.2.4 $"; #define byteout(addr,val) outb(val,addr) @@ -253,7 +252,7 @@ setup_ix1micro(struct IsdnCard *card) err = pnp_activate_dev(pnp_d); if (err<0) { printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); + __func__, err); return(0); } card->para[1] = pnp_port_start(pnp_d, 0); @@ -288,15 +287,15 @@ setup_ix1micro(struct IsdnCard *card) if (cs->hw.ix1.cfg_reg) { if (!request_region(cs->hw.ix1.cfg_reg, 4, "ix1micro cfg")) { printk(KERN_WARNING - "HiSax: %s config port %x-%x already in use\n", - CardType[card->typ], + "HiSax: ITK ix1-micro Rev.2 config port " + "%x-%x already in use\n", cs->hw.ix1.cfg_reg, cs->hw.ix1.cfg_reg + 4); return (0); } } - printk(KERN_INFO "HiSax: %s config irq:%d io:0x%X\n", - CardType[cs->typ], cs->irq, cs->hw.ix1.cfg_reg); + printk(KERN_INFO "HiSax: ITK ix1-micro Rev.2 config irq:%d io:0x%X\n", + cs->irq, cs->hw.ix1.cfg_reg); setup_isac(cs); cs->readisac = &ReadISAC; cs->writeisac = &WriteISAC; diff --git a/drivers/isdn/hisax/mic.c b/drivers/isdn/hisax/mic.c index a81d175d9f64..253943029d25 100644 --- a/drivers/isdn/hisax/mic.c +++ b/drivers/isdn/hisax/mic.c @@ -16,8 +16,6 @@ #include "hscx.h" #include "isdnl1.h" -extern const char *CardType[]; - static const char *mic_revision = "$Revision: 1.12.2.4 $"; #define byteout(addr,val) outb(val,addr) @@ -210,8 +208,7 @@ setup_mic(struct IsdnCard *card) if (!request_region(cs->hw.mic.cfg_reg, bytecnt, "mic isdn")) { printk(KERN_WARNING - "HiSax: %s config port %x-%x already in use\n", - CardType[card->typ], + "HiSax: ith mic config port %x-%x already in use\n", cs->hw.mic.cfg_reg, cs->hw.mic.cfg_reg + bytecnt); return (0); diff --git a/drivers/isdn/hisax/netjet.h b/drivers/isdn/hisax/netjet.h index 4d89d3ea4173..68e504d4ebf9 100644 --- a/drivers/isdn/hisax/netjet.h +++ b/drivers/isdn/hisax/netjet.h @@ -12,8 +12,6 @@ * */ -extern const char *CardType[]; - #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index bd9921128aa8..ef00633e1d2a 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c @@ -21,7 +21,6 @@ #include <linux/pci.h> #include <linux/isapnp.h> -extern const char *CardType[]; static const char *niccy_revision = "$Revision: 1.21.2.4 $"; #define byteout(addr,val) outb(val,addr) @@ -256,7 +255,7 @@ int __devinit setup_niccy(struct IsdnCard *card) err = pnp_activate_dev(pnp_d); if (err < 0) { printk(KERN_WARNING "%s: pnp_activate_dev " - "ret(%d)\n", __FUNCTION__, err); + "ret(%d)\n", __func__, err); return 0; } card->para[1] = pnp_port_start(pnp_d, 0); @@ -284,14 +283,14 @@ int __devinit setup_niccy(struct IsdnCard *card) cs->subtyp = NICCY_PNP; cs->irq = card->para[0]; if (!request_region(cs->hw.niccy.isac, 2, "niccy data")) { - printk(KERN_WARNING "HiSax: %s data port %x-%x " - "already in use\n", CardType[card->typ], + printk(KERN_WARNING "HiSax: NICCY data port %x-%x " + "already in use\n", cs->hw.niccy.isac, cs->hw.niccy.isac + 1); return 0; } if (!request_region(cs->hw.niccy.isac_ale, 2, "niccy addr")) { - printk(KERN_WARNING "HiSax: %s address port %x-%x " - "already in use\n", CardType[card->typ], + printk(KERN_WARNING "HiSax: NICCY address port %x-%x " + "already in use\n", cs->hw.niccy.isac_ale, cs->hw.niccy.isac_ale + 1); release_region(cs->hw.niccy.isac, 2); @@ -339,15 +338,13 @@ int __devinit setup_niccy(struct IsdnCard *card) cs->hw.niccy.hscx_ale = pci_ioaddr + HSCX_PCI_ADDR; if (!request_region(cs->hw.niccy.isac, 4, "niccy")) { printk(KERN_WARNING - "HiSax: %s data port %x-%x already in use\n", - CardType[card->typ], + "HiSax: NICCY data port %x-%x already in use\n", cs->hw.niccy.isac, cs->hw.niccy.isac + 4); return 0; } if (!request_region(cs->hw.niccy.cfg_reg, 0x40, "niccy pci")) { printk(KERN_WARNING - "HiSax: %s pci port %x-%x already in use\n", - CardType[card->typ], + "HiSax: NICCY pci port %x-%x already in use\n", cs->hw.niccy.cfg_reg, cs->hw.niccy.cfg_reg + 0x40); release_region(cs->hw.niccy.isac, 4); @@ -359,8 +356,8 @@ int __devinit setup_niccy(struct IsdnCard *card) return 0; #endif /* CONFIG_PCI_LEGACY */ } - printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n", - CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI", + printk(KERN_INFO "HiSax: NICCY %s config irq:%d data:0x%X ale:0x%X\n", + (cs->subtyp == 1) ? "PnP" : "PCI", cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale); setup_isac(cs); cs->readisac = &ReadISAC; diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c index a895dfed40e5..8d36ccc87d81 100644 --- a/drivers/isdn/hisax/nj_s.c +++ b/drivers/isdn/hisax/nj_s.c @@ -235,8 +235,7 @@ static int __devinit njs_cs_init_rest(struct IsdnCard *card, cs->subtyp ? "TJ320" : "TJ300", cs->hw.njet.base, cs->irq); if (!request_region(cs->hw.njet.base, bytecnt, "netjet-s isdn")) { printk(KERN_WARNING - "HiSax: %s config port %#lx-%#lx already in use\n", - CardType[card->typ], + "HiSax: NETjet-S config port %#lx-%#lx already in use\n", cs->hw.njet.base, cs->hw.njet.base + bytecnt); return (0); diff --git a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c index f017d3816b1d..d306c946ffba 100644 --- a/drivers/isdn/hisax/nj_u.c +++ b/drivers/isdn/hisax/nj_u.c @@ -197,8 +197,8 @@ static int __devinit nju_cs_init_rest(struct IsdnCard *card, cs->hw.njet.base, cs->irq); if (!request_region(cs->hw.njet.base, bytecnt, "netspider-u isdn")) { printk(KERN_WARNING - "HiSax: %s config port %#lx-%#lx already in use\n", - CardType[card->typ], + "HiSax: NETspider-U config port %#lx-%#lx " + "already in use\n", cs->hw.njet.base, cs->hw.njet.base + bytecnt); return (0); diff --git a/drivers/isdn/hisax/s0box.c b/drivers/isdn/hisax/s0box.c index 150ef68b4ae2..16d00b555c8c 100644 --- a/drivers/isdn/hisax/s0box.c +++ b/drivers/isdn/hisax/s0box.c @@ -16,7 +16,6 @@ #include "hscx.h" #include "isdnl1.h" -extern const char *CardType[]; static const char *s0box_revision = "$Revision: 2.6.2.4 $"; static inline void @@ -231,19 +230,15 @@ setup_s0box(struct IsdnCard *card) cs->hw.teles3.hscxfifo[1] = cs->hw.teles3.hscx[1] + 0x3e; cs->irq = card->para[0]; if (!request_region(cs->hw.teles3.cfg_reg,8, "S0Box parallel I/O")) { - printk(KERN_WARNING - "HiSax: %s ports %x-%x already in use\n", - CardType[cs->typ], + printk(KERN_WARNING "HiSax: S0Box ports %x-%x already in use\n", cs->hw.teles3.cfg_reg, cs->hw.teles3.cfg_reg + 7); return 0; } - printk(KERN_INFO - "HiSax: %s config irq:%d isac:0x%x cfg:0x%x\n", - CardType[cs->typ], cs->irq, + printk(KERN_INFO "HiSax: S0Box config irq:%d isac:0x%x cfg:0x%x\n", + cs->irq, cs->hw.teles3.isac, cs->hw.teles3.cfg_reg); - printk(KERN_INFO - "HiSax: hscx A:0x%x hscx B:0x%x\n", + printk(KERN_INFO "HiSax: hscx A:0x%x hscx B:0x%x\n", cs->hw.teles3.hscx[0], cs->hw.teles3.hscx[1]); setup_isac(cs); cs->readisac = &ReadISAC; diff --git a/drivers/isdn/hisax/saphir.c b/drivers/isdn/hisax/saphir.c index c99b16690fb3..b34a81d655b8 100644 --- a/drivers/isdn/hisax/saphir.c +++ b/drivers/isdn/hisax/saphir.c @@ -18,7 +18,6 @@ #include "hscx.h" #include "isdnl1.h" -extern const char *CardType[]; static char *saphir_rev = "$Revision: 1.10.2.4 $"; #define byteout(addr,val) outb(val,addr) @@ -260,15 +259,14 @@ setup_saphir(struct IsdnCard *card) cs->irq = card->para[0]; if (!request_region(cs->hw.saphir.cfg_reg, 6, "saphir")) { printk(KERN_WARNING - "HiSax: %s config port %x-%x already in use\n", - CardType[card->typ], + "HiSax: HST Saphir config port %x-%x already in use\n", cs->hw.saphir.cfg_reg, cs->hw.saphir.cfg_reg + 5); return (0); } - printk(KERN_INFO "HiSax: %s config irq:%d io:0x%X\n", - CardType[cs->typ], cs->irq, cs->hw.saphir.cfg_reg); + printk(KERN_INFO "HiSax: HST Saphir config irq:%d io:0x%X\n", + cs->irq, cs->hw.saphir.cfg_reg); setup_isac(cs); cs->hw.saphir.timer.function = (void *) SaphirWatchDog; diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c index 95425f3d2220..a10dfa82c734 100644 --- a/drivers/isdn/hisax/sedlbauer.c +++ b/drivers/isdn/hisax/sedlbauer.c @@ -555,7 +555,7 @@ setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt) err = pnp_activate_dev(pnp_d); if (err<0) { printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); + __func__, err); return(0); } card->para[1] = pnp_port_start(pnp_d, 0); diff --git a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c index 02209500b3b7..0a53759adfa4 100644 --- a/drivers/isdn/hisax/sportster.c +++ b/drivers/isdn/hisax/sportster.c @@ -18,7 +18,6 @@ #include "hscx.h" #include "isdnl1.h" -extern const char *CardType[]; static const char *sportster_revision = "$Revision: 1.16.2.4 $"; #define byteout(addr,val) outb(val,addr) @@ -192,9 +191,9 @@ get_io_range(struct IsdnCardState *cs) for (i=0;i<64;i++) { adr = cs->hw.spt.cfg_reg + i *1024; if (!request_region(adr, 8, "sportster")) { - printk(KERN_WARNING - "HiSax: %s config port %x-%x already in use\n", - CardType[cs->typ], adr, adr + 8); + printk(KERN_WARNING "HiSax: USR Sportster config port " + "%x-%x already in use\n", + adr, adr + 8); break; } } @@ -247,8 +246,8 @@ setup_sportster(struct IsdnCard *card) printk(KERN_WARNING "Sportster: wrong IRQ\n"); return(0); } - printk(KERN_INFO "HiSax: %s config irq:%d cfg:0x%X\n", - CardType[cs->typ], cs->irq, cs->hw.spt.cfg_reg); + printk(KERN_INFO "HiSax: USR Sportster config irq:%d cfg:0x%X\n", + cs->irq, cs->hw.spt.cfg_reg); setup_isac(cs); cs->readisac = &ReadISAC; cs->writeisac = &WriteISAC; diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h index 04416bad611d..2044e7173ab4 100644 --- a/drivers/isdn/hisax/st5481.h +++ b/drivers/isdn/hisax/st5481.h @@ -218,13 +218,13 @@ enum { #define L1_EVENT_COUNT (EV_TIMER3 + 1) #define ERR(format, arg...) \ -printk(KERN_ERR "%s:%s: " format "\n" , __FILE__, __FUNCTION__ , ## arg) +printk(KERN_ERR "%s:%s: " format "\n" , __FILE__, __func__ , ## arg) #define WARN(format, arg...) \ -printk(KERN_WARNING "%s:%s: " format "\n" , __FILE__, __FUNCTION__ , ## arg) +printk(KERN_WARNING "%s:%s: " format "\n" , __FILE__, __func__ , ## arg) #define INFO(format, arg...) \ -printk(KERN_INFO "%s:%s: " format "\n" , __FILE__, __FUNCTION__ , ## arg) +printk(KERN_INFO "%s:%s: " format "\n" , __FILE__, __func__ , ## arg) #include "isdnhdlc.h" #include "fsm.h" @@ -406,7 +406,7 @@ struct st5481_adapter { /* * Submit an URB with error reporting. This is a macro so - * the __FUNCTION__ returns the caller function name. + * the __func__ returns the caller function name. */ #define SUBMIT_URB(urb, mem_flags) \ ({ \ @@ -470,7 +470,7 @@ extern int st5481_debug; #ifdef CONFIG_HISAX_DEBUG #define DBG_ISO_PACKET(level,urb) \ - if (level & __debug_variable) dump_iso_packet(__FUNCTION__,urb) + if (level & __debug_variable) dump_iso_packet(__func__,urb) static void __attribute__((unused)) dump_iso_packet(const char *name, struct urb *urb) diff --git a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c index 4ada66b8b679..427a8b0520f5 100644 --- a/drivers/isdn/hisax/st5481_usb.c +++ b/drivers/isdn/hisax/st5481_usb.c @@ -342,7 +342,7 @@ void st5481_release_usb(struct st5481_adapter *adapter) usb_kill_urb(intr->urb); kfree(intr->urb->transfer_buffer); usb_free_urb(intr->urb); - ctrl->urb = NULL; + intr->urb = NULL; } /* diff --git a/drivers/isdn/hisax/teleint.c b/drivers/isdn/hisax/teleint.c index 0909662b7458..b0ce4ae45cbf 100644 --- a/drivers/isdn/hisax/teleint.c +++ b/drivers/isdn/hisax/teleint.c @@ -16,8 +16,6 @@ #include "hfc_2bs0.h" #include "isdnl1.h" -extern const char *CardType[]; - static const char *TeleInt_revision = "$Revision: 1.16.2.5 $"; #define byteout(addr,val) outb(val,addr) @@ -286,8 +284,7 @@ setup_TeleInt(struct IsdnCard *card) init_timer(&cs->hw.hfc.timer); if (!request_region(cs->hw.hfc.addr, 2, "TeleInt isdn")) { printk(KERN_WARNING - "HiSax: %s config port %x-%x already in use\n", - CardType[card->typ], + "HiSax: TeleInt config port %x-%x already in use\n", cs->hw.hfc.addr, cs->hw.hfc.addr + 2); return (0); diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c index 6a5e379e0774..5dc9f1a43629 100644 --- a/drivers/isdn/hisax/teles3.c +++ b/drivers/isdn/hisax/teles3.c @@ -301,7 +301,7 @@ setup_teles3(struct IsdnCard *card) err = pnp_activate_dev(pnp_d); if (err<0) { printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); + __func__, err); return(0); } card->para[3] = pnp_port_start(pnp_d, 2); diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c index 4393003ae162..28b08de4673d 100644 --- a/drivers/isdn/hisax/telespci.c +++ b/drivers/isdn/hisax/telespci.c @@ -19,7 +19,6 @@ #include "isdnl1.h" #include <linux/pci.h> -extern const char *CardType[]; static const char *telespci_revision = "$Revision: 2.23.2.3 $"; #define ZORAN_PO_RQ_PEN 0x02000000 @@ -329,8 +328,8 @@ setup_telespci(struct IsdnCard *card) /* writel(0x00800000, cs->hw.teles0.membase + 0x200); */ printk(KERN_INFO - "HiSax: %s config irq:%d mem:%p\n", - CardType[cs->typ], cs->irq, + "HiSax: Teles PCI config irq:%d mem:%p\n", + cs->irq, cs->hw.teles0.membase); setup_isac(cs); diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c index 39129b94f8be..bb1c8dd1a230 100644 --- a/drivers/isdn/hisax/w6692.c +++ b/drivers/isdn/hisax/w6692.c @@ -38,8 +38,6 @@ static const PCI_ENTRY id_list[] = #define W6692_DYNALINK 1 #define W6692_USR 2 -extern const char *CardType[]; - static const char *w6692_revision = "$Revision: 1.18.2.4 $"; #define DBUSY_TIMER_VALUE 80 diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index d4ad6992f776..0f3c66de69bc 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c @@ -1924,7 +1924,7 @@ isdn_free_channel(int di, int ch, int usage) if ((di < 0) || (ch < 0)) { printk(KERN_WARNING "%s: called with invalid drv(%d) or channel(%d)\n", - __FUNCTION__, di, ch); + __func__, di, ch); return; } for (i = 0; i < ISDN_MAX_CHANNELS; i++) diff --git a/drivers/isdn/i4l/isdn_net.h b/drivers/isdn/i4l/isdn_net.h index bc2f0dd962ea..be4949715d55 100644 --- a/drivers/isdn/i4l/isdn_net.h +++ b/drivers/isdn/i4l/isdn_net.h @@ -108,7 +108,7 @@ static __inline__ void isdn_net_add_to_bundle(isdn_net_dev *nd, isdn_net_local * lp = nd->queue; // printk(KERN_DEBUG "%s: lp:%s(%p) nlp:%s(%p) last(%p)\n", -// __FUNCTION__, lp->name, lp, nlp->name, nlp, lp->last); +// __func__, lp->name, lp, nlp->name, nlp, lp->last); nlp->last = lp->last; lp->last->next = nlp; lp->last = nlp; @@ -129,7 +129,7 @@ static __inline__ void isdn_net_rm_from_bundle(isdn_net_local *lp) master_lp = (isdn_net_local *) lp->master->priv; // printk(KERN_DEBUG "%s: lp:%s(%p) mlp:%s(%p) last(%p) next(%p) mndq(%p)\n", -// __FUNCTION__, lp->name, lp, master_lp->name, master_lp, lp->last, lp->next, master_lp->netdev->queue); +// __func__, lp->name, lp, master_lp->name, master_lp, lp->last, lp->next, master_lp->netdev->queue); spin_lock_irqsave(&master_lp->netdev->queue_lock, flags); lp->last->next = lp->next; lp->next->last = lp->last; @@ -141,7 +141,7 @@ static __inline__ void isdn_net_rm_from_bundle(isdn_net_local *lp) } lp->next = lp->last = lp; /* (re)set own pointers */ // printk(KERN_DEBUG "%s: mndq(%p)\n", -// __FUNCTION__, master_lp->netdev->queue); +// __func__, master_lp->netdev->queue); spin_unlock_irqrestore(&master_lp->netdev->queue_lock, flags); } diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 9f5fe372f83d..127cfdad68e7 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c @@ -110,7 +110,7 @@ isdn_ppp_free(isdn_net_local * lp) if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: ppp_slot(%d) out of range\n", - __FUNCTION__, lp->ppp_slot); + __func__, lp->ppp_slot); return 0; } @@ -127,7 +127,7 @@ isdn_ppp_free(isdn_net_local * lp) #endif /* CONFIG_ISDN_MPP */ if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: ppp_slot(%d) now invalid\n", - __FUNCTION__, lp->ppp_slot); + __func__, lp->ppp_slot); return 0; } is = ippp_table[lp->ppp_slot]; @@ -226,7 +226,7 @@ isdn_ppp_wakeup_daemon(isdn_net_local * lp) { if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: ppp_slot(%d) out of range\n", - __FUNCTION__, lp->ppp_slot); + __func__, lp->ppp_slot); return; } ippp_table[lp->ppp_slot]->state = IPPP_OPEN | IPPP_CONNECT | IPPP_NOBLOCK; @@ -245,7 +245,7 @@ isdn_ppp_closewait(int slot) if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: slot(%d) out of range\n", - __FUNCTION__, slot); + __func__, slot); return 0; } is = ippp_table[slot]; @@ -343,7 +343,7 @@ isdn_ppp_release(int min, struct file *file) is = file->private_data; if (!is) { - printk(KERN_ERR "%s: no file->private_data\n", __FUNCTION__); + printk(KERN_ERR "%s: no file->private_data\n", __func__); return; } if (is->debug & 0x1) @@ -353,7 +353,7 @@ isdn_ppp_release(int min, struct file *file) isdn_net_dev *p = is->lp->netdev; if (!p) { - printk(KERN_ERR "%s: no lp->netdev\n", __FUNCTION__); + printk(KERN_ERR "%s: no lp->netdev\n", __func__); return; } is->state &= ~IPPP_CONNECT; /* -> effect: no call of wakeup */ @@ -1080,7 +1080,7 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff printk(KERN_DEBUG "isdn_ppp: VJC_UNCOMP\n"); if (net_dev->local->ppp_slot < 0) { printk(KERN_ERR "%s: net_dev->local->ppp_slot(%d) out of range\n", - __FUNCTION__, net_dev->local->ppp_slot); + __func__, net_dev->local->ppp_slot); goto drop_packet; } if (slhc_remember(ippp_table[net_dev->local->ppp_slot]->slcomp, skb->data, skb->len) <= 0) { @@ -1107,7 +1107,7 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff skb_old->len); if (net_dev->local->ppp_slot < 0) { printk(KERN_ERR "%s: net_dev->local->ppp_slot(%d) out of range\n", - __FUNCTION__, net_dev->local->ppp_slot); + __func__, net_dev->local->ppp_slot); goto drop_packet; } pkt_len = slhc_uncompress(ippp_table[net_dev->local->ppp_slot]->slcomp, @@ -1553,7 +1553,7 @@ static int isdn_ppp_mp_init( isdn_net_local * lp, ippp_bundle * add_to ) if (lp->ppp_slot < 0) { printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", - __FUNCTION__, lp->ppp_slot); + __func__, lp->ppp_slot); return(-EINVAL); } @@ -1604,7 +1604,7 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, slot = lp->ppp_slot; if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: lp->ppp_slot(%d)\n", - __FUNCTION__, lp->ppp_slot); + __func__, lp->ppp_slot); stats->frame_drops++; dev_kfree_skb(skb); spin_unlock_irqrestore(&mp->lock, flags); @@ -1641,7 +1641,7 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, slot = lpq->ppp_slot; if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: lpq->ppp_slot(%d)\n", - __FUNCTION__, lpq->ppp_slot); + __func__, lpq->ppp_slot); } else { u32 lls = ippp_table[slot]->last_link_seqno; if (MP_LT(lls, minseq)) @@ -1875,7 +1875,7 @@ void isdn_ppp_mp_reassembly( isdn_net_dev * net_dev, isdn_net_local * lp, if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", - __FUNCTION__, lp->ppp_slot); + __func__, lp->ppp_slot); return; } if( MP_FLAGS(from) == (MP_BEGIN_FRAG | MP_END_FRAG) ) { @@ -2655,7 +2655,7 @@ static void isdn_ppp_receive_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, lp->ppp_slot); if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", - __FUNCTION__, lp->ppp_slot); + __func__, lp->ppp_slot); return; } is = ippp_table[lp->ppp_slot]; @@ -2665,7 +2665,7 @@ static void isdn_ppp_receive_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, int slot = ((isdn_net_local *) (lp->master->priv))->ppp_slot; if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: slot(%d) out of range\n", - __FUNCTION__, slot); + __func__, slot); return; } mis = ippp_table[slot]; @@ -2829,7 +2829,7 @@ static void isdn_ppp_send_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, struct return; if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", - __FUNCTION__, slot); + __func__, slot); return; } is = ippp_table[slot]; @@ -2852,7 +2852,7 @@ static void isdn_ppp_send_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, struct slot = ((isdn_net_local *) (lp->master->priv))->ppp_slot; if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { printk(KERN_ERR "%s: slot(%d) out of range\n", - __FUNCTION__, slot); + __func__, slot); return; } mis = ippp_table[slot]; diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 133eb18e65cc..8af0df1d5b8c 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c @@ -1347,7 +1347,7 @@ isdn_tty_tiocmget(struct tty_struct *tty, struct file *file) modem_info *info = (modem_info *) tty->driver_data; u_char control, status; - if (isdn_tty_paranoia_check(info, tty->name, __FUNCTION__)) + if (isdn_tty_paranoia_check(info, tty->name, __func__)) return -ENODEV; if (tty->flags & (1 << TTY_IO_ERROR)) return -EIO; @@ -1372,7 +1372,7 @@ isdn_tty_tiocmset(struct tty_struct *tty, struct file *file, { modem_info *info = (modem_info *) tty->driver_data; - if (isdn_tty_paranoia_check(info, tty->name, __FUNCTION__)) + if (isdn_tty_paranoia_check(info, tty->name, __func__)) return -ENODEV; if (tty->flags & (1 << TTY_IO_ERROR)) return -EIO; @@ -1608,7 +1608,7 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp) if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_open")) return -ENODEV; if (!try_module_get(info->owner)) { - printk(KERN_WARNING "%s: cannot reserve module\n", __FUNCTION__); + printk(KERN_WARNING "%s: cannot reserve module\n", __func__); return -ENODEV; } #ifdef ISDN_DEBUG_MODEM_OPEN |