diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-03-27 16:14:38 +0100 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-03-27 16:14:38 +0100 |
commit | b92efa9abffc4a634cd2e7a0f81f8aa6310d67c9 (patch) | |
tree | 9847508d9b8d4e585f90db4a453bfbc3700c997e /drivers/isdn | |
parent | a16fffdd8eb95ebab7dc22414896fe6493951e0e (diff) | |
parent | be0ea69674ed95e1e98cb3687a241badc756d228 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into avr32-arch
Diffstat (limited to 'drivers/isdn')
26 files changed, 109 insertions, 82 deletions
diff --git a/drivers/isdn/act2000/act2000_isa.c b/drivers/isdn/act2000/act2000_isa.c index 1bd8960ead3..fea5b783335 100644 --- a/drivers/isdn/act2000/act2000_isa.c +++ b/drivers/isdn/act2000/act2000_isa.c @@ -257,9 +257,9 @@ act2000_isa_receive(act2000_card *card) printk(KERN_WARNING "act2000_isa_receive: Invalid CAPI msg\n"); { - int i; __u8 *p; __u8 *c; __u8 tmp[30]; - for (i = 0, p = (__u8 *)&card->idat.isa.rcvhdr, c = tmp; i < 8; i++) - c += sprintf(c, "%02x ", *(p++)); + int i; __u8 *p; __u8 *t; __u8 tmp[30]; + for (i = 0, p = (__u8 *)&card->idat.isa.rcvhdr, t = tmp; i < 8; i++) + t += sprintf(t, "%02x ", *(p++)); printk(KERN_WARNING "act2000_isa_receive: %s\n", tmp); } } diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 1b5bf87c4cf..3e468d2cf73 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -277,7 +277,7 @@ static void capiminor_free(struct capiminor *mp) list_del(&mp->list); write_unlock_irqrestore(&capiminor_list_lock, flags); - if (mp->ttyskb) kfree_skb(mp->ttyskb); + kfree_skb(mp->ttyskb); mp->ttyskb = NULL; skb_queue_purge(&mp->inqueue); skb_queue_purge(&mp->outqueue); diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c index c29208bd752..50ed778f63f 100644 --- a/drivers/isdn/capi/kcapi_proc.c +++ b/drivers/isdn/capi/kcapi_proc.c @@ -239,6 +239,7 @@ static const struct file_operations proc_applstats_ops = { // --------------------------------------------------------------------------- static void *capi_driver_start(struct seq_file *seq, loff_t *pos) + __acquires(&capi_drivers_list_lock) { read_lock(&capi_drivers_list_lock); return seq_list_start(&capi_drivers, *pos); @@ -250,6 +251,7 @@ static void *capi_driver_next(struct seq_file *seq, void *v, loff_t *pos) } static void capi_driver_stop(struct seq_file *seq, void *v) + __releases(&capi_drivers_list_lock) { read_unlock(&capi_drivers_list_lock); } diff --git a/drivers/isdn/gigaset/Kconfig b/drivers/isdn/gigaset/Kconfig index 0017e50c694..9ca889adf12 100644 --- a/drivers/isdn/gigaset/Kconfig +++ b/drivers/isdn/gigaset/Kconfig @@ -1,5 +1,5 @@ menuconfig ISDN_DRV_GIGASET - tristate "Siemens Gigaset support (isdn)" + tristate "Siemens Gigaset support" select CRC_CCITT select BITREVERSE help @@ -11,11 +11,11 @@ menuconfig ISDN_DRV_GIGASET one of the connection specific parts that follow. This will build a module called "gigaset". -if ISDN_DRV_GIGASET!=n +if ISDN_DRV_GIGASET config GIGASET_BASE tristate "Gigaset base station support" - depends on ISDN_DRV_GIGASET && USB + depends on USB help Say M here if you want to use the USB interface of the Gigaset base for connection to your system. @@ -23,7 +23,7 @@ config GIGASET_BASE config GIGASET_M105 tristate "Gigaset M105 support" - depends on ISDN_DRV_GIGASET && USB + depends on USB help Say M here if you want to connect to the Gigaset base via DECT using a Gigaset M105 (Sinus 45 Data 2) USB DECT device. @@ -31,7 +31,6 @@ config GIGASET_M105 config GIGASET_M101 tristate "Gigaset M101 support" - depends on ISDN_DRV_GIGASET help Say M here if you want to connect to the Gigaset base via DECT using a Gigaset M101 (Sinus 45 Data 1) RS232 DECT device. @@ -48,7 +47,6 @@ config GIGASET_UNDOCREQ help This enables support for USB requests we only know from reverse engineering (currently M105 only). If you need - features like configuration mode of M105, say yes. If you - care about your device, say no. + features like configuration mode of M105, say yes. -endif # ISDN_DRV_GIGASET != n +endif # ISDN_DRV_GIGASET diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 18dd8aacbe8..831ddce1467 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c @@ -46,6 +46,9 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode"); /* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */ #define IF_WRITEBUF 264 +/* interrupt pipe message size according to ibid. ch. 2.2 */ +#define IP_MSGSIZE 3 + /* Values for the Gigaset 307x */ #define USB_GIGA_VENDOR_ID 0x0681 #define USB_3070_PRODUCT_ID 0x0001 @@ -110,7 +113,7 @@ struct bas_cardstate { unsigned char *rcvbuf; /* AT reply receive buffer */ struct urb *urb_int_in; /* URB for interrupt pipe */ - unsigned char int_in_buf[3]; + unsigned char *int_in_buf; spinlock_t lock; /* locks all following */ int basstate; /* bitmap (BS_*) */ @@ -657,7 +660,7 @@ static void read_int_callback(struct urb *urb) } /* drop incomplete packets even if the missing bytes wouldn't matter */ - if (unlikely(urb->actual_length < 3)) { + if (unlikely(urb->actual_length < IP_MSGSIZE)) { dev_warn(cs->dev, "incomplete interrupt packet (%d bytes)\n", urb->actual_length); goto resubmit; @@ -2127,6 +2130,7 @@ static void gigaset_reinitbcshw(struct bc_state *bcs) static void gigaset_freecshw(struct cardstate *cs) { /* timers, URBs and rcvbuf are disposed of in disconnect */ + kfree(cs->hw.bas->int_in_buf); kfree(cs->hw.bas); cs->hw.bas = NULL; } @@ -2140,6 +2144,12 @@ static int gigaset_initcshw(struct cardstate *cs) pr_err("out of memory\n"); return 0; } + ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL); + if (!ucs->int_in_buf) { + kfree(ucs); + pr_err("out of memory\n"); + return 0; + } ucs->urb_cmd_in = NULL; ucs->urb_cmd_out = NULL; @@ -2292,7 +2302,7 @@ static int gigaset_probe(struct usb_interface *interface, usb_fill_int_urb(ucs->urb_int_in, udev, usb_rcvintpipe(udev, (endpoint->bEndpointAddress) & 0x0f), - ucs->int_in_buf, 3, read_int_callback, cs, + ucs->int_in_buf, IP_MSGSIZE, read_int_callback, cs, endpoint->bInterval); if ((rc = usb_submit_urb(ucs->urb_int_in, GFP_KERNEL)) != 0) { dev_err(cs->dev, "could not submit interrupt URB: %s\n", diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index ac245e7e96a..3071a52467e 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c @@ -389,8 +389,7 @@ static void gigaset_freecshw(struct cardstate *cs) static void gigaset_device_release(struct device *dev) { - struct platform_device *pdev = - container_of(dev, struct platform_device, dev); + struct platform_device *pdev = to_platform_device(dev); /* adapted from platform_device_release() in drivers/base/platform.c */ //FIXME is this actually necessary? diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index fba61f67052..d7838516609 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c @@ -278,17 +278,17 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag) static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state, unsigned new_state) { - return -EINVAL; + return -ENOTTY; } static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag) { - return -EINVAL; + return -ENOTTY; } static int gigaset_baud_rate(struct cardstate *cs, unsigned cflag) { - return -EINVAL; + return -ENOTTY; } #endif @@ -577,7 +577,7 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6]) return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x19, 0x41, 0, 0, &buf, 6, 2000); #else - return -EINVAL; + return -ENOTTY; #endif } diff --git a/drivers/isdn/hardware/eicon/debug.c b/drivers/isdn/hardware/eicon/debug.c index 84318ec8d13..33ce89eed65 100644 --- a/drivers/isdn/hardware/eicon/debug.c +++ b/drivers/isdn/hardware/eicon/debug.c @@ -1198,7 +1198,7 @@ int SuperTraceASSIGN (void* AdapterHandle, byte* data) { pC->xbuffer[5] = (byte)(rx_dma_magic >> 8); pC->xbuffer[6] = (byte)(rx_dma_magic >> 16); pC->xbuffer[7] = (byte)(rx_dma_magic >> 24); - pC->xbuffer[8] = (byte)DIVA_MAX_MANAGEMENT_TRANSFER_SIZE; + pC->xbuffer[8] = (byte)(DIVA_MAX_MANAGEMENT_TRANSFER_SIZE & 0xFF); pC->xbuffer[9] = (byte)(DIVA_MAX_MANAGEMENT_TRANSFER_SIZE >> 8); pC->xbuffer[10] = 0; diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c index 4cc94f200b7..31f91c18c69 100644 --- a/drivers/isdn/hardware/eicon/message.c +++ b/drivers/isdn/hardware/eicon/message.c @@ -1194,7 +1194,8 @@ static char hex_digit_table[0x10] = /* translation function for each message */ /*------------------------------------------------------------------*/ -byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word ch; word i; @@ -1411,7 +1412,8 @@ byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, return 2; } -byte connect_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte connect_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word i, Info; word Reject; @@ -1567,13 +1569,15 @@ byte connect_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, return 1; } -byte connect_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) +static byte connect_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *msg) { dbug(1,dprintf("connect_a_res")); return false; } -byte disconnect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) +static byte disconnect_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *msg) { word Info; word i; @@ -1628,7 +1632,8 @@ byte disconnect_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc return false; } -byte disconnect_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) +static byte disconnect_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *msg) { dbug(1,dprintf("disconnect_res")); if(plci) @@ -1655,7 +1660,8 @@ byte disconnect_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc return 0; } -byte listen_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte listen_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word Info; byte i; @@ -1704,7 +1710,8 @@ byte listen_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, A return false; } -byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) +static byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *msg) { word i; API_PARSE * ai; @@ -1813,13 +1820,15 @@ byte info_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APP return false; } -byte info_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) +static byte info_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *msg) { dbug(1,dprintf("info_res")); return false; } -byte alert_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) +static byte alert_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *msg) { word Info; byte ret; @@ -1849,7 +1858,8 @@ byte alert_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, AP return ret; } -byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) +static byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *msg) { word Info = 0; word i = 0; @@ -2599,13 +2609,15 @@ byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, return false; } -byte facility_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) +static byte facility_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *msg) { dbug(1,dprintf("facility_res")); return false; } -byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word Info = 0; byte req; @@ -2839,7 +2851,8 @@ byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc return false; } -byte connect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte connect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word ncci; API_PARSE * ncpi; @@ -2954,7 +2967,8 @@ byte connect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plc return false; } -byte connect_b3_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte connect_b3_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word ncci; @@ -2974,7 +2988,8 @@ byte connect_b3_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * p return false; } -byte disconnect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte disconnect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word Info; word ncci; @@ -3030,7 +3045,8 @@ byte disconnect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * return false; } -byte disconnect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte disconnect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word ncci; word i; @@ -3086,7 +3102,8 @@ byte disconnect_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * return false; } -byte data_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte data_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { NCCI *ncci_ptr; DATA_B3_DESC *data; @@ -3163,7 +3180,8 @@ byte data_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, return false; } -byte data_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte data_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word n; word ncci; @@ -3196,7 +3214,8 @@ byte data_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, return false; } -byte reset_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte reset_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word Info; word ncci; @@ -3237,7 +3256,8 @@ byte reset_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, return false; } -byte reset_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte reset_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word ncci; @@ -3261,7 +3281,8 @@ byte reset_b3_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, return false; } -byte connect_b3_t90_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * parms) +static byte connect_b3_t90_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *parms) { word ncci; API_PARSE * ncpi; @@ -3295,7 +3316,8 @@ byte connect_b3_t90_a_res(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI } -byte select_b_req(dword Id, word Number, DIVA_CAPI_ADAPTER * a, PLCI * plci, APPL * appl, API_PARSE * msg) +static byte select_b_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a, + PLCI *plci, APPL *appl, API_PARSE *msg) { word Info=0; word i; @@ -8689,7 +8711,7 @@ static word add_modem_b23 (PLCI * plci, API_PARSE* bp_parms) /* send a request for the signaling entity */ /*------------------------------------------------------------------*/ -void sig_req(PLCI * plci, byte req, byte Id) +static void sig_req(PLCI *plci, byte req, byte Id) { if(!plci) return; if(plci->adapter->adapter_disabled) return; @@ -8789,7 +8811,7 @@ static void send_req(PLCI *plci) dbug(1,dprintf("send_ok")); } -void send_data(PLCI * plci) +static void send_data(PLCI *plci) { DIVA_CAPI_ADAPTER * a; DATA_B3_DESC * data; diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 595ba8eb4a0..0b28141e43b 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -4599,6 +4599,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m) printk(KERN_ERR "%s: no memory for coeffs\n", __func__); ret = -ENOMEM; + kfree(bch); goto free_chan; } bch->nr = ch; @@ -4767,6 +4768,7 @@ init_multi_port(struct hfc_multi *hc, int pt) printk(KERN_ERR "%s: no memory for coeffs\n", __func__); ret = -ENOMEM; + kfree(bch); goto free_chan; } bch->nr = ch + 1; diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index f0e14dfcf71..641a9cd1a53 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -56,8 +56,8 @@ static const char *hfcpci_revision = "2.0"; static int HFC_cnt; static uint debug; static uint poll, tics; -struct timer_list hfc_tl; -u32 hfc_jiffies; +static struct timer_list hfc_tl; +static unsigned long hfc_jiffies; MODULE_AUTHOR("Karsten Keil"); MODULE_LICENSE("GPL"); diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c index ba6925fbf38..9c427fb204e 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.c +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c @@ -35,7 +35,7 @@ #include <linux/mISDNhw.h> #include "hfcsusb.h" -const char *hfcsusb_rev = "Revision: 0.3.3 (socket), 2008-11-05"; +static const char *hfcsusb_rev = "Revision: 0.3.3 (socket), 2008-11-05"; static unsigned int debug; static int poll = DEFAULT_TRANSP_BURST_SZ; @@ -974,7 +974,7 @@ hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len, spin_unlock(&hw->lock); } -void +static void fill_isoc_urb(struct urb *urb, struct usb_device *dev, unsigned int pipe, void *buf, int num_packets, int packet_size, int interval, usb_complete_t complete, void *context) @@ -1720,7 +1720,7 @@ hfcsusb_stop_endpoint(struct hfcsusb *hw, int channel) /* Hardware Initialization */ -int +static int setup_hfcsusb(struct hfcsusb *hw) { int err; diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.h b/drivers/isdn/hardware/mISDN/hfcsusb.h index 098486b8e8d..43efe7358fa 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.h +++ b/drivers/isdn/hardware/mISDN/hfcsusb.h @@ -198,7 +198,7 @@ validconf[][19] = { }; /* string description of chosen config */ -char *conf_str[] = { +static char *conf_str[] = { "4 Interrupt IN + 3 Isochron OUT", "3 Interrupt IN + 3 Isochron OUT", "4 Isochron IN + 3 Isochron OUT", @@ -316,7 +316,7 @@ struct hfcsusb_vdata { #define HFC_MAX_TE_LAYER1_STATE 8 #define HFC_MAX_NT_LAYER1_STATE 4 -const char *HFC_TE_LAYER1_STATES[HFC_MAX_TE_LAYER1_STATE + 1] = { +static const char *HFC_TE_LAYER1_STATES[HFC_MAX_TE_LAYER1_STATE + 1] = { "TE F0 - Reset", "TE F1 - Reset", "TE F2 - Sensing", @@ -328,7 +328,7 @@ const char *HFC_TE_LAYER1_STATES[HFC_MAX_TE_LAYER1_STATE + 1] = { "TE F8 - Lost framing", }; -const char *HFC_NT_LAYER1_STATES[HFC_MAX_NT_LAYER1_STATE + 1] = { +static const char *HFC_NT_LAYER1_STATES[HFC_MAX_NT_LAYER1_STATE + 1] = { "NT G0 - Reset", "NT G1 - Deactive", "NT G2 - Pending activation", diff --git a/drivers/isdn/hisax/callc.c b/drivers/isdn/hisax/callc.c index 7c56c44f0fd..025a20d487c 100644 --- a/drivers/isdn/hisax/callc.c +++ b/drivers/isdn/hisax/callc.c @@ -24,7 +24,6 @@ const char *lli_revision = "$Revision: 2.59.2.4 $"; extern struct IsdnCard cards[]; -extern int nrcards; static int init_b_st(struct Channel *chanp, int incoming); static void release_b_st(struct Channel *chanp); diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index ded9d0baf60..4fab18d4d02 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c @@ -361,12 +361,6 @@ module_param_array(io1, int, NULL, 0); int nrcards; -extern const char *l1_revision; -extern const char *l2_revision; -extern const char *l3_revision; -extern const char *lli_revision; -extern const char *tei_revision; - char *HiSax_getrev(const char *revision) { char *rev; diff --git a/drivers/isdn/hisax/hfcscard.c b/drivers/isdn/hisax/hfcscard.c index cf082665cc8..20d7688b397 100644 --- a/drivers/isdn/hisax/hfcscard.c +++ b/drivers/isdn/hisax/hfcscard.c @@ -16,8 +16,6 @@ #include "hfc_2bds0.h" #include "isdnl1.h" -extern const char *CardType[]; - static const char *hfcs_revision = "$Revision: 1.10.2.4 $"; static irqreturn_t diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h index e8d429fda84..f8527046f19 100644 --- a/drivers/isdn/hisax/hisax.h +++ b/drivers/isdn/hisax/hisax.h @@ -121,6 +121,15 @@ #ifdef __KERNEL__ +extern const char *CardType[]; +extern int nrcards; + +extern const char *l1_revision; +extern const char *l2_revision; +extern const char *l3_revision; +extern const char *lli_revision; +extern const char *tei_revision; + /* include l3dss1 & ni1 specific process structures, but no other defines */ #ifdef CONFIG_HISAX_EURO #define l3dss1_process diff --git a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c index a14204ec88e..317f16f516f 100644 --- a/drivers/isdn/hisax/isdnl1.c +++ b/drivers/isdn/hisax/isdnl1.c @@ -18,12 +18,12 @@ * */ -const char *l1_revision = "$Revision: 2.46.2.5 $"; - #include <linux/init.h> #include "hisax.h" #include "isdnl1.h" +const char *l1_revision = "$Revision: 2.46.2.5 $"; + #define TIMER3_VALUE 7000 static struct Fsm l1fsm_b; diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c index a10dfa82c73..5569a522e2a 100644 --- a/drivers/isdn/hisax/sedlbauer.c +++ b/drivers/isdn/hisax/sedlbauer.c @@ -48,8 +48,6 @@ #include <linux/pci.h> #include <linux/isapnp.h> -extern const char *CardType[]; - static const char *Sedlbauer_revision = "$Revision: 1.34.2.6 $"; static const char *Sedlbauer_Types[] = diff --git a/drivers/isdn/hisax/teles0.c b/drivers/isdn/hisax/teles0.c index 48581335f43..3ca0bed1b88 100644 --- a/drivers/isdn/hisax/teles0.c +++ b/drivers/isdn/hisax/teles0.c @@ -21,8 +21,6 @@ #include "isac.h" #include "hscx.h" -extern const char *CardType[]; - static const char *teles0_revision = "$Revision: 2.15.2.4 $"; #define TELES_IOMEM_SIZE 0x400 diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c index 5dc9f1a4362..e9f5bb4cdff 100644 --- a/drivers/isdn/hisax/teles3.c +++ b/drivers/isdn/hisax/teles3.c @@ -20,7 +20,6 @@ #include "hscx.h" #include "isdnl1.h" -extern const char *CardType[]; static const char *teles3_revision = "$Revision: 2.19.2.4 $"; #define byteout(addr,val) outb(val,addr) diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index a3551dd0324..aa30b5cb351 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c @@ -431,6 +431,7 @@ set_arg(void __user *b, void *val,int len) return 0; } +#ifdef CONFIG_IPPP_FILTER static int get_filter(void __user *arg, struct sock_filter **p) { struct sock_fprog uprog; @@ -465,6 +466,7 @@ static int get_filter(void __user *arg, struct sock_filter **p) *p = code; return uprog.len; } +#endif /* CONFIG_IPPP_FILTER */ /* * ippp device ioctl diff --git a/drivers/isdn/mISDN/clock.c b/drivers/isdn/mISDN/clock.c index 44d9c3d5d33..f1bbc88763b 100644 --- a/drivers/isdn/mISDN/clock.c +++ b/drivers/isdn/mISDN/clock.c @@ -41,11 +41,11 @@ static u_int *debug; static LIST_HEAD(iclock_list); -DEFINE_RWLOCK(iclock_lock); -u16 iclock_count; /* counter of last clock */ -struct timeval iclock_tv; /* time stamp of last clock */ -int iclock_tv_valid; /* already received one timestamp */ -struct mISDNclock *iclock_current; +static DEFINE_RWLOCK(iclock_lock); +static u16 iclock_count; /* counter of last clock */ +static struct timeval iclock_tv; /* time stamp of last clock */ +static int iclock_tv_valid; /* already received one timestamp */ +static struct mISDNclock *iclock_current; void mISDN_init_clock(u_int *dp) diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index f2b32186d4a..bbd99d3282c 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c @@ -152,8 +152,7 @@ dev_expire_timer(unsigned long data) u_long flags; spin_lock_irqsave(&timer->dev->lock, flags); - list_del(&timer->list); - list_add_tail(&timer->list, &timer->dev->expired); + list_move_tail(&timer->list, &timer->dev->expired); spin_unlock_irqrestore(&timer->dev->lock, flags); wake_up_interruptible(&timer->dev->wait); } diff --git a/drivers/isdn/pcbit/layer2.c b/drivers/isdn/pcbit/layer2.c index 5ba2a879df1..e075e8d2fce 100644 --- a/drivers/isdn/pcbit/layer2.c +++ b/drivers/isdn/pcbit/layer2.c @@ -347,8 +347,7 @@ pcbit_receive(struct pcbit_dev *dev) if (dev->read_frame) { printk(KERN_DEBUG "pcbit_receive: Type 0 frame and read_frame != NULL\n"); /* discard previous queued frame */ - if (dev->read_frame->skb) - kfree_skb(dev->read_frame->skb); + kfree_skb(dev->read_frame->skb); kfree(dev->read_frame); dev->read_frame = NULL; } @@ -601,8 +600,7 @@ pcbit_l2_err_recover(unsigned long data) dev->w_busy = dev->r_busy = 1; if (dev->read_frame) { - if (dev->read_frame->skb) - kfree_skb(dev->read_frame->skb); + kfree_skb(dev->read_frame->skb); kfree(dev->read_frame); dev->read_frame = NULL; } diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c index 712220cef13..7f16d75d2d8 100644 --- a/drivers/isdn/sc/shmem.c +++ b/drivers/isdn/sc/shmem.c @@ -54,7 +54,7 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n) spin_unlock_irqrestore(&sc_adapter[card]->lock, flags); pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename, ((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80); - pr_debug("%s: copying %d bytes from %#lx to %#lx\n", + pr_debug("%s: copying %zu bytes from %#lx to %#lx\n", sc_adapter[card]->devicename, n, (unsigned long) src, sc_adapter[card]->rambase + ((unsigned long) dest %0x4000)); |