Commit graph

21 commits

Author SHA1 Message Date
Christoph Hellwig 1a47de6e4a various: fix pci_set_dma_mask return value checking
pci_set_dma_mask returns a negative errno value, not a bool like
pci_dma_supported.  This of course was just a giant test for attention :)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Jongman Heo <jongman.heo@samsung.com>
Tested-by: Jongman Heo <jongman.heo@samsung.com>	[pcnet32]
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Christoph Hellwig 251c5912d9 cx25821: use pci_set_dma_mask insted of pci_dma_supported
This ensures the dma mask that is supported by the driver is recorded
in the device structure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-10 16:32:11 -08:00
Hans Verkuil b6f21dc354 [media] cx25821: remove video output support
The video output functionality never worked for this driver. Now remove the
creation of the output video nodes as well to prevent users from thinking
that video output is available, when it isn't.

To correctly implement this the video output should use vb2 as well, and
that requires rewriting the output DMA setup. But without hardware to test
I am not able to do that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:22:00 -02:00
Hans Verkuil b671ae6bdc [media] cx25821: convert to vb2
This patch converts the cx25821 driver from the old videobuf framework to
the new vb2 framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:17:47 -02:00
Hans Verkuil 5ede94c705 [media] cx25821: remove bogus btcx_risc dependency
Those btcx_risc functions are meant for use with bttv, other drivers
should just allocate the memory themselves.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 09:35:35 -02:00
Hans Verkuil 872dfcfe82 [media] bttv/cx25821/cx88/ivtv: use sg_next instead of sg++
Never use sg++, always use sg = sg_next(sg). Scatterlist entries can
be combined if the memory is contiguous but sg++ won't know about that.

As far as I can tell cx88 and ivtv are really broken because of this,
and bttv and cx25821 are OK because vb1 doesn't combine scatterlist
entries.

But regardless, sg++ should never be used, only sg_next is safe.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25 08:12:53 -02:00
Jingoo Han f1b84d365a [media] media: pci: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-10 16:39:25 -02:00
Hans Verkuil 486a7a2813 [media] cx25821: remove cx25821-audio-upstream.c from the Makefile
The audio output is currently not used as this should be rewritten as an
alsa driver. For the time being remove this source from the Makefile.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:13:06 -03:00
Hans Verkuil ea3f7ac6e9 [media] cx25821: replace custom ioctls with write()
Ideally this should be implemented with vb2, but it'll do for now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:12:34 -03:00
Hans Verkuil 7087d31b0c [media] cx25821: drop cx25821-video-upstream-ch2.c/h
cx25821-video-upstream_ch2.c/h is practically identical to cx25821-video-upstream.c/h
so add support for ch2 into cx25821-video-upstream.c instead.
After this we can replace the custom ioctls with a proper write() interface.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:11:58 -03:00
Hans Verkuil 1f1988706d [media] cx25821: setup output nodes correctly
Drop the custom ioctls and enable the video output nodes again, this time
using standard ioctls.
The next step will be to provide a proper write() interface.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:09:57 -03:00
Hans Verkuil bad1f29d0f [media] cx25821: remove TRUE/FALSE/STATUS_(UN)SUCCESSFUL defines
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:04:37 -03:00
Hans Verkuil f8d7ee7091 [media] cx25821: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:04:12 -03:00
Hans Verkuil 467870ca26 [media] cx25821: embed video_device, clean up some kernel log spam
Embed the video_device struct instead of allocating it.
Remove some of the annoying and ugly kernel messages shown during
loading and unloading of the module.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:03:49 -03:00
Hans Verkuil 89c21389f2 [media] cx25821: remove bogus dependencies
This driver doesn't use DVB, RC, cx25840 or tveeprom.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:03:27 -03:00
Hans Verkuil a8f35ce3d6 [media] cx25821: remove unnecessary global devlist
This device list is not necessary. The kernel already has all that information,
so just use that instead.
Also remove a bogus refcount and some dead 'private_free' code in the alsa driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:02:02 -03:00
Hans Verkuil bfef0d35e5 [media] cx25821: make cx25821_sram_channels const
And get rid of the channel0-11 external pointers and two more unused fields
in cx25821.h.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:01:29 -03:00
Hans Verkuil ffd3c23304 [media] cx25821: remove bogus radio/vbi/'video-ioctl' support
This device does not support radio or vbi, so remove anything referring
to that.
In addition, the driver created an 'video ioctl' node, which was unused and
was effectively identical to the first video node.
This bogus video node is now removed, leaving us with 8 video capture nodes
and 2 video output nodes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 17:56:19 -03:00
Hans Verkuil 31b320739b [media] cx25821: the audio channel was registered as a video node
Skip the audio channel when registering the video nodes. This fixes a bug
where that incorrectly registered 'video' node was never unregistered.
Note: this bug only surfaces if the video output nodes are enabled again
after the previous patch disabled them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-15 08:35:21 -03:00
Greg Kroah-Hartman 4c62e9764a Drivers: media: remove __dev* attributes.
CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03 15:57:02 -08:00
Mauro Carvalho Chehab b285192a43 [media] rename most media/video pci drivers to media/pci
Rename all PCI drivers with their own directory under
drivers/media/video into drivers/media/pci and update the
building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 16:36:22 -03:00
Renamed from drivers/media/video/cx25821/cx25821-core.c (Browse further)