dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

277839 Commits

Author SHA1 Message Date
Randy Dunlap bab6f61064 [media] wl128x: fix build errors when GPIOLIB is not enabled
From: Randy Dunlap <rdunlap@xenotime.net>

Fix wl128x Kconfig to depend on GPIOLIB since TI_ST also
depends on GPIOLIB.

(.text+0xe6d60): undefined reference to `st_register'
(.text+0xe7016): undefined reference to `st_unregister'
(.text+0xe70ce): undefined reference to `st_unregister'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Manjunatha Halli <manjunatha_halli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-15 12:47:00 -02:00
Janne Grunau afa159538a [media] hdpvr: fix race conditon during start of streaming
status has to be set to STREAMING before the streaming worker is
queued. hdpvr_transmit_buffers() will exit immediately otherwise.

Reported-by: Joerg Desch <vvd.joede@googlemail.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14 16:45:32 -02:00
Laurent Pinchart 63ae37ea51 [media] omap3isp: Fix crash caused by subdevs now having a pointer to devnodes
Commit 3e0ec41c5c ("V4L: dynamically
allocate video_device nodes in subdevices") makes the
embedding video_device directly.

Fix accesses to the devnode accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-09 07:20:25 -02:00
Jarod Wilson 8791d63af0 [media] imon: don't wedge hardware after early callbacks
This patch is just a minor update to one titled "imon: Input from ffdc
device type ignored" from Corinna Vinschen. An earlier patch to prevent
an oops when we got early callbacks also has the nasty side-effect of
wedging imon hardware, as we don't acknowledge the urb. Rework the check
slightly here to bypass processing the packet, as the driver isn't yet
fully initialized, but still acknowlege the urb and submit a new rx_urb.
Do this for both interfaces -- irrelevant for ffdc hardware, but
relevant for newer hardware, though newer hardware doesn't spew the
constant stream of data as soon as the hardware is initialized like the
older ffdc devices, so they'd be less likely to trigger this anyway...

Tested with both an ffdc device and an 0042 device.

Reported-by: Corinna Vinschen <vinschen@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
CC: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-26 17:04:29 -02:00
Mauro Carvalho Chehab c79eba9240 [media] cinergyT2-fe: Fix bandwdith settings
Changeset 7830bbaff9 mangled the bandwidth field for CinergyT2.
Properly fill it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:34:53 -02:00
Josh Wu 03652e0ad4 [media] V4L: atmel-isi: add clk_prepare()/clk_unprepare() functions
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:13:21 -02:00
Antti Palosaari 7256522460 [media] cxd2820r: sleep on DVB-T/T2 delivery system switch
Fix bug introduced by multi-frontend to single-frontend change.
It is safer to put DVB-T parts sleeping when auto-switching to DVB-T2
and vice versa. That was original behaviour.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:52 -02:00
Antti Palosaari 46de20a78a [media] anysee: fix CI init
No more error that error seen when device is plugged:
dvb_ca adapter 0: Invalid PC card inserted :(

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:43 -02:00
Antti Palosaari c2bbbe7b5e [media] cxd2820r: remove unused parameter from cxd2820r_attach
Fix bug introduced by multi-frontend to single-frontend change.
This parameter is no longer used after multi-frontend to single-frontend change.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:36 -02:00
Antti Palosaari 9bf31efa84 [media] cxd2820r: fix dvb_frontend_ops
Fix bug introduced by multi-frontend to single-frontend change.

* Add missing DVB-C caps
* Change frontend name as single frontend does all the standards

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:26 -02:00
Laurent Pinchart 36be126cb0 [media] as3645a: Fix compilation by including slab.h
The as3645a driver calls kzalloc(). Include slab.h.

Reported-by: Fredrik Lingvall <fredrik.lingvall@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:07:13 -02:00
Sachin Kamat a2e2baad60 [media] s5p-fimc: Remove linux/version.h include from fimc-mdevice.c
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:06:24 -02:00
Sachin Kamat 2bd4334121 [media] s5p-mfc: Remove linux/version.h include from s5p_mfc.c
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:06:13 -02:00
Dan Carpenter 3a9888f913 [media] ds3000: using logical && instead of bitwise &
The intent here was to test if the FE_HAS_LOCK was set.  The current
test is equivalent to "if (status) { ..."

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:05:13 -02:00
Hans Verkuil f08aacf84f [media] v4l2-ctrls: make control names consistent
Several control names used inconsistent capitalization or were inconsistent
in other ways. I also corrected a spelling mistake and fixed four strings
that were too long (>31 characters). Harmless, but the string is cut off when
it is returned with QUERYCTRL.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:04:05 -02:00
Jiri Slaby d43272a4e8 [media] DVB: dib0700, add support for Nova-TD LEDs
Add an override of read_status to intercept lock status. This allows
us to switch LEDs appropriately on and off with signal un/locked.

The second phase is to override sleep to properly turn off both.

This is a hackish way to achieve that.

Thanks to Mike Krufky for his help.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:02:41 -02:00
Jiri Slaby 2b05b881ec [media] DVB: dib0700, add corrected Nova-TD frontend_attach
This means cut & paste from the former f. attach. But while at it write
to the right GPIO to turn on the right LED. Also turn the other two
off jsut for sure.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:02:15 -02:00
Jiri Slaby 52fd5b2ea7 [media] DVB: dib0700, separate stk7070pd initialization
The start is common for both stk7070pd and novatd specific routine.
This is just a preparation for the next patch.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:01:55 -02:00
Jiri Slaby 9b6ba57bd4 [media] DVB: dib0700, move Nova-TD Stick to a separate set
To properly support the three LEDs which are on the stick, we need
a special handling in the ->frontend_attach function. Thus let's have
a separate ->frontend_attach instead of ifs in the common one.

The hadnling itself will be added in further patches.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:01:23 -02:00
Patrick Boettcher 68dc8bc580 [media] : add MODULE_FIRMWARE to dib0700
The dib0700 needs a binary firmware file. This patch added the MODULE_FIRMWARE-macro.

Signed-off-by: Christoph Anton Mitterer <calestyo@scientia.net>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 22:58:53 -02:00
Patrick Boettcher bad321f1bb [media] DVB-CORE: remove superfluous DTV_CMDs
This small patch removes superfluous DTV_CMDs from dvb_frontend.c which were added in the initially when ISBD-T support was added.
They were there unnoticed even though compilers should have warning about those duplicates. Finally they did and now we can remove them.

Thanks to Dan Carpenter <dan.carpenter@oracle.com> for pointing that out.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 22:58:40 -02:00
Marek Szyprowski 719c174ee9 [media] s5p-jpeg: adapt to recent videobuf2 changes
queue_setup callback has been extended with struct v4l2_format *fmt
parameter in 2d86401c2c commit. This patch adds this parameter to
s5p-jpeg driver.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 22:54:45 -02:00
Kamil Debski 7f6cce69e2 [media] s5p-g2d: fixed a bug in controls setting function
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 22:54:23 -02:00
Kamil Debski 0da0a78338 [media] s5p-mfc: Fix volatile controls setup
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 22:54:04 -02:00
Julia Lawall bb869368f3 [media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test
Rewrite a duplicated test to test the correct value

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E;
@@

(
* E
  || ... || E
|
* E
  && ... && E
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 22:53:46 -02:00
Julia Lawall b1aa60892e [media] drivers/media/video/s5p-fimc/fimc-capture.c: adjust double test
Rewrite a duplicated test to test the correct value

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E;
@@

(
* E
  || ... || E
|
* E
  && ... && E
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 22:53:34 -02:00
Sachin Kamat 53e5ab946a [media] s5p-fimc: Fix incorrect control ID assignment
This patch fixes the mismatch between control IDs (CID) and controls
for hflip, vflip and rotate.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 22:53:12 -02:00
Mauro Carvalho Chehab 51dcb19aaf [media] dvb_frontend: Don't call get_frontend() if idle
If the frontend is in idle state, don't call get_frontend.

Calling get_frontend() when the device is not tuned may
result in wrong parameters to be returned to the
userspace.

I was tempted to not call get_frontend() at all, except
inside the dvb frontend thread, but this won't work for
all cases. The ISDB-T specs (ABNT NBR 15601 and ARIB
STD-B31) allow the broadcaster to dynamically change the
channel specs at runtime. That means that an ISDB-T optimized
application may want/need to monitor the TMCC tables, decoded
at the frontends via get_frontend call.

So, let's do the simpler change here.

Eventually, the logic could be changed to work only if
the device is tuned and has lock, but, even so, the
lock is also standard-dependent. For ISDB-T, the right
lock to wait is that the demod has TMCC lock. So, drivers
may need to implement some logic to detect if the get_frontend
info was retrieved or not.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 16:20:37 -02:00
Mauro Carvalho Chehab 7bb0f088f8 [media] DocBook/dvbproperty.xml: Remove DTV_MODULATION from ISDB-T
On ISDB-T, each layer can have its own independent modulation,
applied to the carriers that belong to the segments associated
with them. So, there's no sense to define a global modulation
parameter.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 10:00:41 -02:00
Mauro Carvalho Chehab b5dad9fdd8 [media] DocBook/dvbproperty.xml: Fix ISDB-T delivery system parameters
The ISDB-T differs on its way to implement the hierarchical
transmissions: instead of using a low-priority/high-priority
FEC codes, it does that by using different layers, each layer
with their groups of segments. So, those parameters don't make sense
for ISDB-T.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 09:49:28 -02:00
Mauro Carvalho Chehab a34e2a784f [media] DocBook/dvbproperty.xml: Fix the units for DTV_FREQUENCY
The units for DTV_FREQUENCY are kHz for satellital delivery systems
(DVB-S/DVB-S2/DVB-TURBO/ISDB-S). Fix it at the API spec.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 09:45:48 -02:00
Antti Palosaari 3b6a567afa [media] cxd2820r: do not allow get_frontend() when demod is not initialized
This fixes bug introduced by multi-frontend to single-frontend change.

Finally HAS_LOCK is got back!
We are not allowed to access hardware in sleep mode...
Chip did not like when .get_frontend() reads some registers while
chip was sleeping and due to that HAS_LOCK bit was never gained.

TODO: We should add logic for dvb-core to drop out illegal calls like that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:55:47 -02:00
Antti Palosaari 1f64972937 [media] cxd2820r: wait demod lock for DVB-C too
Fix yet another bug introduced be recent cxd2820r multi-frontend to
single-frontend change.

Finally, we have at least almost working picture for DVB-C too.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:55:26 -02:00
Jesper Juhl 016961e0d9 [media] tda18271c2dd: Remove pointless linux/version.h include
As pointed out by 'make versioncheck', there's no need for
drivers/media/dvb/frontends/tda18271c2dd.c to

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:55:04 -02:00
Antti Palosaari d04ca8df70 [media] cxd2820r: do not switch to DVB-T when DVB-C fails
Fix another bug introduced by recent multi-frontend to single-frontend
change.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:47:32 -02:00
Antti Palosaari faf27976a7 [media] anysee: do not attach same frontend twice
cxd2820r implements only one frontend currently which
handles all the standards.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:45:29 -02:00
Dan Carpenter e9ae4d4f02 [media] tlg2300: fix up check_firmware() return
The caller doesn't check the return value of check_firmware() but static
checkers complain.  It currently returns negative error codes, or zero
or greater on success but since the return type is boolean the values
are truncated to one or zero.  I've changed it to return an int,
negative on error and zero on success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:38:00 -02:00
Dan Carpenter 0397e45059 [media] saa7164: remove duplicate initialization
These were initialized twice by mistake.  They were defined the same way
both times so this doesn't change how the code works.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:35:55 -02:00
Miroslav Slugen 304bce414e [media] Add registers names to XC2028 tuner from datahseet and use them
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:24:39 -02:00
Miroslav Slugen 8a538a8855 [media] xc4000: add support for signal strength measures
In xc4000 chipsets real signal and noise level is stored in register
0x0A and 0x0B,so we can use those registers to monitor signal strength.

I tested this patch on 2 different cards Leadtek DVR3200 and DTV2000H
Plus, both with same results, I used special antenna hubs (toner 4x, 6x,
8x and 12x) with mesured signal lost, both registers are in dB value,
first represent signal with limit value -113.5dB (should be -114dB) and
exactly match with test results. Second represents noise level also in
dB and there is no maximum value, but from tests we can drop everything
above 32dB which tuner realy can't use, signal was usable till 20dB
noise level.

In digital mode we can take signal strength but sadly noise level is not
relevant and real value is stored in demodulator for now just zl10353,
also digital mode is just for testing, because it needs changing other
parts of code which reads data only from demodulator.

In analog mode I was able to test only FM radio, signal level is not
important, it says something about cable and hub losts, but nothing
about real quality of reception, so even if we have signal level at
minimum 113dB we can still here radio, because of that it is displaied
only in debug mode, but for real signal level is used noise register
which is again very accurate, radio noise level was betwen 6-20dB for
good signal, 20-25dB for medium signal, and above 25dB signal is
unusable.

For now real benefit of this patch is only for FM radio mode.

Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:23:15 -02:00
Miroslav Slugen cd4ca7afc6 [media] tuner: Fix numberspace conflict between xc4000 and pti 5nf05 tuners
Update xc4000 tuner definition, number 81 is already in use by
TUNER_PARTSNIC_PTI_5NF05.

Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:55:48 -02:00
Miroslav Slugen b6854e3f31 [media] cx88: fix: don't duplicate xc4000 entry for radio
All radio tuners in cx88 driver using same address for radio and tuner,
so there is no need to probe it twice for same tuner and we can use
radio_type UNSET, this also fix broken radio since kernel 2.6.39-rc1
for those tuners.

Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:55:22 -02:00
Miroslav Slugen 9ee8537f60 [media] cx23885: Don't duplicate xc4000 entry for radio
All radio tuners in cx23885 driver using same address for radio and
tuner, so there is no need to probe it twice for same tuner and we can
use radio_type UNSET.

Be aware radio support in cx23885 is not yet committed, so this is only
minor fix for future support.

Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:55:12 -02:00
Miroslav Slugen a7c8aadad3 [media] cx23885-dvb: check if dvb_attach() succeded
Fix possible null dereference for Leadtek DTV 3200H
XC4000 tuner when no firmware file available.

Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:54:50 -02:00
Dan Carpenter 6c2cc5b575 [media] cx231xx: dereferencing NULL after allocation failure
"dev" is NULL here so we should use "nr" instead of "dev->devno".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:54:26 -02:00
Dan Carpenter 82033bc52a [media] mb86a20s: fix off by one checks
Clearly ">=" was intended here instead of ">".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:37:07 -02:00
Hans de Goede c24e137137 [media] pwc: Simplify leds parameter parsing
This reduces our module init to a simple usb_register() call, so
that we can make use of the new upcoming macro's for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:28:13 -02:00
Hans de Goede a081c3400f [media] pwc: Remove dev_hint module parameter
The code for this is rather crufty, and being able to tie a device
to a specific minor is not really something we want to support in
a modern udev based world.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:28:12 -02:00
Hans de Goede 24be689bfb [media] pwc: Use one shared usb command buffer
The pwc driver used to:
1. kmalloc a buffer
2. memcpy data to send over usb there
3. do the usb_control_msg call (which does not work with data on the stack)
4. free the buffer

For every usb command send. This patch changes the code to instead malloc
a buffer for this purpose once and use it everywhere.

[mchehab@redhat.com: Fix a compilation breakage with allyesconfig:
 drivers/media/video/pwc/pwc-ctrl.c: In function ‘pwc_get_cmos_sensor’:
 drivers/media/video/pwc/pwc-ctrl.c:546:3: warning: passing argument 4 of ‘recv_control_msg’ makes integer from pointer without a cast [en$
 drivers/media/video/pwc/pwc-ctrl.c:107:12: note: expected ‘int’ but argument is of type ‘unsigned char *’
 drivers/media/video/pwc/pwc-ctrl.c:546:3: error: too many arguments to function ‘recv_control_msg’
 drivers/media/video/pwc/pwc-ctrl.c:107:12: note: declared here]

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:27:58 -02:00
Hans de Goede 1c852201a2 [media] pwc: Avoid unnecessarily rebuilding the decoder tables
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:09:20 -02:00