diff options
Diffstat (limited to 'drivers/isdn')
25 files changed, 170 insertions, 176 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 669f76393b5a..11844bbfe933 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -1298,7 +1298,7 @@ static int capinc_tty_read_proc(char *page, char **start, off_t off, static struct tty_driver *capinc_tty_driver; -static struct tty_operations capinc_ops = { +static const struct tty_operations capinc_ops = { .open = capinc_tty_open, .close = capinc_tty_close, .write = capinc_tty_write, diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 9ea6bd0ddc35..2dd1b57b0ba4 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c @@ -104,7 +104,6 @@ capifs_fill_super(struct super_block *s, void *data, int silent) inode->i_ino = 1; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_blocks = 0; - inode->i_blksize = 1024; inode->i_uid = inode->i_gid = 0; inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; inode->i_op = &simple_dir_inode_operations; @@ -149,7 +148,6 @@ void capifs_new_ncci(unsigned int number, dev_t device) if (!inode) return; inode->i_ino = number+2; - inode->i_blksize = 1024; inode->i_uid = config.setuid ? config.uid : current->fsuid; inode->i_gid = config.setgid ? config.gid : current->fsgid; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 3845defd4901..5cfbe6a38010 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c @@ -192,7 +192,7 @@ static char *get_usb_statmsg(int status) return "bit stuffing error, timeout, or unknown USB error"; case -EILSEQ: return "CRC mismatch, timeout, or unknown USB error"; - case -ETIMEDOUT: + case -ETIME: return "timed out"; case -EPIPE: return "endpoint stalled"; diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index bd2e4267528e..596f3aebe2f7 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c @@ -134,7 +134,7 @@ static int if_tiocmset(struct tty_struct *tty, struct file *file, static int if_write(struct tty_struct *tty, const unsigned char *buf, int count); -static struct tty_operations if_ops = { +static const struct tty_operations if_ops = { .open = if_open, .close = if_close, .ioctl = if_ioctl, diff --git a/drivers/isdn/gigaset/proc.c b/drivers/isdn/gigaset/proc.c index 9ae3a7f3e7b3..9ad840e95dbe 100644 --- a/drivers/isdn/gigaset/proc.c +++ b/drivers/isdn/gigaset/proc.c @@ -83,5 +83,6 @@ void gigaset_init_dev_sysfs(struct cardstate *cs) return; gig_dbg(DEBUG_INIT, "setting up sysfs"); - class_device_create_file(cs->class, &class_device_attr_cidmode); + if (class_device_create_file(cs->class, &class_device_attr_cidmode)) + dev_err(cs->dev, "could not create sysfs attribute\n"); } diff --git a/drivers/isdn/hardware/eicon/Kconfig b/drivers/isdn/hardware/eicon/Kconfig index 51e66bc64208..01d4afd9d843 100644 --- a/drivers/isdn/hardware/eicon/Kconfig +++ b/drivers/isdn/hardware/eicon/Kconfig @@ -47,7 +47,7 @@ config ISDN_DIVAS_MAINT tristate "DIVA Maint driver support" depends on ISDN_DIVAS && m help - Enable Divas Maintainance driver. + Enable Divas Maintenance driver. endmenu diff --git a/drivers/isdn/hardware/eicon/dsp_defs.h b/drivers/isdn/hardware/eicon/dsp_defs.h index b44950e06f32..fec1e381a688 100644 --- a/drivers/isdn/hardware/eicon/dsp_defs.h +++ b/drivers/isdn/hardware/eicon/dsp_defs.h @@ -34,9 +34,6 @@ * * I/O functions returns -1 on error, 0 on EOF */ -#define OS_SEEK_SET 0 -#define OS_SEEK_CUR 1 -#define OS_SEEK_END 2 struct _OsFileHandle_; typedef long ( * OsFileIo) (struct _OsFileHandle_ *handle, void *buffer, diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig index 6dfc94122dd9..eb57a988e048 100644 --- a/drivers/isdn/hisax/Kconfig +++ b/drivers/isdn/hisax/Kconfig @@ -321,7 +321,7 @@ config HISAX_HFC_PCI help This enables HiSax support for the HFC-S PCI 2BDS0 based cards. - For more informations see under + For more information see under <file:Documentation/isdn/README.hfc-pci>. config HISAX_W6692 diff --git a/drivers/isdn/hisax/amd7930_fn.h b/drivers/isdn/hisax/amd7930_fn.h index e039c3a0f2a2..1f4d80c5e5a6 100644 --- a/drivers/isdn/hisax/amd7930_fn.h +++ b/drivers/isdn/hisax/amd7930_fn.h @@ -1,4 +1,4 @@ -/* 2001/10/02 +/* drivers/isdn/hisax/amd7930_fn.h * * gerdes_amd7930.h Header-file included by * gerdes_amd7930.c diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index e10350360f2f..e4823ab2b127 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c @@ -1721,11 +1721,11 @@ static void hisax_b_l1l2(struct hisax_if *ifc, int pr, void *arg) hisax_b_sched_event(bcs, B_RCVBUFREADY); break; case PH_DATA | CONFIRM: - bcs->tx_cnt -= (int) arg; + bcs->tx_cnt -= (long)arg; if (test_bit(FLG_LLI_L1WAKEUP,&bcs->st->lli.flag)) { u_long flags; spin_lock_irqsave(&bcs->aclock, flags); - bcs->ackcnt += (int) arg; + bcs->ackcnt += (long)arg; spin_unlock_irqrestore(&bcs->aclock, flags); schedule_event(bcs, B_ACKPENDING); } @@ -1789,7 +1789,7 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg) switch (pr) { case PH_ACTIVATE | REQUEST: - B_L2L1(b_if, pr, (void *) st->l1.mode); + B_L2L1(b_if, pr, (void *)(unsigned long)st->l1.mode); break; case PH_DATA | REQUEST: case PH_PULL | INDICATION: diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c index 3a5ca8a68fc4..0ca5e66d2f5a 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/drivers/isdn/hisax/hfc4s8s_l1.c @@ -424,7 +424,7 @@ bch_l2l1(struct hisax_if *ifc, int pr, void *arg) struct hfc4s8s_btype *bch = ifc->priv; struct hfc4s8s_l1 *l1 = bch->l1p; struct sk_buff *skb = (struct sk_buff *) arg; - int mode = (int) arg; + long mode = (long) arg; u_long flags; switch (pr) { @@ -914,7 +914,7 @@ tx_d_frame(struct hfc4s8s_l1 *l1p) struct sk_buff *skb; u_char f1, f2; u_char *cp; - int cnt; + long cnt; if (l1p->l1_state != 7) return; @@ -980,7 +980,8 @@ tx_b_frame(struct hfc4s8s_btype *bch) struct sk_buff *skb; struct hfc4s8s_l1 *l1 = bch->l1p; u_char *cp; - int cnt, max, hdlc_num, ack_len = 0; + int cnt, max, hdlc_num; + long ack_len = 0; if (!l1->enabled || (bch->mode == L1_MODE_NULL)) return; diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c index f27c1608a3a7..b7e8e23be337 100644 --- a/drivers/isdn/hisax/hfc_sx.c +++ b/drivers/isdn/hisax/hfc_sx.c @@ -970,7 +970,7 @@ HFCSX_l1hw(struct PStack *st, int pr, void *arg) break; case (HW_TESTLOOP | REQUEST): spin_lock_irqsave(&cs->lock, flags); - switch ((int) arg) { + switch ((long) arg) { case (1): Write_hfc(cs, HFCSX_B1_SSL, 0x80); /* tx slot */ Write_hfc(cs, HFCSX_B1_RSL, 0x80); /* rx slot */ @@ -986,7 +986,7 @@ HFCSX_l1hw(struct PStack *st, int pr, void *arg) default: spin_unlock_irqrestore(&cs->lock, flags); if (cs->debug & L1_DEB_WARN) - debugl1(cs, "hfcsx_l1hw loop invalid %4x", (int) arg); + debugl1(cs, "hfcsx_l1hw loop invalid %4lx", arg); return; } cs->hw.hfcsx.trm |= 0x80; /* enable IOM-loop */ diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index b5e571a52694..6b88ecb5047d 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c @@ -696,7 +696,7 @@ tx_iso_complete(struct urb *urb, struct pt_regs *regs) fifo->delete_flg = TRUE; fifo->hif->l1l2(fifo->hif, PH_DATA | CONFIRM, - (void *) fifo->skbuff-> + (void *) (unsigned long) fifo->skbuff-> truesize); if (fifo->skbuff && fifo->delete_flg) { dev_kfree_skb_any(fifo->skbuff); @@ -1144,7 +1144,7 @@ hfc_usb_l2l1(struct hisax_if *my_hisax_if, int pr, void *arg) set_hfcmode(hfc, (fifo->fifonum == HFCUSB_B1_TX) ? 0 : 1, - (int) arg); + (long) arg); fifo->hif->l1l2(fifo->hif, PH_ACTIVATE | INDICATION, NULL); diff --git a/drivers/isdn/hisax/hfc_usb.h b/drivers/isdn/hisax/hfc_usb.h index ec52c1a7c22a..6349367ed480 100644 --- a/drivers/isdn/hisax/hfc_usb.h +++ b/drivers/isdn/hisax/hfc_usb.h @@ -137,11 +137,11 @@ static struct hfcusb_symbolic_list urb_errlist[] = { {-ENXIO, "URB already queued"}, {-EFBIG, "Too much ISO frames requested"}, {-ENOSR, "Buffer error (overrun)"}, - {-EPIPE, "Specified endpoint is stalled (device not responding)"}, + {-EPIPE, "Specified endpoint is stalled"}, {-EOVERFLOW, "Babble (bad cable?)"}, {-EPROTO, "Bit-stuff error (bad cable?)"}, - {-EILSEQ, "CRC/Timeout"}, - {-ETIMEDOUT, "NAK (device does not respond)"}, + {-EILSEQ, "CRC or missing token"}, + {-ETIME, "Device did not respond"}, {-ESHUTDOWN, "Device unplugged"}, {-1, NULL} }; diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h index 75920aa0a3c5..2f9d5118ceaf 100644 --- a/drivers/isdn/hisax/hisax.h +++ b/drivers/isdn/hisax/hisax.h @@ -1316,7 +1316,18 @@ void dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir); void iecpy(u_char * dest, u_char * iestart, int ieoffset); #endif /* __KERNEL__ */ -#define HZDELAY(jiffs) {int tout = jiffs; while (tout--) udelay(1000000/HZ);} +/* + * Busywait delay for `jiffs' jiffies + */ +#define HZDELAY(jiffs) do { \ + int tout = jiffs; \ + \ + while (tout--) { \ + int loops = USEC_PER_SEC / HZ; \ + while (loops--) \ + udelay(1); \ + } \ + } while (0) int ll_run(struct IsdnCardState *cs, int addfeatures); int CallcNew(void); diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index 1d7cf3bd6aa3..881a4165cfb4 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c @@ -546,7 +546,7 @@ static inline void hdlc_xpr_irq(struct fritz_bcs *bcs) } bcs->tx_cnt = 0; bcs->tx_skb = NULL; - B_L1L2(bcs, PH_DATA | CONFIRM, (void *) skb->truesize); + B_L1L2(bcs, PH_DATA | CONFIRM, (void *)(unsigned long)skb->truesize); dev_kfree_skb_irq(skb); } @@ -635,7 +635,7 @@ static void fritz_b_l2l1(struct hisax_if *ifc, int pr, void *arg) hdlc_fill_fifo(bcs); break; case PH_ACTIVATE | REQUEST: - mode = (int) arg; + mode = (long) arg; DBG(4,"B%d,PH_ACTIVATE_REQUEST %d", bcs->channel + 1, mode); modehdlc(bcs, mode); B_L1L2(bcs, PH_ACTIVATE | INDICATION, NULL); @@ -998,18 +998,15 @@ static int __init hisax_fcpcipnp_init(void) retval = pci_register_driver(&fcpci_driver); if (retval) - goto out; + return retval; #ifdef __ISAPNP__ retval = pnp_register_driver(&fcpnp_driver); - if (retval < 0) - goto out_unregister_pci; + if (retval < 0) { + pci_unregister_driver(&fcpci_driver); + return retval; + } #endif return 0; - - out_unregister_pci: - pci_unregister_driver(&fcpci_driver); - out: - return retval; } static void __exit hisax_fcpcipnp_exit(void) diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index 489022bdef7b..0945336c28da 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c @@ -13,7 +13,6 @@ * */ - #include <linux/init.h> #include "hisax.h" #include "isac.h" @@ -45,33 +44,31 @@ static const char *niccy_revision = "$Revision: 1.21.2.4 $"; #define PCI_IRQ_DISABLE 0xff0000 #define PCI_IRQ_ASSERT 0x800000 -static inline u_char -readreg(unsigned int ale, unsigned int adr, u_char off) +static inline u_char readreg(unsigned int ale, unsigned int adr, u_char off) { register u_char ret; byteout(ale, off); ret = bytein(adr); - return (ret); + return ret; } -static inline void -readfifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) +static inline void readfifo(unsigned int ale, unsigned int adr, u_char off, + u_char *data, int size) { byteout(ale, off); insb(adr, data, size); } - -static inline void -writereg(unsigned int ale, unsigned int adr, u_char off, u_char data) +static inline void writereg(unsigned int ale, unsigned int adr, u_char off, + u_char data) { byteout(ale, off); byteout(adr, data); } -static inline void -writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int size) +static inline void writefifo(unsigned int ale, unsigned int adr, u_char off, + u_char *data, int size) { byteout(ale, off); outsb(adr, data, size); @@ -79,39 +76,34 @@ writefifo(unsigned int ale, unsigned int adr, u_char off, u_char * data, int siz /* Interface functions */ -static u_char -ReadISAC(struct IsdnCardState *cs, u_char offset) +static u_char ReadISAC(struct IsdnCardState *cs, u_char offset) { - return (readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset)); + return readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset); } -static void -WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) +static void WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) { writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, offset, value); } -static void -ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) +static void ReadISACfifo(struct IsdnCardState *cs, u_char * data, int size) { readfifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size); } -static void -WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) +static void WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size) { writefifo(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, 0, data, size); } -static u_char -ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset) +static u_char ReadHSCX(struct IsdnCardState *cs, int hscx, u_char offset) { - return (readreg(cs->hw.niccy.hscx_ale, - cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0))); + return readreg(cs->hw.niccy.hscx_ale, + cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0)); } -static void -WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value) +static void WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, + u_char value) { writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, offset + (hscx ? 0x40 : 0), value); @@ -130,8 +122,8 @@ WriteHSCX(struct IsdnCardState *cs, int hscx, u_char offset, u_char value) #include "hscx_irq.c" -static irqreturn_t -niccy_interrupt(int intno, void *dev_id, struct pt_regs *regs) +static irqreturn_t niccy_interrupt(int intno, void *dev_id, + struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; u_char val; @@ -141,21 +133,23 @@ niccy_interrupt(int intno, void *dev_id, struct pt_regs *regs) if (cs->subtyp == NICCY_PCI) { int ival; ival = inl(cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); - if (!(ival & PCI_IRQ_ASSERT)) { /* IRQ not for us (shared) */ + if (!(ival & PCI_IRQ_ASSERT)) { /* IRQ not for us (shared) */ spin_unlock_irqrestore(&cs->lock, flags); return IRQ_NONE; } outl(ival, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); } - val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_ISTA + 0x40); - Start_HSCX: + val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, + HSCX_ISTA + 0x40); +Start_HSCX: if (val) hscx_int_main(cs, val); val = readreg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_ISTA); - Start_ISAC: +Start_ISAC: if (val) isac_interrupt(cs, val); - val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_ISTA + 0x40); + val = readreg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, + HSCX_ISTA + 0x40); if (val) { if (cs->debug & L1_DEB_HSCX) debugl1(cs, "HSCX IntStat after IntRoutine"); @@ -168,21 +162,21 @@ niccy_interrupt(int intno, void *dev_id, struct pt_regs *regs) goto Start_ISAC; } writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0xFF); - writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40, 0xFF); + writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40, + 0xFF); writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0xFF); writereg(cs->hw.niccy.isac_ale, cs->hw.niccy.isac, ISAC_MASK, 0); writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK, 0); - writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40, 0); + writereg(cs->hw.niccy.hscx_ale, cs->hw.niccy.hscx, HSCX_MASK + 0x40,0); spin_unlock_irqrestore(&cs->lock, flags); return IRQ_HANDLED; } -static void -release_io_niccy(struct IsdnCardState *cs) +static void release_io_niccy(struct IsdnCardState *cs) { if (cs->subtyp == NICCY_PCI) { int val; - + val = inl(cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); val &= PCI_IRQ_DISABLE; outl(val, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG); @@ -194,8 +188,7 @@ release_io_niccy(struct IsdnCardState *cs) } } -static void -niccy_reset(struct IsdnCardState *cs) +static void niccy_reset(struct IsdnCardState *cs) { if (cs->subtyp == NICCY_PCI) { int val; @@ -207,29 +200,28 @@ niccy_reset(struct IsdnCardState *cs) inithscxisac(cs, 3); } -static int -niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg) +static int niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg) { u_long flags; switch (mt) { - case CARD_RESET: - spin_lock_irqsave(&cs->lock, flags); - niccy_reset(cs); - spin_unlock_irqrestore(&cs->lock, flags); - return(0); - case CARD_RELEASE: - release_io_niccy(cs); - return(0); - case CARD_INIT: - spin_lock_irqsave(&cs->lock, flags); - niccy_reset(cs); - spin_unlock_irqrestore(&cs->lock, flags); - return(0); - case CARD_TEST: - return(0); + case CARD_RESET: + spin_lock_irqsave(&cs->lock, flags); + niccy_reset(cs); + spin_unlock_irqrestore(&cs->lock, flags); + return 0; + case CARD_RELEASE: + release_io_niccy(cs); + return 0; + case CARD_INIT: + spin_lock_irqsave(&cs->lock, flags); + niccy_reset(cs); + spin_unlock_irqrestore(&cs->lock, flags); + return 0; + case CARD_TEST: + return 0; } - return(0); + return 0; } static struct pci_dev *niccy_dev __devinitdata = NULL; @@ -237,8 +229,7 @@ static struct pci_dev *niccy_dev __devinitdata = NULL; static struct pnp_card *pnp_c __devinitdata = NULL; #endif -int __devinit -setup_niccy(struct IsdnCard *card) +int __devinit setup_niccy(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; char tmp[64]; @@ -246,40 +237,44 @@ setup_niccy(struct IsdnCard *card) strcpy(tmp, niccy_revision); printk(KERN_INFO "HiSax: Niccy driver Rev. %s\n", HiSax_getrev(tmp)); if (cs->typ != ISDN_CTYPE_NICCY) - return (0); + return 0; #ifdef __ISAPNP__ if (!card->para[1] && isapnp_present()) { struct pnp_dev *pnp_d = NULL; int err; - if ((pnp_c = pnp_find_card( - ISAPNP_VENDOR('S', 'D', 'A'), - ISAPNP_FUNCTION(0x0150), pnp_c))) { - if (!(pnp_d = pnp_find_dev(pnp_c, - ISAPNP_VENDOR('S', 'D', 'A'), - ISAPNP_FUNCTION(0x0150), pnp_d))) { - printk(KERN_ERR "NiccyPnP: PnP error card found, no device\n"); - return (0); + pnp_c = pnp_find_card(ISAPNP_VENDOR('S', 'D', 'A'), + ISAPNP_FUNCTION(0x0150), pnp_c); + if (pnp_c) { + pnp_d = pnp_find_dev(pnp_c, + ISAPNP_VENDOR('S', 'D', 'A'), + ISAPNP_FUNCTION(0x0150), pnp_d); + if (!pnp_d) { + printk(KERN_ERR "NiccyPnP: PnP error card " + "found, no device\n"); + return 0; } pnp_disable_dev(pnp_d); err = pnp_activate_dev(pnp_d); - if (err<0) { - printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", - __FUNCTION__, err); - return(0); + if (err < 0) { + printk(KERN_WARNING "%s: pnp_activate_dev " + "ret(%d)\n", __FUNCTION__, err); + return 0; } card->para[1] = pnp_port_start(pnp_d, 0); card->para[2] = pnp_port_start(pnp_d, 1); card->para[0] = pnp_irq(pnp_d, 0); - if (!card->para[0] || !card->para[1] || !card->para[2]) { - printk(KERN_ERR "NiccyPnP:some resources are missing %ld/%lx/%lx\n", - card->para[0], card->para[1], card->para[2]); + if (!card->para[0] || !card->para[1] || + !card->para[2]) { + printk(KERN_ERR "NiccyPnP:some resources are " + "missing %ld/%lx/%lx\n", + card->para[0], card->para[1], + card->para[2]); pnp_disable_dev(pnp_d); - return(0); + return 0; } - } else { + } else printk(KERN_INFO "NiccyPnP: no ISAPnP card found\n"); - } } #endif if (card->para[1]) { @@ -291,50 +286,51 @@ 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], - cs->hw.niccy.isac, - cs->hw.niccy.isac + 1); - return (0); + printk(KERN_WARNING "HiSax: %s data port %x-%x " + "already in use\n", CardType[card->typ], + 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: %s address port %x-%x " + "already in use\n", CardType[card->typ], cs->hw.niccy.isac_ale, cs->hw.niccy.isac_ale + 1); release_region(cs->hw.niccy.isac, 2); - return (0); + return 0; } } else { #ifdef CONFIG_PCI u_int pci_ioaddr; cs->subtyp = 0; if ((niccy_dev = pci_find_device(PCI_VENDOR_ID_SATSAGEM, - PCI_DEVICE_ID_SATSAGEM_NICCY, niccy_dev))) { + PCI_DEVICE_ID_SATSAGEM_NICCY, + niccy_dev))) { if (pci_enable_device(niccy_dev)) - return(0); + return 0; /* get IRQ */ if (!niccy_dev->irq) { - printk(KERN_WARNING "Niccy: No IRQ for PCI card found\n"); - return(0); + printk(KERN_WARNING + "Niccy: No IRQ for PCI card found\n"); + return 0; } cs->irq = niccy_dev->irq; cs->hw.niccy.cfg_reg = pci_resource_start(niccy_dev, 0); if (!cs->hw.niccy.cfg_reg) { - printk(KERN_WARNING "Niccy: No IO-Adr for PCI cfg found\n"); - return(0); + printk(KERN_WARNING + "Niccy: No IO-Adr for PCI cfg found\n"); + return 0; } pci_ioaddr = pci_resource_start(niccy_dev, 1); if (!pci_ioaddr) { - printk(KERN_WARNING "Niccy: No IO-Adr for PCI card found\n"); - return(0); + printk(KERN_WARNING + "Niccy: No IO-Adr for PCI card found\n"); + return 0; } cs->subtyp = NICCY_PCI; } else { printk(KERN_WARNING "Niccy: No PCI card found\n"); - return(0); + return 0; } cs->irq_flags |= IRQF_SHARED; cs->hw.niccy.isac = pci_ioaddr + ISAC_PCI_DATA; @@ -343,29 +339,28 @@ 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], - cs->hw.niccy.isac, - cs->hw.niccy.isac + 4); - return (0); + "HiSax: %s data port %x-%x already in use\n", + CardType[card->typ], + 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], - cs->hw.niccy.cfg_reg, - cs->hw.niccy.cfg_reg + 0x40); + CardType[card->typ], + cs->hw.niccy.cfg_reg, + cs->hw.niccy.cfg_reg + 0x40); release_region(cs->hw.niccy.isac, 4); - return (0); + return 0; } #else printk(KERN_WARNING "Niccy: io0 0 and NO_PCI_BIOS\n"); printk(KERN_WARNING "Niccy: unable to config NICCY PCI\n"); - return (0); -#endif /* CONFIG_PCI */ + return 0; +#endif /* CONFIG_PCI */ } printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n", - CardType[cs->typ], (cs->subtyp==1) ? "PnP":"PCI", + CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI", cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale); setup_isac(cs); cs->readisac = &ReadISAC; @@ -379,10 +374,10 @@ setup_niccy(struct IsdnCard *card) cs->irq_func = &niccy_interrupt; ISACVersion(cs, "Niccy:"); if (HscxVersion(cs, "Niccy:")) { - printk(KERN_WARNING - "Niccy: wrong HSCX versions check IO address\n"); + printk(KERN_WARNING "Niccy: wrong HSCX versions check IO " + "address\n"); release_io_niccy(cs); - return (0); + return 0; } - return (1); + return 1; } diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c index 22fd5db18d48..aca2a3954b14 100644 --- a/drivers/isdn/hisax/st5481_b.c +++ b/drivers/isdn/hisax/st5481_b.c @@ -86,7 +86,7 @@ static void usb_b_out(struct st5481_bcs *bcs,int buf_nr) if (!skb->len) { // Frame sent b_out->tx_skb = NULL; - B_L1L2(bcs, PH_DATA | CONFIRM, (void *) skb->truesize); + B_L1L2(bcs, PH_DATA | CONFIRM, (void *)(unsigned long) skb->truesize); dev_kfree_skb_any(skb); /* if (!(bcs->tx_skb = skb_dequeue(&bcs->sq))) { */ @@ -350,7 +350,7 @@ void st5481_b_l2l1(struct hisax_if *ifc, int pr, void *arg) { struct st5481_bcs *bcs = ifc->priv; struct sk_buff *skb = arg; - int mode; + long mode; DBG(4, ""); @@ -360,8 +360,8 @@ void st5481_b_l2l1(struct hisax_if *ifc, int pr, void *arg) bcs->b_out.tx_skb = skb; break; case PH_ACTIVATE | REQUEST: - mode = (int) arg; - DBG(4,"B%d,PH_ACTIVATE_REQUEST %d", bcs->channel + 1, mode); + mode = (long) arg; + DBG(4,"B%d,PH_ACTIVATE_REQUEST %ld", bcs->channel + 1, mode); st5481B_mode(bcs, mode); B_L1L2(bcs, PH_ACTIVATE | INDICATION, NULL); break; diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c index 493dc94992e5..98adec440590 100644 --- a/drivers/isdn/hisax/st5481_d.c +++ b/drivers/isdn/hisax/st5481_d.c @@ -374,7 +374,7 @@ static void usb_d_out_complete(struct urb *urb, struct pt_regs *regs) { struct st5481_adapter *adapter = urb->context; struct st5481_d_out *d_out = &adapter->d_out; - int buf_nr; + long buf_nr; DBG(2, ""); @@ -546,7 +546,7 @@ static void dout_reseted(struct FsmInst *fsm, int event, void *arg) static void dout_complete(struct FsmInst *fsm, int event, void *arg) { struct st5481_adapter *adapter = fsm->userdata; - int buf_nr = (int) arg; + long buf_nr = (long) arg; usb_d_out(adapter, buf_nr); } diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 43da8ae1b2ad..1f8d6ae66b41 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c @@ -1614,8 +1614,8 @@ isdn_net_ciscohdlck_slarp_send_reply(isdn_net_local *lp) struct sk_buff *skb; unsigned char *p; struct in_device *in_dev = NULL; - u32 addr = 0; /* local ipv4 address */ - u32 mask = 0; /* local netmask */ + __be32 addr = 0; /* local ipv4 address */ + __be32 mask = 0; /* local netmask */ if ((in_dev = lp->netdev->dev.ip_ptr) != NULL) { /* take primary(first) address of interface */ diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 9ab66e8960d5..2b91bb07fc7f 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c @@ -1860,7 +1860,7 @@ modem_write_profile(atemu * m) send_sig(SIGIO, dev->profd, 1); } -static struct tty_operations modem_ops = { +static const struct tty_operations modem_ops = { .open = isdn_tty_open, .close = isdn_tty_close, .write = isdn_tty_write, diff --git a/drivers/isdn/sc/command.c b/drivers/isdn/sc/command.c index b4b24335f716..04b8a58f03b5 100644 --- a/drivers/isdn/sc/command.c +++ b/drivers/isdn/sc/command.c @@ -103,9 +103,6 @@ int command(isdn_ctrl *cmd) return -ENODEV; } - pr_debug("%s: Received %s command from Link Layer\n", - sc_adapter[card]->devicename, commands[cmd->command]); - /* * Dispatch the command */ @@ -118,7 +115,7 @@ int command(isdn_ctrl *cmd) memcpy(&cmdptr, cmd->parm.num, sizeof(unsigned long)); if (copy_from_user(&ioc, (scs_ioctl __user *)cmdptr, sizeof(scs_ioctl))) { - pr_debug("%s: Failed to verify user space 0x%x\n", + pr_debug("%s: Failed to verify user space 0x%lx\n", sc_adapter[card]->devicename, cmdptr); return -EFAULT; } @@ -195,7 +192,7 @@ static int dial(int card, unsigned long channel, setup_parm setup) strlen(Phone), (unsigned int *) Phone); - pr_debug("%s: Dialing %s on channel %d\n", + pr_debug("%s: Dialing %s on channel %lu\n", sc_adapter[card]->devicename, Phone, channel+1); return status; @@ -217,7 +214,7 @@ static int answer(int card, unsigned long channel) } indicate_status(card, ISDN_STAT_BCONN,channel,NULL); - pr_debug("%s: Answered incoming call on channel %s\n", + pr_debug("%s: Answered incoming call on channel %lu\n", sc_adapter[card]->devicename, channel+1); return 0; } @@ -240,7 +237,7 @@ static int hangup(int card, unsigned long channel) (unsigned char) channel+1, 0, NULL); - pr_debug("%s: Sent HANGUP message to channel %d\n", + pr_debug("%s: Sent HANGUP message to channel %lu\n", sc_adapter[card]->devicename, channel+1); return status; } @@ -260,9 +257,6 @@ static int setl2(int card, unsigned long arg) protocol = arg >> 8; channel = arg & 0xff; sc_adapter[card]->channel[channel].l2_proto = protocol; - pr_debug("%s: Level 2 protocol for channel %d set to %s from %d\n", - sc_adapter[card]->devicename, channel+1, - l2protos[sc_adapter[card]->channel[channel].l2_proto],protocol); /* * check that the adapter is also set to the correct protocol @@ -293,8 +287,6 @@ static int setl3(int card, unsigned long channel) } sc_adapter[card]->channel[channel].l3_proto = protocol; - pr_debug("%s: Level 3 protocol for channel %d set to %s\n", - sc_adapter[card]->devicename, channel+1, l3protos[protocol]); return 0; } @@ -311,7 +303,7 @@ static int acceptb(int card, unsigned long channel) return -ENOBUFS; } - pr_debug("%s: B-Channel connection accepted on channel %d\n", + pr_debug("%s: B-Channel connection accepted on channel %lu\n", sc_adapter[card]->devicename, channel+1); indicate_status(card, ISDN_STAT_BCONN, channel, NULL); return 0; @@ -326,7 +318,7 @@ static int clreaz(int card, unsigned long arg) strcpy(sc_adapter[card]->channel[arg].eazlist, ""); sc_adapter[card]->channel[arg].eazclear = 1; - pr_debug("%s: EAZ List cleared for channel %d\n", + pr_debug("%s: EAZ List cleared for channel %lu\n", sc_adapter[card]->devicename, arg+1); return 0; } @@ -340,7 +332,7 @@ static int seteaz(int card, unsigned long arg, char *num) strcpy(sc_adapter[card]->channel[arg].eazlist, num); sc_adapter[card]->channel[arg].eazclear = 0; - pr_debug("%s: EAZ list for channel %d set to: %s\n", + pr_debug("%s: EAZ list for channel %lu set to: %s\n", sc_adapter[card]->devicename, arg+1, sc_adapter[card]->channel[arg].eazlist); return 0; diff --git a/drivers/isdn/sc/event.c b/drivers/isdn/sc/event.c index 5b8c7c1a7663..57367325ef04 100644 --- a/drivers/isdn/sc/event.c +++ b/drivers/isdn/sc/event.c @@ -45,8 +45,10 @@ int indicate_status(int card, int event,ulong Channel,char *Data) { isdn_ctrl cmd; +#ifdef DEBUG pr_debug("%s: Indicating event %s on Channel %d\n", sc_adapter[card]->devicename, events[event-256], Channel); +#endif if (Data != NULL){ pr_debug("%s: Event data: %s\n", sc_adapter[card]->devicename, Data); diff --git a/drivers/isdn/sc/interrupt.c b/drivers/isdn/sc/interrupt.c index 8631d338d69a..ae6263125ac2 100644 --- a/drivers/isdn/sc/interrupt.c +++ b/drivers/isdn/sc/interrupt.c @@ -91,7 +91,7 @@ irqreturn_t interrupt_handler(int interrupt, void *cardptr, struct pt_regs *regs */ if (IS_CE_MESSAGE(rcvmsg, Lnk, 1, Read)) { - pr_debug("%s: Received packet 0x%x bytes long at 0x%x\n", + pr_debug("%s: Received packet 0x%x bytes long at 0x%lx\n", sc_adapter[card]->devicename, rcvmsg.msg_data.response.msg_len, rcvmsg.msg_data.response.buff_offset); diff --git a/drivers/isdn/sc/timer.c b/drivers/isdn/sc/timer.c index aced19aac5a2..f43282be0ada 100644 --- a/drivers/isdn/sc/timer.c +++ b/drivers/isdn/sc/timer.c @@ -76,7 +76,7 @@ void check_reset(unsigned long data) if (sc_adapter[card]->StartOnReset) startproc(card); } else { - pr_debug("%s: No signature yet, waiting another %d jiffies.\n", + pr_debug("%s: No signature yet, waiting another %lu jiffies.\n", sc_adapter[card]->devicename, CHECKRESET_TIME); mod_timer(&sc_adapter[card]->reset_timer, jiffies+CHECKRESET_TIME); spin_unlock_irqrestore(&sc_adapter[card]->lock, flags); |