diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-07-14 17:29:34 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-14 17:29:34 -0400 |
commit | 2fceef397f9880b212a74c418290ce69e7ac00eb (patch) | |
tree | d9cc09ab992825ef7fede4a688103503e3caf655 /drivers/isdn | |
parent | feae1ef116ed381625d3731c5ae4f4ebcb3fa302 (diff) | |
parent | bce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff) |
Merge commit 'v2.6.26' into bkl-removal
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/capi/capiutil.c | 6 | ||||
-rw-r--r-- | drivers/isdn/hardware/eicon/divasmain.c | 1 | ||||
-rw-r--r-- | drivers/isdn/hardware/eicon/divasproc.c | 4 | ||||
-rw-r--r-- | drivers/isdn/hysdn/Kconfig | 2 | ||||
-rw-r--r-- | drivers/isdn/hysdn/boardergo.c | 14 | ||||
-rw-r--r-- | drivers/isdn/hysdn/hycapi.c | 6 | ||||
-rw-r--r-- | drivers/isdn/hysdn/hysdn_procconf.c | 29 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 4 | ||||
-rw-r--r-- | drivers/isdn/sc/ioctl.c | 1 |
9 files changed, 26 insertions, 41 deletions
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c index ebef4ce1b00c..29419a8d31dc 100644 --- a/drivers/isdn/capi/capiutil.c +++ b/drivers/isdn/capi/capiutil.c | |||
@@ -948,17 +948,17 @@ int __init cdebug_init(void) | |||
948 | { | 948 | { |
949 | g_cmsg= kmalloc(sizeof(_cmsg), GFP_KERNEL); | 949 | g_cmsg= kmalloc(sizeof(_cmsg), GFP_KERNEL); |
950 | if (!g_cmsg) | 950 | if (!g_cmsg) |
951 | return ENOMEM; | 951 | return -ENOMEM; |
952 | g_debbuf = kmalloc(sizeof(_cdebbuf), GFP_KERNEL); | 952 | g_debbuf = kmalloc(sizeof(_cdebbuf), GFP_KERNEL); |
953 | if (!g_debbuf) { | 953 | if (!g_debbuf) { |
954 | kfree(g_cmsg); | 954 | kfree(g_cmsg); |
955 | return ENOMEM; | 955 | return -ENOMEM; |
956 | } | 956 | } |
957 | g_debbuf->buf = kmalloc(CDEBUG_GSIZE, GFP_KERNEL); | 957 | g_debbuf->buf = kmalloc(CDEBUG_GSIZE, GFP_KERNEL); |
958 | if (!g_debbuf->buf) { | 958 | if (!g_debbuf->buf) { |
959 | kfree(g_cmsg); | 959 | kfree(g_cmsg); |
960 | kfree(g_debbuf); | 960 | kfree(g_debbuf); |
961 | return ENOMEM;; | 961 | return -ENOMEM;; |
962 | } | 962 | } |
963 | g_debbuf->size = CDEBUG_GSIZE; | 963 | g_debbuf->size = CDEBUG_GSIZE; |
964 | g_debbuf->buf[0] = 0; | 964 | g_debbuf->buf[0] = 0; |
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index 65c95019a9ae..fbbcb27fb681 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c | |||
@@ -808,7 +808,6 @@ static int DIVA_INIT_FUNCTION divas_init(void) | |||
808 | 808 | ||
809 | if (!create_divas_proc()) { | 809 | if (!create_divas_proc()) { |
810 | #ifdef MODULE | 810 | #ifdef MODULE |
811 | remove_divas_proc(); | ||
812 | divas_unregister_chrdev(); | 811 | divas_unregister_chrdev(); |
813 | divasfunc_exit(); | 812 | divasfunc_exit(); |
814 | #endif | 813 | #endif |
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c index fae895828a17..040827288ec9 100644 --- a/drivers/isdn/hardware/eicon/divasproc.c +++ b/drivers/isdn/hardware/eicon/divasproc.c | |||
@@ -125,8 +125,8 @@ static const struct file_operations divas_fops = { | |||
125 | 125 | ||
126 | int create_divas_proc(void) | 126 | int create_divas_proc(void) |
127 | { | 127 | { |
128 | proc_create(divas_proc_name, S_IFREG | S_IRUGO, proc_net_eicon, | 128 | divas_proc_entry = proc_create(divas_proc_name, S_IFREG | S_IRUGO, |
129 | &divas_fops); | 129 | proc_net_eicon, &divas_fops); |
130 | if (!divas_proc_entry) | 130 | if (!divas_proc_entry) |
131 | return (0); | 131 | return (0); |
132 | 132 | ||
diff --git a/drivers/isdn/hysdn/Kconfig b/drivers/isdn/hysdn/Kconfig index c6d8a7042988..c9e4231968ef 100644 --- a/drivers/isdn/hysdn/Kconfig +++ b/drivers/isdn/hysdn/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | config HYSDN | 4 | config HYSDN |
5 | tristate "Hypercope HYSDN cards (Champ, Ergo, Metro) support (module only)" | 5 | tristate "Hypercope HYSDN cards (Champ, Ergo, Metro) support (module only)" |
6 | depends on m && PROC_FS && PCI && BROKEN_ON_SMP | 6 | depends on m && PROC_FS && PCI |
7 | help | 7 | help |
8 | Say Y here if you have one of Hypercope's active PCI ISDN cards | 8 | Say Y here if you have one of Hypercope's active PCI ISDN cards |
9 | Champ, Ergo and Metro. You will then get a module called hysdn. | 9 | Champ, Ergo and Metro. You will then get a module called hysdn. |
diff --git a/drivers/isdn/hysdn/boardergo.c b/drivers/isdn/hysdn/boardergo.c index 6cdbad3a9926..3eb096f0ae1b 100644 --- a/drivers/isdn/hysdn/boardergo.c +++ b/drivers/isdn/hysdn/boardergo.c | |||
@@ -64,10 +64,11 @@ ergo_interrupt(int intno, void *dev_id) | |||
64 | } /* ergo_interrupt */ | 64 | } /* ergo_interrupt */ |
65 | 65 | ||
66 | /******************************************************************************/ | 66 | /******************************************************************************/ |
67 | /* ergo_irq_bh is the function called by the immediate kernel task list after */ | 67 | /* ergo_irq_bh will be called as part of the kernel clearing its shared work */ |
68 | /* being activated with queue_task and no interrupts active. This task is the */ | 68 | /* queue sometime after a call to schedule_work has been made passing our */ |
69 | /* only one handling data transfer from or to the card after booting. The task */ | 69 | /* work_struct. This task is the only one handling data transfer from or to */ |
70 | /* may be queued from everywhere (interrupts included). */ | 70 | /* the card after booting. The task may be queued from everywhere */ |
71 | /* (interrupts included). */ | ||
71 | /******************************************************************************/ | 72 | /******************************************************************************/ |
72 | static void | 73 | static void |
73 | ergo_irq_bh(struct work_struct *ugli_api) | 74 | ergo_irq_bh(struct work_struct *ugli_api) |
@@ -90,7 +91,6 @@ ergo_irq_bh(struct work_struct *ugli_api) | |||
90 | card->hw_lock = 1; /* we now lock the hardware */ | 91 | card->hw_lock = 1; /* we now lock the hardware */ |
91 | 92 | ||
92 | do { | 93 | do { |
93 | sti(); /* reenable other ints */ | ||
94 | again = 0; /* assume loop not to be repeated */ | 94 | again = 0; /* assume loop not to be repeated */ |
95 | 95 | ||
96 | if (!dpr->ToHyFlag) { | 96 | if (!dpr->ToHyFlag) { |
@@ -110,7 +110,6 @@ ergo_irq_bh(struct work_struct *ugli_api) | |||
110 | again = 1; /* restart loop */ | 110 | again = 1; /* restart loop */ |
111 | } | 111 | } |
112 | } /* a message has arrived for us */ | 112 | } /* a message has arrived for us */ |
113 | cli(); /* no further ints */ | ||
114 | if (again) { | 113 | if (again) { |
115 | dpr->ToHyInt = 1; | 114 | dpr->ToHyInt = 1; |
116 | dpr->ToPcInt = 1; /* interrupt to E1 for all cards */ | 115 | dpr->ToPcInt = 1; /* interrupt to E1 for all cards */ |
@@ -242,7 +241,6 @@ ergo_writebootimg(struct HYSDN_CARD *card, unsigned char *buf, | |||
242 | byteout(card->iobase + PCI9050_USER_IO, PCI9050_E1_RUN); /* start E1 processor */ | 241 | byteout(card->iobase + PCI9050_USER_IO, PCI9050_E1_RUN); /* start E1 processor */ |
243 | /* the interrupts are still masked */ | 242 | /* the interrupts are still masked */ |
244 | 243 | ||
245 | sti(); | ||
246 | msleep_interruptible(20); /* Timeout 20ms */ | 244 | msleep_interruptible(20); /* Timeout 20ms */ |
247 | 245 | ||
248 | if (((tDpramBootSpooler *) card->dpram)->Len != DPRAM_SPOOLER_DATA_SIZE) { | 246 | if (((tDpramBootSpooler *) card->dpram)->Len != DPRAM_SPOOLER_DATA_SIZE) { |
@@ -276,7 +274,6 @@ ergo_writebootseq(struct HYSDN_CARD *card, unsigned char *buf, int len) | |||
276 | dst = sp->Data; /* point to data in spool structure */ | 274 | dst = sp->Data; /* point to data in spool structure */ |
277 | buflen = sp->Len; /* maximum len of spooled data */ | 275 | buflen = sp->Len; /* maximum len of spooled data */ |
278 | wr_mirror = sp->WrPtr; /* only once read */ | 276 | wr_mirror = sp->WrPtr; /* only once read */ |
279 | sti(); | ||
280 | 277 | ||
281 | /* try until all bytes written or error */ | 278 | /* try until all bytes written or error */ |
282 | i = 0x1000; /* timeout value */ | 279 | i = 0x1000; /* timeout value */ |
@@ -380,7 +377,6 @@ ergo_waitpofready(struct HYSDN_CARD *card) | |||
380 | #endif /* CONFIG_HYSDN_CAPI */ | 377 | #endif /* CONFIG_HYSDN_CAPI */ |
381 | return (0); /* success */ | 378 | return (0); /* success */ |
382 | } /* data has arrived */ | 379 | } /* data has arrived */ |
383 | sti(); | ||
384 | msleep_interruptible(50); /* Timeout 50ms */ | 380 | msleep_interruptible(50); /* Timeout 50ms */ |
385 | } /* wait until timeout */ | 381 | } /* wait until timeout */ |
386 | 382 | ||
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c index d3999a8e9f88..53f6ad1235db 100644 --- a/drivers/isdn/hysdn/hycapi.c +++ b/drivers/isdn/hysdn/hycapi.c | |||
@@ -462,11 +462,11 @@ static int hycapi_read_proc(char *page, char **start, off_t off, | |||
462 | default: s = "???"; break; | 462 | default: s = "???"; break; |
463 | } | 463 | } |
464 | len += sprintf(page+len, "%-16s %s\n", "type", s); | 464 | len += sprintf(page+len, "%-16s %s\n", "type", s); |
465 | if ((s = cinfo->version[VER_DRIVER]) != 0) | 465 | if ((s = cinfo->version[VER_DRIVER]) != NULL) |
466 | len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); | 466 | len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); |
467 | if ((s = cinfo->version[VER_CARDTYPE]) != 0) | 467 | if ((s = cinfo->version[VER_CARDTYPE]) != NULL) |
468 | len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); | 468 | len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); |
469 | if ((s = cinfo->version[VER_SERIAL]) != 0) | 469 | if ((s = cinfo->version[VER_SERIAL]) != NULL) |
470 | len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); | 470 | len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); |
471 | 471 | ||
472 | len += sprintf(page+len, "%-16s %s\n", "cardname", cinfo->cardname); | 472 | len += sprintf(page+len, "%-16s %s\n", "cardname", cinfo->cardname); |
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 15906d005b05..484299b031f8 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c | |||
@@ -207,30 +207,17 @@ hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t | |||
207 | /* read conf file -> output card info data */ | 207 | /* read conf file -> output card info data */ |
208 | /*******************************************/ | 208 | /*******************************************/ |
209 | static ssize_t | 209 | static ssize_t |
210 | hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t * off) | 210 | hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t *off) |
211 | { | 211 | { |
212 | char *cp; | 212 | char *cp; |
213 | int i; | ||
214 | 213 | ||
215 | if (file->f_mode & FMODE_READ) { | 214 | if (!(file->f_mode & FMODE_READ)) |
216 | if (!(cp = file->private_data)) | 215 | return -EPERM; /* no permission to read */ |
217 | return (-EFAULT); /* should never happen */ | 216 | |
218 | i = strlen(cp); /* get total string length */ | 217 | if (!(cp = file->private_data)) |
219 | if (*off < i) { | 218 | return -EFAULT; /* should never happen */ |
220 | /* still bytes to transfer */ | 219 | |
221 | cp += *off; /* point to desired data offset */ | 220 | return simple_read_from_buffer(buf, count, off, cp, strlen(cp)); |
222 | i -= *off; /* remaining length */ | ||
223 | if (i > count) | ||
224 | i = count; /* limit length to transfer */ | ||
225 | if (copy_to_user(buf, cp, i)) | ||
226 | return (-EFAULT); /* copy error */ | ||
227 | *off += i; /* adjust offset */ | ||
228 | } else | ||
229 | return (0); | ||
230 | } else | ||
231 | return (-EPERM); /* no permission to read */ | ||
232 | |||
233 | return (i); | ||
234 | } /* hysdn_conf_read */ | 221 | } /* hysdn_conf_read */ |
235 | 222 | ||
236 | /******************/ | 223 | /******************/ |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 5158c606ff5b..7188c59a76ff 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -1978,8 +1978,10 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len) | |||
1978 | if (!skb) | 1978 | if (!skb) |
1979 | return -ENOMEM; | 1979 | return -ENOMEM; |
1980 | skb_reserve(skb, hl); | 1980 | skb_reserve(skb, hl); |
1981 | if (copy_from_user(skb_put(skb, len), buf, len)) | 1981 | if (copy_from_user(skb_put(skb, len), buf, len)) { |
1982 | dev_kfree_skb(skb); | ||
1982 | return -EFAULT; | 1983 | return -EFAULT; |
1984 | } | ||
1983 | ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); | 1985 | ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); |
1984 | if (ret <= 0) | 1986 | if (ret <= 0) |
1985 | dev_kfree_skb(skb); | 1987 | dev_kfree_skb(skb); |
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c index 7817d2244921..1081091bbfaf 100644 --- a/drivers/isdn/sc/ioctl.c +++ b/drivers/isdn/sc/ioctl.c | |||
@@ -226,6 +226,7 @@ int sc_ioctl(int card, scs_ioctl *data) | |||
226 | */ | 226 | */ |
227 | if (copy_from_user(spid, data->dataptr, SCIOC_SPIDSIZE)) { | 227 | if (copy_from_user(spid, data->dataptr, SCIOC_SPIDSIZE)) { |
228 | kfree(rcvmsg); | 228 | kfree(rcvmsg); |
229 | kfree(spid); | ||
229 | return -EFAULT; | 230 | return -EFAULT; |
230 | } | 231 | } |
231 | 232 | ||