Age | Commit message (Collapse) | Author |
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg
and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr.
This simplifies this API substantially.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
kernel-sync:
Author: Alexey Dobriyan <adobriyan@gmail.com>
Date: Sat Jul 11 22:08:37 2009 +0400
headers: smp_lock.h redux
* Remove smp_lock.h from files which don't need it (including some headers!)
* Add smp_lock.h to files which do need it
* Make smp_lock.h include conditional in hardirq.h
It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT
This will make hardirq.h inclusion cheaper for every PREEMPT=n config
(which includes allmodconfig/allyesconfig, BTW)
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Jean Delvare <khali@linux-fr.org>
Add missing __devexit_p() to several drivers. Also add a few missing
__init, __devinit and __exit markers. These errors could result in
build failures depending on the kernel configuration.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Figo.zhang <figo1802@gmail.com>
vfree() does it's own NULL checking,so no need for check before
calling it.
Priority: normal
Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
|
|
From: Roel Kluin <roel.kluin@gmail.com>
Remove redundant tests on unsigned.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Huang Weiyi <weiyi.huang@gmail.com>
Remove unused #include <version.h> in
drivers/media/video/usbvision/usbvision-i2c.c.
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
It is no longer needed to use a struct pointer as argument, since v4l2_subdev
doesn't require that ioctl-like approach anymore. Instead just pass the input,
output and config (new!) arguments directly.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Janne Grunau <j@jannau.net>
Priority: normal
Signed-off-by: Janne Grunau <j@jannau.net>
Acked-by: Thierry Merle <thierry.merle@free.fr>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
With all the v4l2_subdev changes that were made to these drivers it is a
good idea to increase the version number of each driver.
It's just the patch level that is increased, except for the zoran and saa7146
drivers where the minor number was increased due to the more substantial
changes that were made to those two drivers.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
new_(probed)_subdev
From: Hans Verkuil <hverkuil@xs4all.nl>
The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on
i2c_get_adapdata to return the v4l2_device. However, this is not always
possible on embedded platforms. So modify the API to pass the v4l2_device
pointer explicitly.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
s_std didn't belong in the tuner ops. Stricly speaking it should be part of
the video ops, but it is used by audio and tuner devices as well, so it is
more efficient to make it part of the core ops.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Trent Piepho <xyzzy@speakeasy.org>
The v4l2-ioctl core only allows buffer types for which the corresponding
->vidioc_try_fmt_xxx() methods are defined to be used with
vidioc_(q|dq|query)buf() and vidioc_reqbufs().
Since this driver only defines ->vidioc_try_fmt_vid_cap() the checks can be
removed from vidioc_reqbufs(), vidioc_qbuf(), and vidioc_dqbuf().
The ->vidioc_(s|g|try|enum)_fmt_vid_cap() methods are only called on
VIDEO_CAPTURE buffers. Thus, there is no need to check or set the buffer's
'type' field since it must already be set to VIDEO_CAPTURE. So setting the
buffer type in vidioc_enum_fmt_vid_cap() can be removed.
Priority: normal
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
|
|
From: Devin Heitmueller <dheitmueller@linuxtv.org>
Add missing URB_NO_TRANSFER_DMA_MAP flag, since the use of consistent memory
is not permitted for DMA on the ARM platform.
Thanks to Paul Thomas <pthomas8589@gmail.com> for providing sample ARM hardware
that was experiencing the oops (tested on the at91rm9200 based LinuxStamp).
Thanks to David Brownell <david-b@pacbell.net> for providing insight into the
ARM memory architecture.
Priority: normal
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Trent Piepho <xyzzy@speakeasy.org>
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is
supposed to fill in for read-only ioctls. For read/write ioctls, all the
fields which aren't supplied from userspace will be zeroed out.
Zeroing code is removed from g_audio, queryctrl, and enum_fmt_vid_cap.
Priority: normal
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
|
|
From: Trent Piepho <xyzzy@speakeasy.org>
For VIDIOC_QUERYBUF only the first two fields, size and type, are used as
input. The rest can be filled in by the driver as output. Most drivers do
not actually use all the field and unused ones should be zeroed out. Some
drivers have code to do this and some drivers should but don't. So put
some zero out code in v4l2_ioctl so that all drivers using that system get
it.
The drivers that have zeroing code get that code removed.
Some drivers checked that the type field was valid, but v4l2_ioctl already
does this so those checks can be removed as well.
Priority: normal
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
|
|
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Now, just a few modules are still dependent of this legacy header:
$ grep -l DECODER_ `find linux/drivers/media/ -name '*.[ch]' -exec grep -l video_decoder '{}' \;`
linux/drivers/media/video/v4l2-ioctl.c
linux/drivers/media/video/indycam.c
linux/drivers/media/video/saa7191.c
linux/drivers/media/video/vino.c
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Thierry MERLE <thierry.merle@free.fr>
usb_make_path reports canonical bus info. Use it when reporting bus info
in VIDIOC_QUERYCAP.
Priority: normal
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
|
|
From: Alexey Klimov <klimov.linux@gmail.com>
Patch removes err() macros from few usb devices.
It places pr_err in pvrusb2-v4l2.c, dev_err in dabusb and in usbvision
drivers. Beside placing dev_err, patch defines new s2255_dev_err macro
with S2255_DRIVER_NAME in s2255 module.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: Thierry Merle <thierry.merle@free.fr>
Acked-By: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Patch removes err() macros from few usb devices.
It places pr_err in pvrusb2-v4l2.c, dev_err in dabusb and in usbvision
drivers. Beside placing dev_err, patch defines new s2255_dev_err macro
with S2255_DRIVER_NAME in s2255 module.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: Thierry Merle <thierry.merle@free.fr>
Acked-By: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Julia Lawall <julia@diku.dk>
This patch extends 134179823b3ca9c8b98e0631906459dbb022ff9b by using
usb_endpoint_xfer_control, usb_endpoint_xfer_isoc, usb_endpoint_xfer_bulk,
and usb_endpoint_xfer_int in the negated case as well.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@ struct usb_endpoint_descriptor *epd; @@
- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ !usb_endpoint_xfer_control(epd)
@@ struct usb_endpoint_descriptor *epd; @@
- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_ISOC\|1\))
+ !usb_endpoint_xfer_isoc(epd)
@@ struct usb_endpoint_descriptor *epd; @@
- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_BULK\|2\))
+ !usb_endpoint_xfer_bulk(epd)
@@ struct usb_endpoint_descriptor *epd; @@
- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_INT\|3\))
+ !usb_endpoint_xfer_int(epd)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Julia Lawall <julia@diku.dk>
This set of patches introduces calls to the following set of functions:
usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_is_isoc_in(epd)
usb_endpoint_is_isoc_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)
In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:
USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC
An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@
- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)
@r5@ struct usb_endpoint_descriptor *epd; @@
- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
- \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Since the i2c driver ID will be removed in the near future we have to
modify the v4l2 debugging API to use the driver name instead of driver ID.
Note that this API is not used in applications other than v4l2-dbg.cpp
as it is for debugging and testing only.
Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged
with a warning that it is deprecated and will be removed in 2.6.30.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Since internal to v4l2 the ioctl prototype is the same regardless of it
being called through .ioctl or .unlocked_ioctl, we need to convert it all
to the long return type of unlocked_ioctl.
Thanks to Jean-Francois Moine for posting an initial patch for this and
thus bringing it to our attention.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
CC: Jean-Francois Moine <moinejf@free.fr>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Introduce a struct v4l2_file_operations for v4l2 drivers.
Remove the unnecessary inode argument.
Move compat32 handling (and llseek) into the v4l2-dev core: this is now
handled in the v4l2 core and no longer in the drivers themselves.
Note that this changeset reverts an earlier patch that changed the return
type of__video_ioctl2 from int to long. This change will be reinstated
later in a much improved version.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Mauro Carvalho Chehab <mchehab@redhat.com>
changeset 4ecae6da8244 removed algo_control from i2c drivers. However,
on older kernels, a dummy function to implement algo_control is required,
otherwise, an OOPS is generated.
This patch adds a backport for all i2c drivers that defines an
i2c_algorithm, except for cafe_ccic, since OLPC hardware only works
for kernels newer than 2.6.19.
Some of the backported drivers would need also extra changes to work with
older kernels, as specified on v4l/versions.txt. Yet, I decided to add
the backport for those drivers also, since the lack of algo_control doesn't
generate any compilation error, but it is enough to break the driver. So,
better to all for all boards than to allow compiling a kernel backported that
just generates OOPS.
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Kay Sievers <kay.sievers@vrfy.org>
This patch is part of a larger patch series which will remove
the "char bus_id[20]" name string from struct device. The device
name is managed in the kobject anyway, and without any size
limitation, and just needlessly copied into "struct device".
To set and read the device name dev_name(dev) and dev_set_name(dev)
must be used. If your code uses static kobjects, which it shouldn't
do, "const char *init_name" can be used to statically provide the
name the registered device should have. At registration time, the
init_name field is cleared, to enforce the use of dev_name(dev) to
access the device name at a later time.
We need to get rid of all occurrences of bus_id in the entire tree
to be able to enable the new interface. Please apply this patch,
and possibly convert any remaining remaining occurrences of bus_id.
We want to submit a patch to -next, which will remove bus_id from
"struct device", to find the remaining pieces to convert, and finally
switch over to the new api, which will remove the 20 bytes array
and does no longer have a size limitation.
Thanks,
Kay
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
The inode argument was never used. Removing it from video_usercopy
brings the function pointer type of video_usercopy in line with similar
v4l2 functions, thus simplifying several drivers.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Author: Johannes Berg <johannes@sipsolutions.net>
remove CONFIG_KMOD from drivers
Straight forward conversions to CONFIG_MODULE; many drivers
include <linux/kmod.h> conditionally and then don't have any
other conditional code so remove it from those.
kernel-sync:
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
The kernel number of a v4l2 node (e.g. videoX, radioX or vbiX) is now
independent of the minor number. So instead of using the minor field
of the video_device struct one has to use the num field: this always
contains the kernel number of the device node.
I forgot about this when I did the v4l2 core change, so this patch
converts all drivers that use it in one go. Luckily the change is
trivial.
Priority: high
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
CC: michael@mihu.de
CC: mchehab@infradead.org
CC: corbet@lwn.net
CC: luca.risolia@studio.unibo.it
CC: isely@pobox.com
CC: pe1rxq@amsat.org
CC: royale@zerezo.com
CC: mkrufky@linuxtv.org
CC: stoth@linuxtv.org
|
|
From: Greg Kroah-Hartman <gregkh@suse.de>
USB should not be having it's own printk macros, so remove info() and
use the system-wide standard of dev_info() wherever possible.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
CC: Douglas Landgraf <dougsland@gmail.com>
CC: Mike Isely <isely@pobox.com>
CC: Thierry Merle <thierry.merle@free.fr>
CC: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Use the new video_drvdata(filp) function where it is safe to do so.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
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>
|
|
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>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
The video_device_create_file and video_device_remove_file functions can be
removed from v4l2-dev.h, removing the dependency on videodev.h in v4l2-dev.h.
Also removed a few more videodev.h includes that should have been videodev2.h.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
According to an old comment this should have been removed in 2.6.15.
Better late than never...
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in
a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it.
This ensures a clean separation between the const ops struct and the non-const
video_device struct.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Converted the last users of audiochip.h to the v4l2-chip-ident.h header
and remove the now unused audiochip.h header.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
The functions in a header should not belong to another module. The prio functions
belong to v4l2-common.c, so move them to v4l2-common.h.
The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header
and move those functions to it.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
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>
|
|
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>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Phase 4 removes the compatibility support for kernels < 2.6.16.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Phase 3 of the compat cleanup.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|
|
From: Hans Verkuil <hverkuil@xs4all.nl>
Phase 2 removes support for kernels < 2.6.10.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
|