summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/v4l2-dev.c
AgeCommit message (Collapse)Author
2008-08-30v4l2-dev: replace panic with BUGHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-29v4l2: use register_chrdev_region instead of register_chrdevHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Replace the old register_chrdev with the more flexible register_chrdev_region. Ensure that the release() is called when the very last chardev usage was released, and not when the sysfs devices were removed. This should simplify hotpluggable drivers considerably. Tested-by: Mike Isely <isely@isely.net> Tested-by: Laurent Pinchart <laurent.pinchart@skynet.be> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: David Ellingsworth <david@identd.dyndns.org> Reviewed-by: Hans de Goede <j.w.r.degoede@hhs.nl>
2008-08-29merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-devMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-08-22V4L: check inval in video_register_device_index()Mauro Carvalho Chehab
From: Henrik Kretzschmar <henne@nachtwindheim.de> Better check the video_device pointer before using it. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-08-24v4l2-dev: do not clear the driver_data fieldHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The driver_data field of the device structure was zeroed, thus losing this information. Many drivers set this up before calling video_device_register, so we have to ensure that it isn't lost. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-23v4l2-dev: cleanups and add video_drvdata helper functionHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Cleanup v4l2-dev.[ch], add/improve comments and add a new helper function: video_drvdata() that can get the private driver data from a file struct. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-23v4l2-dev: make the video_device's release callback mandatoryHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Now that all drivers set the release callback in the video_device struct we can put in a BUG_ON in video_register_device to ensure that the callback is always there. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-23v4l2-dev: add video_device_release_emptyHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Add a second release function: video_device_release_empty It can be used by drivers that have statically allocated video_device structs. Its use usually, but not always, indicates laziness on the part of the driver programmer. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-23v4l2-dev: remove obsolete video_exclusive_open/releaseHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-09V4L: fix return value of register video funcMauro Carvalho Chehab
From: Henrik Kretzschmar <henne@nachtwindheim.de> If a wrong device type is used with video_register_device_index() it should better return an error number, instead of a constant. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-08-12v4l2: fix for kernels <= 2.6.17Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> class and devt should also be set for kernels 2.6.16 and 2.6.17. This was the case originally, but unfortunately an earlier patch of mine inadvertently left in an incorrect #if/#endif pair. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-04backport changeset c9b1a9b0ec5cc30279fd51ea11f04432683961ccMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Author: Randy Dunlap <randy.dunlap@oracle.com> Date: Mon Jul 28 15:39:38 2008 -0300 V4L/DVB (8549a): fix kernel-doc warning, function name, and docbook filename Change function name in kernel-doc and add kernel-doc for parameter @index: Warning(linhead//drivers/media/video/videodev.c:2090): No description found for parameter 'index' Also change source file name in DocBook/videobook.tmpl to match the new source file name. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-30v4l: move BKL down to the driver level.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The BKL is now moved from the video_open function in v4l2-dev.c to the various drivers. It seems about a third of the drivers already has a lock of some sort protecting the open(), another third uses video_exclusive_open (yuck!) and the last third required adding the BKL in their open function. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-26v4l2-dev: remove unused type and type2 field from video_deviceHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The type and type2 fields were unused and so could be removed. Instead add a vfl_type field that contains the type of the video device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-20videodev: renamed 'class_dev' to 'dev'Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The class_dev field is a normal device, not a class device. This is very confusing and now that the old 'dev' field has been renamed to 'parent' we can rename 'class_dev' to just 'dev'. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-20videodev: rename 'dev' to 'parent'Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The field 'dev' is not the video device, but the parent of the video device. Rename accordingly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-20videodev: split off the ioctl handling into v4l2-ioctl.cHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> videodev.c became top-heavy so all the ioctl processing has been split off into v4l2-ioctl.c. This means videodev.c is back to its original purpose: creating and registering v4l devices. Since videodev.c and v4l2-ioctl.c should still remain one module (as least for now) I also had to rename videodev.c to v4l2-dev.c to prevent a circular dependency when building a videodev.ko module. This is not a bad thing, since the source and header now have the same name. And the v4l2- prefix is useful to see which sources are generic v4l2 support code. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>