diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-31 08:46:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-31 08:46:45 -0400 |
commit | 64960848abd18d0bcde3f53ffa7ed0b631e6b25d (patch) | |
tree | 8424a1c550a98ce09f127425fde9b7b5f2f5027a /drivers/isdn | |
parent | 2903037400a26e7c0cc93ab75a7d62abfacdf485 (diff) | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/capi/capi.c | 17 | ||||
-rw-r--r-- | drivers/isdn/gigaset/capi.c | 13 | ||||
-rw-r--r-- | drivers/isdn/hisax/hisax_fcpcipnp.c | 3 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 18 | ||||
-rw-r--r-- | drivers/isdn/mISDN/timerdev.c | 12 |
5 files changed, 38 insertions, 25 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index ee5837522f5a..0cabe31f26df 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -787,8 +787,7 @@ capi_poll(struct file *file, poll_table * wait) | |||
787 | } | 787 | } |
788 | 788 | ||
789 | static int | 789 | static int |
790 | capi_ioctl(struct inode *inode, struct file *file, | 790 | capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
791 | unsigned int cmd, unsigned long arg) | ||
792 | { | 791 | { |
793 | struct capidev *cdev = file->private_data; | 792 | struct capidev *cdev = file->private_data; |
794 | capi_ioctl_struct data; | 793 | capi_ioctl_struct data; |
@@ -981,6 +980,18 @@ register_out: | |||
981 | } | 980 | } |
982 | } | 981 | } |
983 | 982 | ||
983 | static long | ||
984 | capi_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
985 | { | ||
986 | int ret; | ||
987 | |||
988 | lock_kernel(); | ||
989 | ret = capi_ioctl(file, cmd, arg); | ||
990 | unlock_kernel(); | ||
991 | |||
992 | return ret; | ||
993 | } | ||
994 | |||
984 | static int capi_open(struct inode *inode, struct file *file) | 995 | static int capi_open(struct inode *inode, struct file *file) |
985 | { | 996 | { |
986 | struct capidev *cdev; | 997 | struct capidev *cdev; |
@@ -1026,7 +1037,7 @@ static const struct file_operations capi_fops = | |||
1026 | .read = capi_read, | 1037 | .read = capi_read, |
1027 | .write = capi_write, | 1038 | .write = capi_write, |
1028 | .poll = capi_poll, | 1039 | .poll = capi_poll, |
1029 | .ioctl = capi_ioctl, | 1040 | .unlocked_ioctl = capi_unlocked_ioctl, |
1030 | .open = capi_open, | 1041 | .open = capi_open, |
1031 | .release = capi_release, | 1042 | .release = capi_release, |
1032 | }; | 1043 | }; |
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index e72f86bccaa5..8f78f15c8ef7 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c | |||
@@ -170,17 +170,6 @@ static inline void ignore_cstruct_param(struct cardstate *cs, _cstruct param, | |||
170 | } | 170 | } |
171 | 171 | ||
172 | /* | 172 | /* |
173 | * convert hex to binary | ||
174 | */ | ||
175 | static inline u8 hex2bin(char c) | ||
176 | { | ||
177 | int result = c & 0x0f; | ||
178 | if (c & 0x40) | ||
179 | result += 9; | ||
180 | return result; | ||
181 | } | ||
182 | |||
183 | /* | ||
184 | * convert an IE from Gigaset hex string to ETSI binary representation | 173 | * convert an IE from Gigaset hex string to ETSI binary representation |
185 | * including length byte | 174 | * including length byte |
186 | * return value: result length, -1 on error | 175 | * return value: result length, -1 on error |
@@ -191,7 +180,7 @@ static int encode_ie(char *in, u8 *out, int maxlen) | |||
191 | while (*in) { | 180 | while (*in) { |
192 | if (!isxdigit(in[0]) || !isxdigit(in[1]) || l >= maxlen) | 181 | if (!isxdigit(in[0]) || !isxdigit(in[1]) || l >= maxlen) |
193 | return -1; | 182 | return -1; |
194 | out[++l] = (hex2bin(in[0]) << 4) + hex2bin(in[1]); | 183 | out[++l] = (hex_to_bin(in[0]) << 4) + hex_to_bin(in[1]); |
195 | in += 2; | 184 | in += 2; |
196 | } | 185 | } |
197 | out[0] = l; | 186 | out[0] = l; |
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index 1925118122f8..8b0a7d86b30f 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c | |||
@@ -74,9 +74,10 @@ static struct pnp_device_id fcpnp_ids[] __devinitdata = { | |||
74 | .id = "AVM0900", | 74 | .id = "AVM0900", |
75 | .driver_data = (unsigned long) "Fritz!Card PnP", | 75 | .driver_data = (unsigned long) "Fritz!Card PnP", |
76 | }, | 76 | }, |
77 | { .id = "" } | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | MODULE_DEVICE_TABLE(isapnp, fcpnp_ids); | 80 | MODULE_DEVICE_TABLE(pnp, fcpnp_ids); |
80 | #endif | 81 | #endif |
81 | 82 | ||
82 | static int protocol = 2; /* EURO-ISDN Default */ | 83 | static int protocol = 2; /* EURO-ISDN Default */ |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 70044ee4b228..a44cdb492ea9 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -1272,9 +1272,9 @@ isdn_poll(struct file *file, poll_table * wait) | |||
1272 | 1272 | ||
1273 | 1273 | ||
1274 | static int | 1274 | static int |
1275 | isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) | 1275 | isdn_ioctl(struct file *file, uint cmd, ulong arg) |
1276 | { | 1276 | { |
1277 | uint minor = iminor(inode); | 1277 | uint minor = iminor(file->f_path.dentry->d_inode); |
1278 | isdn_ctrl c; | 1278 | isdn_ctrl c; |
1279 | int drvidx; | 1279 | int drvidx; |
1280 | int chidx; | 1280 | int chidx; |
@@ -1722,6 +1722,18 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) | |||
1722 | #undef cfg | 1722 | #undef cfg |
1723 | } | 1723 | } |
1724 | 1724 | ||
1725 | static long | ||
1726 | isdn_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
1727 | { | ||
1728 | int ret; | ||
1729 | |||
1730 | lock_kernel(); | ||
1731 | ret = isdn_ioctl(file, cmd, arg); | ||
1732 | unlock_kernel(); | ||
1733 | |||
1734 | return ret; | ||
1735 | } | ||
1736 | |||
1725 | /* | 1737 | /* |
1726 | * Open the device code. | 1738 | * Open the device code. |
1727 | */ | 1739 | */ |
@@ -1838,7 +1850,7 @@ static const struct file_operations isdn_fops = | |||
1838 | .read = isdn_read, | 1850 | .read = isdn_read, |
1839 | .write = isdn_write, | 1851 | .write = isdn_write, |
1840 | .poll = isdn_poll, | 1852 | .poll = isdn_poll, |
1841 | .ioctl = isdn_ioctl, | 1853 | .unlocked_ioctl = isdn_unlocked_ioctl, |
1842 | .open = isdn_open, | 1854 | .open = isdn_open, |
1843 | .release = isdn_close, | 1855 | .release = isdn_close, |
1844 | }; | 1856 | }; |
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index 8785004e85e0..81048b8ed8ad 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/miscdevice.h> | 24 | #include <linux/miscdevice.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/mISDNif.h> | 26 | #include <linux/mISDNif.h> |
27 | #include <linux/smp_lock.h> | ||
27 | #include "core.h" | 28 | #include "core.h" |
28 | 29 | ||
29 | static u_int *debug; | 30 | static u_int *debug; |
@@ -97,8 +98,6 @@ mISDN_read(struct file *filep, char __user *buf, size_t count, loff_t *off) | |||
97 | if (*debug & DEBUG_TIMER) | 98 | if (*debug & DEBUG_TIMER) |
98 | printk(KERN_DEBUG "%s(%p, %p, %d, %p)\n", __func__, | 99 | printk(KERN_DEBUG "%s(%p, %p, %d, %p)\n", __func__, |
99 | filep, buf, (int)count, off); | 100 | filep, buf, (int)count, off); |
100 | if (*off != filep->f_pos) | ||
101 | return -ESPIPE; | ||
102 | 101 | ||
103 | if (list_empty(&dev->expired) && (dev->work == 0)) { | 102 | if (list_empty(&dev->expired) && (dev->work == 0)) { |
104 | if (filep->f_flags & O_NONBLOCK) | 103 | if (filep->f_flags & O_NONBLOCK) |
@@ -215,9 +214,8 @@ unlock: | |||
215 | return ret; | 214 | return ret; |
216 | } | 215 | } |
217 | 216 | ||
218 | static int | 217 | static long |
219 | mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | 218 | mISDN_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) |
220 | unsigned long arg) | ||
221 | { | 219 | { |
222 | struct mISDNtimerdev *dev = filep->private_data; | 220 | struct mISDNtimerdev *dev = filep->private_data; |
223 | int id, tout, ret = 0; | 221 | int id, tout, ret = 0; |
@@ -226,6 +224,7 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | |||
226 | if (*debug & DEBUG_TIMER) | 224 | if (*debug & DEBUG_TIMER) |
227 | printk(KERN_DEBUG "%s(%p, %x, %lx)\n", __func__, | 225 | printk(KERN_DEBUG "%s(%p, %x, %lx)\n", __func__, |
228 | filep, cmd, arg); | 226 | filep, cmd, arg); |
227 | lock_kernel(); | ||
229 | switch (cmd) { | 228 | switch (cmd) { |
230 | case IMADDTIMER: | 229 | case IMADDTIMER: |
231 | if (get_user(tout, (int __user *)arg)) { | 230 | if (get_user(tout, (int __user *)arg)) { |
@@ -257,13 +256,14 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | |||
257 | default: | 256 | default: |
258 | ret = -EINVAL; | 257 | ret = -EINVAL; |
259 | } | 258 | } |
259 | unlock_kernel(); | ||
260 | return ret; | 260 | return ret; |
261 | } | 261 | } |
262 | 262 | ||
263 | static const struct file_operations mISDN_fops = { | 263 | static const struct file_operations mISDN_fops = { |
264 | .read = mISDN_read, | 264 | .read = mISDN_read, |
265 | .poll = mISDN_poll, | 265 | .poll = mISDN_poll, |
266 | .ioctl = mISDN_ioctl, | 266 | .unlocked_ioctl = mISDN_ioctl, |
267 | .open = mISDN_open, | 267 | .open = mISDN_open, |
268 | .release = mISDN_close, | 268 | .release = mISDN_close, |
269 | }; | 269 | }; |