diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 16:18:46 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 16:18:46 -0800 |
commit | c99767974ebd2a719d849fdeaaa1674456f5283f (patch) | |
tree | 571d49bd7872697ab28b0aeb4f79fe9c2a5cb9bd /drivers/ieee1394/dv1394.c | |
parent | ea14fad0d416354a4e9bb1a04f32acba706f9548 (diff) | |
parent | ec9b7e1044d718723d16390179abc6d4c8d9b0a1 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (55 commits)
ieee1394: sbp2: code formatting around work_struct stuff
ieee1394: nodemgr: remove a kcalloc
ieee1394: conditionally export ieee1394_bus_type
ieee1394: Consolidate driver registering
ieee1394: sbp2: convert from PCI DMA to generic DMA
ieee1394: nodemgr: spaces to tabs
ieee1394: nodemgr: fix deadlock in shutdown
ieee1394: nodemgr: remove duplicate assignment
sbp2: make 1bit bitfield unsigned
ieee1394: schedule *_oui sysfs attributes for removal
ieee1394: schedule unused symbol exports for removal
ieee1394: dv1394: schedule for feature removal
ieee1394: raw1394: defer feature removal of old isoch interface
ieee1394: ohci1394: call PMac code in shutdown only for proper machines
ieee1394: ohci1394: reformat PPC_PMAC platform code
ieee1394: ohci1394: add PPC_PMAC platform code to driver probe
ieee1394: sbp2: wrap two functions into one
ieee1394: sbp2: update comment on things to do
ieee1394: sbp2: use list_move_tail()
ieee1394: sbp2: more concise names for types and variables
...
Diffstat (limited to 'drivers/ieee1394/dv1394.c')
-rw-r--r-- | drivers/ieee1394/dv1394.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index 6c72f04b2b5..1084da4d88a 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 static long dv1394_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { - struct video_card *video; + struct video_card *video = file_to_video_card(file); unsigned long flags; int ret = -EINVAL; void __user *argp = (void __user *)arg; DECLARE_WAITQUEUE(wait, current); - lock_kernel(); - video = file_to_video_card(file); - /* serialize this to prevent multi-threaded mayhem */ if (file->f_flags & O_NONBLOCK) { - if (!mutex_trylock(&video->mtx)) { - unlock_kernel(); + if (!mutex_trylock(&video->mtx)) return -EAGAIN; - } } else { - if (mutex_lock_interruptible(&video->mtx)) { - unlock_kernel(); + if (mutex_lock_interruptible(&video->mtx)) return -ERESTARTSYS; - } } switch(cmd) @@ -1780,7 +1773,6 @@ static long dv1394_ioctl(struct file *file, unsigned int cmd, unsigned long arg) out: mutex_unlock(&video->mtx); - unlock_kernel(); return ret; } @@ -2188,12 +2180,8 @@ static struct ieee1394_device_id dv1394_id_table[] = { MODULE_DEVICE_TABLE(ieee1394, dv1394_id_table); static struct hpsb_protocol_driver dv1394_driver = { - .name = "DV/1394 Driver", + .name = "dv1394", .id_table = dv1394_id_table, - .driver = { - .name = "dv1394", - .bus = &ieee1394_bus_type, - }, }; @@ -2587,6 +2575,10 @@ static int __init dv1394_init_module(void) { int ret; + printk(KERN_WARNING + "WARNING: The dv1394 driver is unsupported and will be removed " + "from Linux soon. Use raw1394 instead.\n"); + cdev_init(&dv1394_cdev, &dv1394_fops); dv1394_cdev.owner = THIS_MODULE; kobject_set_name(&dv1394_cdev.kobj, "dv1394"); |