diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-05-31 00:14:26 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-31 00:14:26 -0400 |
commit | d5b732b17ca2fc74f370bdba5aae6c804fac8c35 (patch) | |
tree | 4facc6d96116b032a3c1cb2ced9b2a3008e9216e /drivers/media/dvb/dvb-core/dvbdev.c | |
parent | eb6e8605ee5f5b4e116451bf01b3f35eac446dde (diff) | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/media/dvb/dvb-core/dvbdev.c')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvbdev.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c index 94159b90f733..b915c39d782f 100644 --- a/drivers/media/dvb/dvb-core/dvbdev.c +++ b/drivers/media/dvb/dvb-core/dvbdev.c | |||
@@ -154,10 +154,11 @@ int dvb_generic_release(struct inode *inode, struct file *file) | |||
154 | EXPORT_SYMBOL(dvb_generic_release); | 154 | EXPORT_SYMBOL(dvb_generic_release); |
155 | 155 | ||
156 | 156 | ||
157 | int dvb_generic_ioctl(struct inode *inode, struct file *file, | 157 | long dvb_generic_ioctl(struct file *file, |
158 | unsigned int cmd, unsigned long arg) | 158 | unsigned int cmd, unsigned long arg) |
159 | { | 159 | { |
160 | struct dvb_device *dvbdev = file->private_data; | 160 | struct dvb_device *dvbdev = file->private_data; |
161 | int ret; | ||
161 | 162 | ||
162 | if (!dvbdev) | 163 | if (!dvbdev) |
163 | return -ENODEV; | 164 | return -ENODEV; |
@@ -165,7 +166,11 @@ int dvb_generic_ioctl(struct inode *inode, struct file *file, | |||
165 | if (!dvbdev->kernel_ioctl) | 166 | if (!dvbdev->kernel_ioctl) |
166 | return -EINVAL; | 167 | return -EINVAL; |
167 | 168 | ||
168 | return dvb_usercopy (inode, file, cmd, arg, dvbdev->kernel_ioctl); | 169 | lock_kernel(); |
170 | ret = dvb_usercopy(file, cmd, arg, dvbdev->kernel_ioctl); | ||
171 | unlock_kernel(); | ||
172 | |||
173 | return ret; | ||
169 | } | 174 | } |
170 | EXPORT_SYMBOL(dvb_generic_ioctl); | 175 | EXPORT_SYMBOL(dvb_generic_ioctl); |
171 | 176 | ||
@@ -377,9 +382,9 @@ EXPORT_SYMBOL(dvb_unregister_adapter); | |||
377 | define this as video_usercopy(). this will introduce a dependecy | 382 | define this as video_usercopy(). this will introduce a dependecy |
378 | to the v4l "videodev.o" module, which is unnecessary for some | 383 | to the v4l "videodev.o" module, which is unnecessary for some |
379 | cards (ie. the budget dvb-cards don't need the v4l module...) */ | 384 | cards (ie. the budget dvb-cards don't need the v4l module...) */ |
380 | int dvb_usercopy(struct inode *inode, struct file *file, | 385 | int dvb_usercopy(struct file *file, |
381 | unsigned int cmd, unsigned long arg, | 386 | unsigned int cmd, unsigned long arg, |
382 | int (*func)(struct inode *inode, struct file *file, | 387 | int (*func)(struct file *file, |
383 | unsigned int cmd, void *arg)) | 388 | unsigned int cmd, void *arg)) |
384 | { | 389 | { |
385 | char sbuf[128]; | 390 | char sbuf[128]; |
@@ -416,7 +421,7 @@ int dvb_usercopy(struct inode *inode, struct file *file, | |||
416 | } | 421 | } |
417 | 422 | ||
418 | /* call driver */ | 423 | /* call driver */ |
419 | if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD) | 424 | if ((err = func(file, cmd, parg)) == -ENOIOCTLCMD) |
420 | err = -EINVAL; | 425 | err = -EINVAL; |
421 | 426 | ||
422 | if (err < 0) | 427 | if (err < 0) |