aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/video1394.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-04-10ieee1394: mark char device files as not seekableStefan Richter1-2/+3
The - raw1394 (/dev/raw1394), - video1394 (/dev/video1394/*), - dv1394 (/dev/dv1394/*) character device file ABIs do not make any use of lseek(), pread(), or pwrite(). Therefore use nonseekable_open() and, redundantly, set file_operations.llseek to no_llseek to remove any doubt whether the BKL- grabbing default_llseek handler is used. Although all this is legacy code which should be left in peace until it is eventually removed (as it is superseded by firewire-core's <linux/firewire-cdev.h> ABI), this change seems still worth doing to further minimize the presence of BKL usage in the kernel. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-10-11headers: remove sched.h from interrupt.hAlexey Dobriyan1-0/+1
After m68k's task_thread_info() doesn't refer to current, it's possible to remove sched.h from interrupt.h and not break m68k! Many thanks to Heiko Carstens for allowing this. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-03-24ieee1394: constify device ID tablesStefan Richter1-1/+1
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-10-16Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6Linus Torvalds1-4/+4
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: firewire: Add more documentation to firewire-cdev.h firewire: fix ioctl() return code firewire: fix setting tag and sy in iso transmission firewire: fw-sbp2: fix another small generation access bug firewire: fw-sbp2: enforce s/g segment size limit firewire: fw_send_request_sync() ieee1394: survive a few seconds connection loss ieee1394: nodemgr clean up class iterators ieee1394: dv1394, video1394: remove unnecessary expressions ieee1394: raw1394: make write() thread-safe ieee1394: raw1394: narrow down the state_mutex protected region ieee1394: raw1394: replace BKL by local mutex, make ioctl() and mmap() thread-safe ieee1394: sbp2: enforce s/g segment size limit ieee1394: sbp2: check for DMA mapping failures ieee1394: sbp2: stricter dma_sync ieee1394: Use DIV_ROUND_UP
2008-10-16device create: ieee1394: convert device_create_drvdata to device_createGreg Kroah-Hartman1-3/+2
Now that device_create() has been audited, rename things back to the original call to be sane. Cc: Ben Collins <ben.collins@ubuntu.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-15ieee1394: dv1394, video1394: remove unnecessary expressionsStefan Richter1-4/+4
init->channel and v.buffer are unsigned and tests for < 0 therefore always false. gcc knows this and eliminates the code, but anyway... Reported by Roel Kluin. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-07-21device create: ieee1394: convert device_create to device_create_drvdataGreg Kroah-Hartman1-3/+3
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Cc: Ben Collins <ben.collins@ubuntu.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-14ieee1394: video1394: reorder module init, prepare BKL removalStefan Richter1-0/+2
This prepares video1394 for removal of the BKL (big kernel lock): It allows video1394_open() to be called while video1394_init_module() is still in progress. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-25ieee1394: silence defined but not used warning in non-modular buildsTony Breeds1-0/+2
Currently the kernel will issue the following warning: drivers/ieee1394/raw1394.c:2938: warning: 'raw1394_id_table' defined but not used Add #ifdef MODULE guards around the declaration. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Ditto with dv1394_id_table and video1394_id_table. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: Remove superfluous calls to kobject_set_name().Robert P. J. Day1-1/+0
Unless you're adding a kobject to the sysfs hierarchy, there is no point setting its kobject name. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-04-18ieee1394: prevent device binding of raw1394, video1394, dv1394Stefan Richter1-2/+1
These drivers don't need to match any unit_directory type device. They just need the id_table for module autoloading per module alias. Not binding any of these drivers allows special-purpose drivers with similar or same IDs to bind to devices. This currently only benefits out-of-tree drivers; on the other hand it is in no way detrimental to in-tree drivers. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10ieee1394: convert ieee1394 from "struct class_device" to "struct device"Kay Sievers1-5/+5
Here is a straightforward conversion to "struct device". The "struct class_device" will be removed from the kernel. It seems to work fine for me with and without CONFIG_SYSFS_DEPRECATED set. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-05-08header cleaning: don't include smp_lock.h when not usedRandy Dunlap1-1/+0
Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12[PATCH] mark struct file_operations const 3Arjan van de Ven1-1/+1
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-08ieee1394: video1394: DMA fixDavid Moore1-0/+8
This together with the phys_to_virt fix in lib/swiotlb.c::swiotlb_sync_sg fixes video1394 DMA on machines with DMA bounce buffers, especially Intel x86-64 machines with > 3GB RAM. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: David Moore <dcm@acm.org> Tested-by: Nicolas Turro <Nicolas.Turro@inrialpes.fr>
2006-12-07ieee1394: Consolidate driver registeringBen Collins1-5/+1
This patch consolidates some bookkeeping for driver registering. It closely models what pci_register_driver() does. The main addition is that the owner of the driver is set, so we get a proper symlink for /sys/bus/ieee1394/driver/*/module. Also moves setting of name and bus type into nodemgr. Because of this, we can remove the EXPORT_SYMBOL for ieee1394_bus_type, since it's now only used in ieee1394.ko. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07video1394: remove BKL contentionDaniel Drake1-24/+6
video1394 does not need to take the BKL. The data structures shared between file_operations and interrupts are already protected through context-specific spinlocks. The only other danger is video1394_release() being called during another operation, however this cannot happen because release is only ever invoked when the last thread has closed the fd. Signed-off-by: Daniel Drake <ddrake@brontes3d.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-12-07video1394: small optimizations to frame retrieval codepathDaniel Drake1-8/+10
Add some GCC branch prediction optimizations to unlikely error/safety conditions in the ioctl handling code commonly called during an application's capture loop. Signed-off-by: Daniel Drake <ddrake@brontes3d.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-09-17ieee1394: safer definition of empty macrosStefan Richter1-1/+1
A deactivated macro, defined as "#define foo(bar)", will result in silent corruption if somebody forgets a semicolon after a call to foo. Replace it by "#define foo(bar) do {} while (0)" which will reveal any respective syntax errors. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-09-17video1394: add poll file operation supportDavid Moore1-1/+37
This patch adds support for the poll file operation to the video1394 driver. Signed-off-by: David Moore <dcm@acm.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-07-03[PATCH] ieee1394: update #include directives in midlayer header filesStefan Richter1-6/+6
Remove unnecessary includes, add missing includes. Use forward type declarations for some structs. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-12video1394: be quietBen Collins1-8/+8
When working with multiple cameras and intensive applications, our logs get flooded with video1394 information which isn't of much interest. Any objections to demoting these messages to debug messages? Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-03-28ieee1394: remove devfs supportStefan Richter1-15/+1
Devfs has been disabled in the last kernel releases, so let's remove it from ieee1394core, raw1394, video1394, dv1394. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Cc: Dan Dennedy <dan@dennedy.org> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2006-02-28[PATCH] video1394: fix "return E;" typoAlexey Dobriyan1-1/+1
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Ben Collins <bcollins@debian.org> Cc: Jody McIntyre <scjody@modernduck.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10[PATCH] don't include ioctl32.h in driversChristoph Hellwig1-1/+0
These days ioctl32.h is only used for communication of fs/compat.c and fs/compat_ioctl.c and doesn't contain anything of interest to drivers. Remove inclusion in various drivers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-19Fix incorrect video1394 timestamps.Damien Douxchamps1-15/+2
This patch fixes the incoherent timestamps generated by video1394 since the single-buffer patch was applied in 2.6.11. Credits have also been removed from the header and a "//" comment was changed to "/* */". Signed-off-by: Damien Douxchamps <ddouxchamps@users.sf.net> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-07Remove definitions of unreferenced macros virt_to_page and vmalloc_32 fromStefan Richter1-8/+0
dv1394 and video1394. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-11-07kmalloc/kzalloc changes:Stefan Richter1-55/+26
dv1394, eth1394, ieee1394, ohci1394, pcilynx, raw1394, sbp2c, video1394: - use kzalloc - provide safer size arguments to kmalloc and kzalloc - omit some casts Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
2005-10-28[PATCH] Driver Core: fix up all callers of class_device_create()Greg Kroah-Hartman1-1/+1
The previous patch adding the ability to nest struct class_device changed the paramaters to the call class_device_create(). This patch fixes up all in-kernel users of the function. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-30[PATCH] ieee1394: delete legacy module aliasesJody McIntyre1-1/+0
amdtp, dv1394, raw1394, video1394: Delete legacy module aliases. The macros did not work and the aliases are not needed nowadays. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Ben Collins <bcollins@debian.org> Signed-off-by: Jody McIntyre <scjody@steamballoon.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09[PATCH] trivial __user cleanup (video1394)viro@ZenIV.linux.org.uk1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-20[PATCH] class: convert drivers/ieee1394/* to use the new class api instead of class_simplegregkh@suse.de1-2/+2
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-05-17[PATCH] ieee1394: single buffer fixes to video1394Jody McIntyre1-25/+85
Apply and fixup patch from Markus Tavenrath <speedygoo@speedygoo.de> for video1394 to allow only a single buffer on receive and two buffers on transmit. Tested with libdc1394 and dvconnect (libdv). Signed-off-by: Dan Dennedy <dan@dennedy.org> Signed-off-by: Jody McIntyre <scjody@steamballoon.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17[PATCH] ieee1394: remove NULL checks for kfreeJody McIntyre1-21/+8
This patch removes redundant NULL pointer checks before kfree() in all of drivers/ieee1394/ Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Jody McIntyre <scjody@steamballoon.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+1527
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!