aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-core/dmxdev.c31
-rw-r--r--drivers/media/dvb/dvb-core/dvb_ca_en50221.c17
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c30
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.c15
-rw-r--r--drivers/media/dvb/dvb-core/dvbdev.c17
-rw-r--r--drivers/media/dvb/dvb-core/dvbdev.h11
-rw-r--r--drivers/media/dvb/firewire/firedtv-ci.c5
-rw-r--r--drivers/media/dvb/ttpci/av7110.c4
-rw-r--r--drivers/media/dvb/ttpci/av7110_av.c8
-rw-r--r--drivers/media/dvb/ttpci/av7110_ca.c5
10 files changed, 85 insertions, 58 deletions
diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
index 9ddc57909d49..425862ffb285 100644
--- a/drivers/media/dvb/dvb-core/dmxdev.c
+++ b/drivers/media/dvb/dvb-core/dmxdev.c
@@ -25,6 +25,7 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/smp_lock.h>
28#include <linux/poll.h> 29#include <linux/poll.h>
29#include <linux/ioctl.h> 30#include <linux/ioctl.h>
30#include <linux/wait.h> 31#include <linux/wait.h>
@@ -963,7 +964,7 @@ dvb_demux_read(struct file *file, char __user *buf, size_t count,
963 return ret; 964 return ret;
964} 965}
965 966
966static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, 967static int dvb_demux_do_ioctl(struct file *file,
967 unsigned int cmd, void *parg) 968 unsigned int cmd, void *parg)
968{ 969{
969 struct dmxdev_filter *dmxdevfilter = file->private_data; 970 struct dmxdev_filter *dmxdevfilter = file->private_data;
@@ -1084,10 +1085,16 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file,
1084 return ret; 1085 return ret;
1085} 1086}
1086 1087
1087static int dvb_demux_ioctl(struct inode *inode, struct file *file, 1088static long dvb_demux_ioctl(struct file *file, unsigned int cmd,
1088 unsigned int cmd, unsigned long arg) 1089 unsigned long arg)
1089{ 1090{
1090 return dvb_usercopy(inode, file, cmd, arg, dvb_demux_do_ioctl); 1091 int ret;
1092
1093 lock_kernel();
1094 ret = dvb_usercopy(file, cmd, arg, dvb_demux_do_ioctl);
1095 unlock_kernel();
1096
1097 return ret;
1091} 1098}
1092 1099
1093static unsigned int dvb_demux_poll(struct file *file, poll_table *wait) 1100static unsigned int dvb_demux_poll(struct file *file, poll_table *wait)
@@ -1139,7 +1146,7 @@ static int dvb_demux_release(struct inode *inode, struct file *file)
1139static const struct file_operations dvb_demux_fops = { 1146static const struct file_operations dvb_demux_fops = {
1140 .owner = THIS_MODULE, 1147 .owner = THIS_MODULE,
1141 .read = dvb_demux_read, 1148 .read = dvb_demux_read,
1142 .ioctl = dvb_demux_ioctl, 1149 .unlocked_ioctl = dvb_demux_ioctl,
1143 .open = dvb_demux_open, 1150 .open = dvb_demux_open,
1144 .release = dvb_demux_release, 1151 .release = dvb_demux_release,
1145 .poll = dvb_demux_poll, 1152 .poll = dvb_demux_poll,
@@ -1152,7 +1159,7 @@ static struct dvb_device dvbdev_demux = {
1152 .fops = &dvb_demux_fops 1159 .fops = &dvb_demux_fops
1153}; 1160};
1154 1161
1155static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, 1162static int dvb_dvr_do_ioctl(struct file *file,
1156 unsigned int cmd, void *parg) 1163 unsigned int cmd, void *parg)
1157{ 1164{
1158 struct dvb_device *dvbdev = file->private_data; 1165 struct dvb_device *dvbdev = file->private_data;
@@ -1176,10 +1183,16 @@ static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file,
1176 return ret; 1183 return ret;
1177} 1184}
1178 1185
1179static int dvb_dvr_ioctl(struct inode *inode, struct file *file, 1186static long dvb_dvr_ioctl(struct file *file,
1180 unsigned int cmd, unsigned long arg) 1187 unsigned int cmd, unsigned long arg)
1181{ 1188{
1182 return dvb_usercopy(inode, file, cmd, arg, dvb_dvr_do_ioctl); 1189 int ret;
1190
1191 lock_kernel();
1192 ret = dvb_usercopy(file, cmd, arg, dvb_dvr_do_ioctl);
1193 unlock_kernel();
1194
1195 return ret;
1183} 1196}
1184 1197
1185static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait) 1198static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
@@ -1208,7 +1221,7 @@ static const struct file_operations dvb_dvr_fops = {
1208 .owner = THIS_MODULE, 1221 .owner = THIS_MODULE,
1209 .read = dvb_dvr_read, 1222 .read = dvb_dvr_read,
1210 .write = dvb_dvr_write, 1223 .write = dvb_dvr_write,
1211 .ioctl = dvb_dvr_ioctl, 1224 .unlocked_ioctl = dvb_dvr_ioctl,
1212 .open = dvb_dvr_open, 1225 .open = dvb_dvr_open,
1213 .release = dvb_dvr_release, 1226 .release = dvb_dvr_release,
1214 .poll = dvb_dvr_poll, 1227 .poll = dvb_dvr_poll,
diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
index cb22da53bfb0..ef259a0718ac 100644
--- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
@@ -36,6 +36,7 @@
36#include <linux/delay.h> 36#include <linux/delay.h>
37#include <linux/spinlock.h> 37#include <linux/spinlock.h>
38#include <linux/sched.h> 38#include <linux/sched.h>
39#include <linux/smp_lock.h>
39#include <linux/kthread.h> 40#include <linux/kthread.h>
40 41
41#include "dvb_ca_en50221.h" 42#include "dvb_ca_en50221.h"
@@ -1181,7 +1182,7 @@ static int dvb_ca_en50221_thread(void *data)
1181 * 1182 *
1182 * @return 0 on success, <0 on error. 1183 * @return 0 on success, <0 on error.
1183 */ 1184 */
1184static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, 1185static int dvb_ca_en50221_io_do_ioctl(struct file *file,
1185 unsigned int cmd, void *parg) 1186 unsigned int cmd, void *parg)
1186{ 1187{
1187 struct dvb_device *dvbdev = file->private_data; 1188 struct dvb_device *dvbdev = file->private_data;
@@ -1255,10 +1256,16 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file,
1255 * 1256 *
1256 * @return 0 on success, <0 on error. 1257 * @return 0 on success, <0 on error.
1257 */ 1258 */
1258static int dvb_ca_en50221_io_ioctl(struct inode *inode, struct file *file, 1259static long dvb_ca_en50221_io_ioctl(struct file *file,
1259 unsigned int cmd, unsigned long arg) 1260 unsigned int cmd, unsigned long arg)
1260{ 1261{
1261 return dvb_usercopy(inode, file, cmd, arg, dvb_ca_en50221_io_do_ioctl); 1262 int ret;
1263
1264 lock_kernel();
1265 ret = dvb_usercopy(file, cmd, arg, dvb_ca_en50221_io_do_ioctl);
1266 unlock_kernel();
1267
1268 return ret;
1262} 1269}
1263 1270
1264 1271
@@ -1611,7 +1618,7 @@ static const struct file_operations dvb_ca_fops = {
1611 .owner = THIS_MODULE, 1618 .owner = THIS_MODULE,
1612 .read = dvb_ca_en50221_io_read, 1619 .read = dvb_ca_en50221_io_read,
1613 .write = dvb_ca_en50221_io_write, 1620 .write = dvb_ca_en50221_io_write,
1614 .ioctl = dvb_ca_en50221_io_ioctl, 1621 .unlocked_ioctl = dvb_ca_en50221_io_ioctl,
1615 .open = dvb_ca_en50221_io_open, 1622 .open = dvb_ca_en50221_io_open,
1616 .release = dvb_ca_en50221_io_release, 1623 .release = dvb_ca_en50221_io_release,
1617 .poll = dvb_ca_en50221_io_poll, 1624 .poll = dvb_ca_en50221_io_poll,
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 6932def4d266..44ae89ecef94 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -36,6 +36,7 @@
36#include <linux/list.h> 36#include <linux/list.h>
37#include <linux/freezer.h> 37#include <linux/freezer.h>
38#include <linux/jiffies.h> 38#include <linux/jiffies.h>
39#include <linux/smp_lock.h>
39#include <linux/kthread.h> 40#include <linux/kthread.h>
40#include <asm/processor.h> 41#include <asm/processor.h>
41 42
@@ -1195,14 +1196,14 @@ static void dtv_property_cache_submit(struct dvb_frontend *fe)
1195 } 1196 }
1196} 1197}
1197 1198
1198static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, 1199static int dvb_frontend_ioctl_legacy(struct file *file,
1199 unsigned int cmd, void *parg); 1200 unsigned int cmd, void *parg);
1200static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, 1201static int dvb_frontend_ioctl_properties(struct file *file,
1201 unsigned int cmd, void *parg); 1202 unsigned int cmd, void *parg);
1202 1203
1203static int dtv_property_process_get(struct dvb_frontend *fe, 1204static int dtv_property_process_get(struct dvb_frontend *fe,
1204 struct dtv_property *tvp, 1205 struct dtv_property *tvp,
1205 struct inode *inode, struct file *file) 1206 struct file *file)
1206{ 1207{
1207 int r = 0; 1208 int r = 0;
1208 1209
@@ -1335,7 +1336,6 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
1335 1336
1336static int dtv_property_process_set(struct dvb_frontend *fe, 1337static int dtv_property_process_set(struct dvb_frontend *fe,
1337 struct dtv_property *tvp, 1338 struct dtv_property *tvp,
1338 struct inode *inode,
1339 struct file *file) 1339 struct file *file)
1340{ 1340{
1341 int r = 0; 1341 int r = 0;
@@ -1366,7 +1366,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
1366 dprintk("%s() Finalised property cache\n", __func__); 1366 dprintk("%s() Finalised property cache\n", __func__);
1367 dtv_property_cache_submit(fe); 1367 dtv_property_cache_submit(fe);
1368 1368
1369 r |= dvb_frontend_ioctl_legacy(inode, file, FE_SET_FRONTEND, 1369 r |= dvb_frontend_ioctl_legacy(file, FE_SET_FRONTEND,
1370 &fepriv->parameters); 1370 &fepriv->parameters);
1371 break; 1371 break;
1372 case DTV_FREQUENCY: 1372 case DTV_FREQUENCY:
@@ -1398,12 +1398,12 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
1398 break; 1398 break;
1399 case DTV_VOLTAGE: 1399 case DTV_VOLTAGE:
1400 fe->dtv_property_cache.voltage = tvp->u.data; 1400 fe->dtv_property_cache.voltage = tvp->u.data;
1401 r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_VOLTAGE, 1401 r = dvb_frontend_ioctl_legacy(file, FE_SET_VOLTAGE,
1402 (void *)fe->dtv_property_cache.voltage); 1402 (void *)fe->dtv_property_cache.voltage);
1403 break; 1403 break;
1404 case DTV_TONE: 1404 case DTV_TONE:
1405 fe->dtv_property_cache.sectone = tvp->u.data; 1405 fe->dtv_property_cache.sectone = tvp->u.data;
1406 r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_TONE, 1406 r = dvb_frontend_ioctl_legacy(file, FE_SET_TONE,
1407 (void *)fe->dtv_property_cache.sectone); 1407 (void *)fe->dtv_property_cache.sectone);
1408 break; 1408 break;
1409 case DTV_CODE_RATE_HP: 1409 case DTV_CODE_RATE_HP:
@@ -1487,7 +1487,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
1487 return r; 1487 return r;
1488} 1488}
1489 1489
1490static int dvb_frontend_ioctl(struct inode *inode, struct file *file, 1490static int dvb_frontend_ioctl(struct file *file,
1491 unsigned int cmd, void *parg) 1491 unsigned int cmd, void *parg)
1492{ 1492{
1493 struct dvb_device *dvbdev = file->private_data; 1493 struct dvb_device *dvbdev = file->private_data;
@@ -1509,17 +1509,17 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
1509 return -ERESTARTSYS; 1509 return -ERESTARTSYS;
1510 1510
1511 if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) 1511 if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY))
1512 err = dvb_frontend_ioctl_properties(inode, file, cmd, parg); 1512 err = dvb_frontend_ioctl_properties(file, cmd, parg);
1513 else { 1513 else {
1514 fe->dtv_property_cache.state = DTV_UNDEFINED; 1514 fe->dtv_property_cache.state = DTV_UNDEFINED;
1515 err = dvb_frontend_ioctl_legacy(inode, file, cmd, parg); 1515 err = dvb_frontend_ioctl_legacy(file, cmd, parg);
1516 } 1516 }
1517 1517
1518 up(&fepriv->sem); 1518 up(&fepriv->sem);
1519 return err; 1519 return err;
1520} 1520}
1521 1521
1522static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, 1522static int dvb_frontend_ioctl_properties(struct file *file,
1523 unsigned int cmd, void *parg) 1523 unsigned int cmd, void *parg)
1524{ 1524{
1525 struct dvb_device *dvbdev = file->private_data; 1525 struct dvb_device *dvbdev = file->private_data;
@@ -1555,7 +1555,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
1555 } 1555 }
1556 1556
1557 for (i = 0; i < tvps->num; i++) { 1557 for (i = 0; i < tvps->num; i++) {
1558 (tvp + i)->result = dtv_property_process_set(fe, tvp + i, inode, file); 1558 (tvp + i)->result = dtv_property_process_set(fe, tvp + i, file);
1559 err |= (tvp + i)->result; 1559 err |= (tvp + i)->result;
1560 } 1560 }
1561 1561
@@ -1587,7 +1587,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
1587 } 1587 }
1588 1588
1589 for (i = 0; i < tvps->num; i++) { 1589 for (i = 0; i < tvps->num; i++) {
1590 (tvp + i)->result = dtv_property_process_get(fe, tvp + i, inode, file); 1590 (tvp + i)->result = dtv_property_process_get(fe, tvp + i, file);
1591 err |= (tvp + i)->result; 1591 err |= (tvp + i)->result;
1592 } 1592 }
1593 1593
@@ -1604,7 +1604,7 @@ out:
1604 return err; 1604 return err;
1605} 1605}
1606 1606
1607static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, 1607static int dvb_frontend_ioctl_legacy(struct file *file,
1608 unsigned int cmd, void *parg) 1608 unsigned int cmd, void *parg)
1609{ 1609{
1610 struct dvb_device *dvbdev = file->private_data; 1610 struct dvb_device *dvbdev = file->private_data;
@@ -2031,7 +2031,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file)
2031 2031
2032static const struct file_operations dvb_frontend_fops = { 2032static const struct file_operations dvb_frontend_fops = {
2033 .owner = THIS_MODULE, 2033 .owner = THIS_MODULE,
2034 .ioctl = dvb_generic_ioctl, 2034 .unlocked_ioctl = dvb_generic_ioctl,
2035 .poll = dvb_frontend_poll, 2035 .poll = dvb_frontend_poll,
2036 .open = dvb_frontend_open, 2036 .open = dvb_frontend_open,
2037 .release = dvb_frontend_release 2037 .release = dvb_frontend_release
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index cccea412088b..f6dac2bb0ac6 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -59,6 +59,7 @@
59#include <linux/netdevice.h> 59#include <linux/netdevice.h>
60#include <linux/etherdevice.h> 60#include <linux/etherdevice.h>
61#include <linux/dvb/net.h> 61#include <linux/dvb/net.h>
62#include <linux/smp_lock.h>
62#include <linux/uio.h> 63#include <linux/uio.h>
63#include <asm/uaccess.h> 64#include <asm/uaccess.h>
64#include <linux/crc32.h> 65#include <linux/crc32.h>
@@ -1329,7 +1330,7 @@ static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned long num)
1329 return 0; 1330 return 0;
1330} 1331}
1331 1332
1332static int dvb_net_do_ioctl(struct inode *inode, struct file *file, 1333static int dvb_net_do_ioctl(struct file *file,
1333 unsigned int cmd, void *parg) 1334 unsigned int cmd, void *parg)
1334{ 1335{
1335 struct dvb_device *dvbdev = file->private_data; 1336 struct dvb_device *dvbdev = file->private_data;
@@ -1431,10 +1432,16 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file,
1431 return 0; 1432 return 0;
1432} 1433}
1433 1434
1434static int dvb_net_ioctl(struct inode *inode, struct file *file, 1435static long dvb_net_ioctl(struct file *file,
1435 unsigned int cmd, unsigned long arg) 1436 unsigned int cmd, unsigned long arg)
1436{ 1437{
1437 return dvb_usercopy(inode, file, cmd, arg, dvb_net_do_ioctl); 1438 int ret;
1439
1440 lock_kernel();
1441 ret = dvb_usercopy(file, cmd, arg, dvb_net_do_ioctl);
1442 unlock_kernel();
1443
1444 return ret;
1438} 1445}
1439 1446
1440static int dvb_net_close(struct inode *inode, struct file *file) 1447static int dvb_net_close(struct inode *inode, struct file *file)
@@ -1455,7 +1462,7 @@ static int dvb_net_close(struct inode *inode, struct file *file)
1455 1462
1456static const struct file_operations dvb_net_fops = { 1463static const struct file_operations dvb_net_fops = {
1457 .owner = THIS_MODULE, 1464 .owner = THIS_MODULE,
1458 .ioctl = dvb_net_ioctl, 1465 .unlocked_ioctl = dvb_net_ioctl,
1459 .open = dvb_generic_open, 1466 .open = dvb_generic_open,
1460 .release = dvb_net_close, 1467 .release = dvb_net_close,
1461}; 1468};
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)
154EXPORT_SYMBOL(dvb_generic_release); 154EXPORT_SYMBOL(dvb_generic_release);
155 155
156 156
157int dvb_generic_ioctl(struct inode *inode, struct file *file, 157long 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}
170EXPORT_SYMBOL(dvb_generic_ioctl); 175EXPORT_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...) */
380int dvb_usercopy(struct inode *inode, struct file *file, 385int 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)
diff --git a/drivers/media/dvb/dvb-core/dvbdev.h b/drivers/media/dvb/dvb-core/dvbdev.h
index f7b499d4a3c0..fcc6ae98745e 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.h
+++ b/drivers/media/dvb/dvb-core/dvbdev.h
@@ -116,8 +116,7 @@ struct dvb_device {
116 116
117 wait_queue_head_t wait_queue; 117 wait_queue_head_t wait_queue;
118 /* don't really need those !? -- FIXME: use video_usercopy */ 118 /* don't really need those !? -- FIXME: use video_usercopy */
119 int (*kernel_ioctl)(struct inode *inode, struct file *file, 119 int (*kernel_ioctl)(struct file *file, unsigned int cmd, void *arg);
120 unsigned int cmd, void *arg);
121 120
122 void *priv; 121 void *priv;
123}; 122};
@@ -138,17 +137,15 @@ extern void dvb_unregister_device (struct dvb_device *dvbdev);
138 137
139extern int dvb_generic_open (struct inode *inode, struct file *file); 138extern int dvb_generic_open (struct inode *inode, struct file *file);
140extern int dvb_generic_release (struct inode *inode, struct file *file); 139extern int dvb_generic_release (struct inode *inode, struct file *file);
141extern int dvb_generic_ioctl (struct inode *inode, struct file *file, 140extern long dvb_generic_ioctl (struct file *file,
142 unsigned int cmd, unsigned long arg); 141 unsigned int cmd, unsigned long arg);
143 142
144/* we don't mess with video_usercopy() any more, 143/* we don't mess with video_usercopy() any more,
145we simply define out own dvb_usercopy(), which will hopefully become 144we simply define out own dvb_usercopy(), which will hopefully become
146generic_usercopy() someday... */ 145generic_usercopy() someday... */
147 146
148extern int dvb_usercopy(struct inode *inode, struct file *file, 147extern int dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
149 unsigned int cmd, unsigned long arg, 148 int (*func)(struct file *file, unsigned int cmd, void *arg));
150 int (*func)(struct inode *inode, struct file *file,
151 unsigned int cmd, void *arg));
152 149
153/** generic DVB attach function. */ 150/** generic DVB attach function. */
154#ifdef CONFIG_MEDIA_ATTACH 151#ifdef CONFIG_MEDIA_ATTACH
diff --git a/drivers/media/dvb/firewire/firedtv-ci.c b/drivers/media/dvb/firewire/firedtv-ci.c
index 853e04b7cb36..d3c2cf60de76 100644
--- a/drivers/media/dvb/firewire/firedtv-ci.c
+++ b/drivers/media/dvb/firewire/firedtv-ci.c
@@ -175,8 +175,7 @@ static int fdtv_ca_send_msg(struct firedtv *fdtv, void *arg)
175 return err; 175 return err;
176} 176}
177 177
178static int fdtv_ca_ioctl(struct inode *inode, struct file *file, 178static int fdtv_ca_ioctl(struct file *file, unsigned int cmd, void *arg)
179 unsigned int cmd, void *arg)
180{ 179{
181 struct dvb_device *dvbdev = file->private_data; 180 struct dvb_device *dvbdev = file->private_data;
182 struct firedtv *fdtv = dvbdev->priv; 181 struct firedtv *fdtv = dvbdev->priv;
@@ -217,7 +216,7 @@ static unsigned int fdtv_ca_io_poll(struct file *file, poll_table *wait)
217 216
218static const struct file_operations fdtv_ca_fops = { 217static const struct file_operations fdtv_ca_fops = {
219 .owner = THIS_MODULE, 218 .owner = THIS_MODULE,
220 .ioctl = dvb_generic_ioctl, 219 .unlocked_ioctl = dvb_generic_ioctl,
221 .open = dvb_generic_open, 220 .open = dvb_generic_open,
222 .release = dvb_generic_release, 221 .release = dvb_generic_release,
223 .poll = fdtv_ca_io_poll, 222 .poll = fdtv_ca_io_poll,
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 38915591c6e5..a6be529eec5c 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -708,7 +708,7 @@ static void gpioirq(unsigned long cookie)
708 708
709 709
710#ifdef CONFIG_DVB_AV7110_OSD 710#ifdef CONFIG_DVB_AV7110_OSD
711static int dvb_osd_ioctl(struct inode *inode, struct file *file, 711static int dvb_osd_ioctl(struct file *file,
712 unsigned int cmd, void *parg) 712 unsigned int cmd, void *parg)
713{ 713{
714 struct dvb_device *dvbdev = file->private_data; 714 struct dvb_device *dvbdev = file->private_data;
@@ -727,7 +727,7 @@ static int dvb_osd_ioctl(struct inode *inode, struct file *file,
727 727
728static const struct file_operations dvb_osd_fops = { 728static const struct file_operations dvb_osd_fops = {
729 .owner = THIS_MODULE, 729 .owner = THIS_MODULE,
730 .ioctl = dvb_generic_ioctl, 730 .unlocked_ioctl = dvb_generic_ioctl,
731 .open = dvb_generic_open, 731 .open = dvb_generic_open,
732 .release = dvb_generic_release, 732 .release = dvb_generic_release,
733}; 733};
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c
index 53884814161c..13efba942dac 100644
--- a/drivers/media/dvb/ttpci/av7110_av.c
+++ b/drivers/media/dvb/ttpci/av7110_av.c
@@ -1089,7 +1089,7 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len
1089} 1089}
1090 1090
1091 1091
1092static int dvb_video_ioctl(struct inode *inode, struct file *file, 1092static int dvb_video_ioctl(struct file *file,
1093 unsigned int cmd, void *parg) 1093 unsigned int cmd, void *parg)
1094{ 1094{
1095 struct dvb_device *dvbdev = file->private_data; 1095 struct dvb_device *dvbdev = file->private_data;
@@ -1297,7 +1297,7 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
1297 return ret; 1297 return ret;
1298} 1298}
1299 1299
1300static int dvb_audio_ioctl(struct inode *inode, struct file *file, 1300static int dvb_audio_ioctl(struct file *file,
1301 unsigned int cmd, void *parg) 1301 unsigned int cmd, void *parg)
1302{ 1302{
1303 struct dvb_device *dvbdev = file->private_data; 1303 struct dvb_device *dvbdev = file->private_data;
@@ -1517,7 +1517,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file)
1517static const struct file_operations dvb_video_fops = { 1517static const struct file_operations dvb_video_fops = {
1518 .owner = THIS_MODULE, 1518 .owner = THIS_MODULE,
1519 .write = dvb_video_write, 1519 .write = dvb_video_write,
1520 .ioctl = dvb_generic_ioctl, 1520 .unlocked_ioctl = dvb_generic_ioctl,
1521 .open = dvb_video_open, 1521 .open = dvb_video_open,
1522 .release = dvb_video_release, 1522 .release = dvb_video_release,
1523 .poll = dvb_video_poll, 1523 .poll = dvb_video_poll,
@@ -1535,7 +1535,7 @@ static struct dvb_device dvbdev_video = {
1535static const struct file_operations dvb_audio_fops = { 1535static const struct file_operations dvb_audio_fops = {
1536 .owner = THIS_MODULE, 1536 .owner = THIS_MODULE,
1537 .write = dvb_audio_write, 1537 .write = dvb_audio_write,
1538 .ioctl = dvb_generic_ioctl, 1538 .unlocked_ioctl = dvb_generic_ioctl,
1539 .open = dvb_audio_open, 1539 .open = dvb_audio_open,
1540 .release = dvb_audio_release, 1540 .release = dvb_audio_release,
1541 .poll = dvb_audio_poll, 1541 .poll = dvb_audio_poll,
diff --git a/drivers/media/dvb/ttpci/av7110_ca.c b/drivers/media/dvb/ttpci/av7110_ca.c
index ac7779c45c5b..4eba35a018e3 100644
--- a/drivers/media/dvb/ttpci/av7110_ca.c
+++ b/drivers/media/dvb/ttpci/av7110_ca.c
@@ -248,8 +248,7 @@ static unsigned int dvb_ca_poll (struct file *file, poll_table *wait)
248 return mask; 248 return mask;
249} 249}
250 250
251static int dvb_ca_ioctl(struct inode *inode, struct file *file, 251static int dvb_ca_ioctl(struct file *file, unsigned int cmd, void *parg)
252 unsigned int cmd, void *parg)
253{ 252{
254 struct dvb_device *dvbdev = file->private_data; 253 struct dvb_device *dvbdev = file->private_data;
255 struct av7110 *av7110 = dvbdev->priv; 254 struct av7110 *av7110 = dvbdev->priv;
@@ -350,7 +349,7 @@ static const struct file_operations dvb_ca_fops = {
350 .owner = THIS_MODULE, 349 .owner = THIS_MODULE,
351 .read = dvb_ca_read, 350 .read = dvb_ca_read,
352 .write = dvb_ca_write, 351 .write = dvb_ca_write,
353 .ioctl = dvb_generic_ioctl, 352 .unlocked_ioctl = dvb_generic_ioctl,
354 .open = dvb_ca_open, 353 .open = dvb_ca_open,
355 .release = dvb_generic_release, 354 .release = dvb_generic_release,
356 .poll = dvb_ca_poll, 355 .poll = dvb_ca_poll,