aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/dv1394.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/dv1394.c')
-rw-r--r--drivers/ieee1394/dv1394.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
index 6c72f04b2b5d..1084da4d88a9 100644
--- a/drivers/ieee1394/dv1394.c
+++ b/drivers/ieee1394/dv1394.c
@@ -1536,27 +1536,20 @@ static ssize_t dv1394_read(struct file *file, char __user *buffer, size_t count
1536 1536
1537static long dv1394_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 1537static long dv1394_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1538{ 1538{
1539 struct video_card *video; 1539 struct video_card *video = file_to_video_card(file);
1540 unsigned long flags; 1540 unsigned long flags;
1541 int ret = -EINVAL; 1541 int ret = -EINVAL;
1542 void __user *argp = (void __user *)arg; 1542 void __user *argp = (void __user *)arg;
1543 1543
1544 DECLARE_WAITQUEUE(wait, current); 1544 DECLARE_WAITQUEUE(wait, current);
1545 1545
1546 lock_kernel();
1547 video = file_to_video_card(file);
1548
1549 /* serialize this to prevent multi-threaded mayhem */ 1546 /* serialize this to prevent multi-threaded mayhem */
1550 if (file->f_flags & O_NONBLOCK) { 1547 if (file->f_flags & O_NONBLOCK) {
1551 if (!mutex_trylock(&video->mtx)) { 1548 if (!mutex_trylock(&video->mtx))
1552 unlock_kernel();
1553 return -EAGAIN; 1549 return -EAGAIN;
1554 }
1555 } else { 1550 } else {
1556 if (mutex_lock_interruptible(&video->mtx)) { 1551 if (mutex_lock_interruptible(&video->mtx))
1557 unlock_kernel();
1558 return -ERESTARTSYS; 1552 return -ERESTARTSYS;
1559 }
1560 } 1553 }
1561 1554
1562 switch(cmd) 1555 switch(cmd)
@@ -1780,7 +1773,6 @@ static long dv1394_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1780 1773
1781 out: 1774 out:
1782 mutex_unlock(&video->mtx); 1775 mutex_unlock(&video->mtx);
1783 unlock_kernel();
1784 return ret; 1776 return ret;
1785} 1777}
1786 1778
@@ -2188,12 +2180,8 @@ static struct ieee1394_device_id dv1394_id_table[] = {
2188MODULE_DEVICE_TABLE(ieee1394, dv1394_id_table); 2180MODULE_DEVICE_TABLE(ieee1394, dv1394_id_table);
2189 2181
2190static struct hpsb_protocol_driver dv1394_driver = { 2182static struct hpsb_protocol_driver dv1394_driver = {
2191 .name = "DV/1394 Driver", 2183 .name = "dv1394",
2192 .id_table = dv1394_id_table, 2184 .id_table = dv1394_id_table,
2193 .driver = {
2194 .name = "dv1394",
2195 .bus = &ieee1394_bus_type,
2196 },
2197}; 2185};
2198 2186
2199 2187
@@ -2587,6 +2575,10 @@ static int __init dv1394_init_module(void)
2587{ 2575{
2588 int ret; 2576 int ret;
2589 2577
2578 printk(KERN_WARNING
2579 "WARNING: The dv1394 driver is unsupported and will be removed "
2580 "from Linux soon. Use raw1394 instead.\n");
2581
2590 cdev_init(&dv1394_cdev, &dv1394_fops); 2582 cdev_init(&dv1394_cdev, &dv1394_fops);
2591 dv1394_cdev.owner = THIS_MODULE; 2583 dv1394_cdev.owner = THIS_MODULE;
2592 kobject_set_name(&dv1394_cdev.kobj, "dv1394"); 2584 kobject_set_name(&dv1394_cdev.kobj, "dv1394");