diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-core/dmxdev.c | 31 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_ca_en50221.c | 17 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 30 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_net.c | 15 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvbdev.c | 17 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvbdev.h | 11 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-ci.c | 5 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_av.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_ca.c | 5 |
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 | ||
966 | static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, | 967 | static 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 | ||
1087 | static int dvb_demux_ioctl(struct inode *inode, struct file *file, | 1088 | static 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 | ||
1093 | static unsigned int dvb_demux_poll(struct file *file, poll_table *wait) | 1100 | static 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) | |||
1139 | static const struct file_operations dvb_demux_fops = { | 1146 | static 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 | ||
1155 | static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file, | 1162 | static 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 | ||
1179 | static int dvb_dvr_ioctl(struct inode *inode, struct file *file, | 1186 | static 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 | ||
1185 | static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait) | 1198 | static 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 | */ |
1184 | static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, | 1185 | static 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 | */ |
1258 | static int dvb_ca_en50221_io_ioctl(struct inode *inode, struct file *file, | 1259 | static 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 55ea260572bf..5450d1f7a538 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 | ||
@@ -1188,14 +1189,14 @@ static void dtv_property_cache_submit(struct dvb_frontend *fe) | |||
1188 | } | 1189 | } |
1189 | } | 1190 | } |
1190 | 1191 | ||
1191 | static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, | 1192 | static int dvb_frontend_ioctl_legacy(struct file *file, |
1192 | unsigned int cmd, void *parg); | 1193 | unsigned int cmd, void *parg); |
1193 | static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, | 1194 | static int dvb_frontend_ioctl_properties(struct file *file, |
1194 | unsigned int cmd, void *parg); | 1195 | unsigned int cmd, void *parg); |
1195 | 1196 | ||
1196 | static int dtv_property_process_get(struct dvb_frontend *fe, | 1197 | static int dtv_property_process_get(struct dvb_frontend *fe, |
1197 | struct dtv_property *tvp, | 1198 | struct dtv_property *tvp, |
1198 | struct inode *inode, struct file *file) | 1199 | struct file *file) |
1199 | { | 1200 | { |
1200 | int r = 0; | 1201 | int r = 0; |
1201 | 1202 | ||
@@ -1328,7 +1329,6 @@ static int dtv_property_process_get(struct dvb_frontend *fe, | |||
1328 | 1329 | ||
1329 | static int dtv_property_process_set(struct dvb_frontend *fe, | 1330 | static int dtv_property_process_set(struct dvb_frontend *fe, |
1330 | struct dtv_property *tvp, | 1331 | struct dtv_property *tvp, |
1331 | struct inode *inode, | ||
1332 | struct file *file) | 1332 | struct file *file) |
1333 | { | 1333 | { |
1334 | int r = 0; | 1334 | int r = 0; |
@@ -1359,7 +1359,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe, | |||
1359 | dprintk("%s() Finalised property cache\n", __func__); | 1359 | dprintk("%s() Finalised property cache\n", __func__); |
1360 | dtv_property_cache_submit(fe); | 1360 | dtv_property_cache_submit(fe); |
1361 | 1361 | ||
1362 | r |= dvb_frontend_ioctl_legacy(inode, file, FE_SET_FRONTEND, | 1362 | r |= dvb_frontend_ioctl_legacy(file, FE_SET_FRONTEND, |
1363 | &fepriv->parameters); | 1363 | &fepriv->parameters); |
1364 | break; | 1364 | break; |
1365 | case DTV_FREQUENCY: | 1365 | case DTV_FREQUENCY: |
@@ -1391,12 +1391,12 @@ static int dtv_property_process_set(struct dvb_frontend *fe, | |||
1391 | break; | 1391 | break; |
1392 | case DTV_VOLTAGE: | 1392 | case DTV_VOLTAGE: |
1393 | fe->dtv_property_cache.voltage = tvp->u.data; | 1393 | fe->dtv_property_cache.voltage = tvp->u.data; |
1394 | r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_VOLTAGE, | 1394 | r = dvb_frontend_ioctl_legacy(file, FE_SET_VOLTAGE, |
1395 | (void *)fe->dtv_property_cache.voltage); | 1395 | (void *)fe->dtv_property_cache.voltage); |
1396 | break; | 1396 | break; |
1397 | case DTV_TONE: | 1397 | case DTV_TONE: |
1398 | fe->dtv_property_cache.sectone = tvp->u.data; | 1398 | fe->dtv_property_cache.sectone = tvp->u.data; |
1399 | r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_TONE, | 1399 | r = dvb_frontend_ioctl_legacy(file, FE_SET_TONE, |
1400 | (void *)fe->dtv_property_cache.sectone); | 1400 | (void *)fe->dtv_property_cache.sectone); |
1401 | break; | 1401 | break; |
1402 | case DTV_CODE_RATE_HP: | 1402 | case DTV_CODE_RATE_HP: |
@@ -1480,7 +1480,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe, | |||
1480 | return r; | 1480 | return r; |
1481 | } | 1481 | } |
1482 | 1482 | ||
1483 | static int dvb_frontend_ioctl(struct inode *inode, struct file *file, | 1483 | static int dvb_frontend_ioctl(struct file *file, |
1484 | unsigned int cmd, void *parg) | 1484 | unsigned int cmd, void *parg) |
1485 | { | 1485 | { |
1486 | struct dvb_device *dvbdev = file->private_data; | 1486 | struct dvb_device *dvbdev = file->private_data; |
@@ -1502,17 +1502,17 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, | |||
1502 | return -ERESTARTSYS; | 1502 | return -ERESTARTSYS; |
1503 | 1503 | ||
1504 | if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) | 1504 | if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) |
1505 | err = dvb_frontend_ioctl_properties(inode, file, cmd, parg); | 1505 | err = dvb_frontend_ioctl_properties(file, cmd, parg); |
1506 | else { | 1506 | else { |
1507 | fe->dtv_property_cache.state = DTV_UNDEFINED; | 1507 | fe->dtv_property_cache.state = DTV_UNDEFINED; |
1508 | err = dvb_frontend_ioctl_legacy(inode, file, cmd, parg); | 1508 | err = dvb_frontend_ioctl_legacy(file, cmd, parg); |
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | up(&fepriv->sem); | 1511 | up(&fepriv->sem); |
1512 | return err; | 1512 | return err; |
1513 | } | 1513 | } |
1514 | 1514 | ||
1515 | static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, | 1515 | static int dvb_frontend_ioctl_properties(struct file *file, |
1516 | unsigned int cmd, void *parg) | 1516 | unsigned int cmd, void *parg) |
1517 | { | 1517 | { |
1518 | struct dvb_device *dvbdev = file->private_data; | 1518 | struct dvb_device *dvbdev = file->private_data; |
@@ -1548,7 +1548,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, | |||
1548 | } | 1548 | } |
1549 | 1549 | ||
1550 | for (i = 0; i < tvps->num; i++) { | 1550 | for (i = 0; i < tvps->num; i++) { |
1551 | (tvp + i)->result = dtv_property_process_set(fe, tvp + i, inode, file); | 1551 | (tvp + i)->result = dtv_property_process_set(fe, tvp + i, file); |
1552 | err |= (tvp + i)->result; | 1552 | err |= (tvp + i)->result; |
1553 | } | 1553 | } |
1554 | 1554 | ||
@@ -1580,7 +1580,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, | |||
1580 | } | 1580 | } |
1581 | 1581 | ||
1582 | for (i = 0; i < tvps->num; i++) { | 1582 | for (i = 0; i < tvps->num; i++) { |
1583 | (tvp + i)->result = dtv_property_process_get(fe, tvp + i, inode, file); | 1583 | (tvp + i)->result = dtv_property_process_get(fe, tvp + i, file); |
1584 | err |= (tvp + i)->result; | 1584 | err |= (tvp + i)->result; |
1585 | } | 1585 | } |
1586 | 1586 | ||
@@ -1597,7 +1597,7 @@ out: | |||
1597 | return err; | 1597 | return err; |
1598 | } | 1598 | } |
1599 | 1599 | ||
1600 | static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, | 1600 | static int dvb_frontend_ioctl_legacy(struct file *file, |
1601 | unsigned int cmd, void *parg) | 1601 | unsigned int cmd, void *parg) |
1602 | { | 1602 | { |
1603 | struct dvb_device *dvbdev = file->private_data; | 1603 | struct dvb_device *dvbdev = file->private_data; |
@@ -2022,7 +2022,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file) | |||
2022 | 2022 | ||
2023 | static const struct file_operations dvb_frontend_fops = { | 2023 | static const struct file_operations dvb_frontend_fops = { |
2024 | .owner = THIS_MODULE, | 2024 | .owner = THIS_MODULE, |
2025 | .ioctl = dvb_generic_ioctl, | 2025 | .unlocked_ioctl = dvb_generic_ioctl, |
2026 | .poll = dvb_frontend_poll, | 2026 | .poll = dvb_frontend_poll, |
2027 | .open = dvb_frontend_open, | 2027 | .open = dvb_frontend_open, |
2028 | .release = dvb_frontend_release | 2028 | .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 441c0642b30a..a96eee38d60c 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> |
@@ -1333,7 +1334,7 @@ static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned long num) | |||
1333 | return 0; | 1334 | return 0; |
1334 | } | 1335 | } |
1335 | 1336 | ||
1336 | static int dvb_net_do_ioctl(struct inode *inode, struct file *file, | 1337 | static int dvb_net_do_ioctl(struct file *file, |
1337 | unsigned int cmd, void *parg) | 1338 | unsigned int cmd, void *parg) |
1338 | { | 1339 | { |
1339 | struct dvb_device *dvbdev = file->private_data; | 1340 | struct dvb_device *dvbdev = file->private_data; |
@@ -1435,10 +1436,16 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file, | |||
1435 | return 0; | 1436 | return 0; |
1436 | } | 1437 | } |
1437 | 1438 | ||
1438 | static int dvb_net_ioctl(struct inode *inode, struct file *file, | 1439 | static long dvb_net_ioctl(struct file *file, |
1439 | unsigned int cmd, unsigned long arg) | 1440 | unsigned int cmd, unsigned long arg) |
1440 | { | 1441 | { |
1441 | return dvb_usercopy(inode, file, cmd, arg, dvb_net_do_ioctl); | 1442 | int ret; |
1443 | |||
1444 | lock_kernel(); | ||
1445 | ret = dvb_usercopy(file, cmd, arg, dvb_net_do_ioctl); | ||
1446 | unlock_kernel(); | ||
1447 | |||
1448 | return ret; | ||
1442 | } | 1449 | } |
1443 | 1450 | ||
1444 | static int dvb_net_close(struct inode *inode, struct file *file) | 1451 | static int dvb_net_close(struct inode *inode, struct file *file) |
@@ -1459,7 +1466,7 @@ static int dvb_net_close(struct inode *inode, struct file *file) | |||
1459 | 1466 | ||
1460 | static const struct file_operations dvb_net_fops = { | 1467 | static const struct file_operations dvb_net_fops = { |
1461 | .owner = THIS_MODULE, | 1468 | .owner = THIS_MODULE, |
1462 | .ioctl = dvb_net_ioctl, | 1469 | .unlocked_ioctl = dvb_net_ioctl, |
1463 | .open = dvb_generic_open, | 1470 | .open = dvb_generic_open, |
1464 | .release = dvb_net_close, | 1471 | .release = dvb_net_close, |
1465 | }; | 1472 | }; |
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) |
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 | ||
139 | extern int dvb_generic_open (struct inode *inode, struct file *file); | 138 | extern int dvb_generic_open (struct inode *inode, struct file *file); |
140 | extern int dvb_generic_release (struct inode *inode, struct file *file); | 139 | extern int dvb_generic_release (struct inode *inode, struct file *file); |
141 | extern int dvb_generic_ioctl (struct inode *inode, struct file *file, | 140 | extern 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, |
145 | we simply define out own dvb_usercopy(), which will hopefully become | 144 | we simply define out own dvb_usercopy(), which will hopefully become |
146 | generic_usercopy() someday... */ | 145 | generic_usercopy() someday... */ |
147 | 146 | ||
148 | extern int dvb_usercopy(struct inode *inode, struct file *file, | 147 | extern 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 | ||
178 | static int fdtv_ca_ioctl(struct inode *inode, struct file *file, | 178 | static 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 | ||
218 | static const struct file_operations fdtv_ca_fops = { | 217 | static 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 |
711 | static int dvb_osd_ioctl(struct inode *inode, struct file *file, | 711 | static 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 | ||
728 | static const struct file_operations dvb_osd_fops = { | 728 | static 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 | ||
1092 | static int dvb_video_ioctl(struct inode *inode, struct file *file, | 1092 | static 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 | ||
1300 | static int dvb_audio_ioctl(struct inode *inode, struct file *file, | 1300 | static 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) | |||
1517 | static const struct file_operations dvb_video_fops = { | 1517 | static 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 = { | |||
1535 | static const struct file_operations dvb_audio_fops = { | 1535 | static 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 | ||
251 | static int dvb_ca_ioctl(struct inode *inode, struct file *file, | 251 | static 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, |