Commit Graph

66 Commits (70e522a02838e52ca007d3f183171fd9324eceb4)

Author SHA1 Message Date
Hans Verkuil c5e76a6d2a V4L/DVB: cx25821: convert to the mediabus API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21 01:04:40 -02:00
Mauro Carvalho Chehab 3e9442c6f1 V4L/DVB: cx25821: Fix bad whitespacing
Should use tabs for identation, and not whitespace

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 15:20:11 -03:00
Palash Bandyopadhyay 6d8c2ba1d1 V4L/DVB: cx25821: Removed duplicate code and cleaned up
Signed-off-by: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 15:18:44 -03:00
Hans Verkuil ffb4877ba0 V4L/DVB: v4l2-common: simplify prio utility functions
v4l2_prio_init/open/close returned an int when in fact they would
always return 0. Make these void functions.

v4l2_prio_close and v4l2_prio_check pass an enum v4l2_priority as a
pointer for no good reason. Replace with a normal enum v4l2_priority
argument.

These changes will simplify the work of moving priority handling into
the v4l core.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:54 -03:00
Andreas Bombe dab7e3106d V4L/DVB: V4L2: Replace loops for finding max buffers in VIDIOC_REQBUFS callbacks
Due to obvious copy and paste coding a number of video capture drivers
which implement a limit on the buffer memory decremented the user
supplied buffer count in a while loop until it reaches an acceptable
value.

This is a silly thing to do when the maximum value can be directly
computed.

Signed-off-by: Andreas Bombe <aeb@debian.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:13 -03:00
Mauro Carvalho Chehab f2466d63a5 V4L/DVB: cx25821: prepend cx25821_ to video exported symbols
As reported by Randy Dunlap <randy.dunlap@oracle.com>:
drivers/staging/cx25821/cx25821-video.c:89:struct cx25821_fmt *format_by_fourcc(unsigned int fourcc)
(not static)

conflicts with (has the same non-static name as)

drivers/media/common/saa7146_video.c:87:struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc)

To solve, add cx25821_ prefix to the exported functions found on cx25821-video.h.

This patch were generated by this little shell/perl script:

cat drivers/staging/cx25821/cx25821-video.h|perl -ne \
'if (m/extern.* ([^\s\*]+)\(/) { $n=$1; print "s/([^\d\w_\.])$1/\\1cx25821_$1/g;\n" if (!($n =~ m/cx25821/)); }' \
>changes; for i in drivers/staging/cx25821/*.[ch]; do sed -r -f changes $i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com>
2010-05-18 00:51:17 -03:00
Mauro Carvalho Chehab d7d9338742 V4L/DVB: cx25821-video.c: fix table indent
Table indent were likely damaged by Lindent. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com>
2010-05-18 00:51:16 -03:00
Alexander Beregalov c424d46fdc staging: cx25821: avoid NULL pointer dereference
Assign dev only if fh is not NULL.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Dan Carpenter ed30013207 Staging: cx25821: off by one in cx25821_enum_input()
The INPUT(n) macro indexes an array of size 2.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:38 -08:00
Laurent Pinchart 46b21094ce V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments
Now that the video_device registration is tested using
video_is_registered(), drivers don't need to initialize the
video_device::minor field to -1 anymore.

Remove those unneeded assignments.

[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:57 -02:00
Laurent Pinchart 63b0d5ad20 V4L/DVB (13554a): v4l: Use the video_drvdata function in drivers
Fix all device drivers to use the video_drvdata function instead of
maintaining a local list of minor to private data mappings. Call
video_set_drvdata to register the driver private pointer when not
already done.

Where applicable, the local list of mappings is completely removed when
it becomes unused.

[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:56 -02:00
Laurent Pinchart f0813b4c9f V4L/DVB (13553): v4l: Use the video_is_registered function in device drivers
Fix all device drivers to use the video_is_registered function instead
of checking video_device::minor.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:56 -02:00
Mauro Carvalho Chehab 53e712d084 V4L/DVB (12734): cx25821: Fix some compilation troubles
Lindent caused some compilation breakages. There were also others
related to some other changes at kernel KABI.

There's still one missing warning fix against 2.6.30:

/home/v4l/cx25821/v4l/cx25821-alsa.c: In function 'cx25821_audio_initdev':
/home/v4l/cx25821/v4l/cx25821-alsa.c:706: warning: 'snd_card_new' is deprecated (declared at include/sound/core.h:306)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:38 -03:00
Mauro Carvalho Chehab 1a9fc85564 V4L/DVB (12733): cx25821: some CodingStyle fixes
The original driver were generated with some dos editor, and used their
own coding style.

This patch does some automatic CodingStyle fixes, by running dos2unix
and Lindent tools.

More work still needs to be done for it to use upstream CodingStyle.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:38 -03:00
Mauro Carvalho Chehab bb4c9a74b8 V4L/DVB (12732): cx25821: fix bad whitespacing
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:37 -03:00
Mauro Carvalho Chehab 02b20b0b4c V4L/DVB (12730): Add conexant cx25821 driver
GIT_BRANCH=devel
GIT_AUTHOR_DATE=1252851239
GIT_AUTHOR_NAME=Palash Bandyopadhyay
GIT_AUTHOR_EMAIL=Palash.Bandyopadhyay@conexant.com
Add conexant cx25821 driver release v106 of the Athena driver.

Signed-off-by: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:36 -03:00