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

6063 Commits

Author SHA1 Message Date
Tejun Heo 5f820f648c poll: allow f_op->poll to sleep
f_op->poll is the only vfs operation which is not allowed to sleep.  It's
because poll and select implementation used task state to synchronize
against wake ups, which doesn't have to be the case anymore as wait/wake
interface can now use custom wake up functions.  The non-sleep restriction
can be a bit tricky because ->poll is not called from an atomic context
and the result of accidentally sleeping in ->poll only shows up as
temporary busy looping when the timing is right or rather wrong.

This patch converts poll/select to use custom wake up function and use
separate triggered variable to synchronize against wake up events.  The
only added overhead is an extra function call during wake up and
negligible.

This patch removes the one non-sleep exception from vfs locking rules and
is beneficial to userland filesystem implementations like FUSE, 9p or
peculiar fs like spufs as it's very difficult for those to implement
non-sleeping poll method.

While at it, make the following cosmetic changes to make poll.h and
select.c checkpatch friendly.

* s/type * symbol/type *symbol/		   : three places in poll.h
* remove blank line before EXPORT_SYMBOL() : two places in select.c

Oleg: spotted missing barrier in poll_schedule_timeout()
Davide: spotted missing write barrier in pollwake()

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Brad Boyer <flar@allandria.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Roland McGrath <roland@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:12 -08:00
Laurent Pinchart f41ced8f10 Check fops_get() return value
Several subsystem open handlers dereference the fops_get() return value
without checking it for nullness.  This opens a race condition between the
open handler and module unloading.

A module can be marked as being unloaded (MODULE_STATE_GOING) before its
exit function is called and gets the chance to unregister the driver.
During that window open handlers can still be called, and fops_get() will
fail in try_module_get() and return a NULL pointer.

This change checks the fops_get() return value and returns -ENODEV if NULL.

Reported-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Acked-by: Takashi Iwai <tiwai@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Airlie <airlied@linux.ie>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:11 -08:00
Udo Steinberg b15dd79ea0 V4L/DVB (10173): Missing v4l2_prio_close in radio_release
The radio_release function of the BTTV driver is missing a call to
v4l2_prio_close. As a result, after the radio device has been opened at
least once (e.g., by HAL during bootup), v4l2_priority will never drop below
V4L2_PRIORITY_INTERACTIVE again. With the following patch against 2.6.28,
applications that run with V4L2_PRIORITY_BACKGROUND are able to open devices
again. Previous Linux versions are affected as well.

Signed-off-by: Udo Steinberg <udo@hypervisor.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-03 10:50:38 -02:00
Kay Sievers 763d19bb90 V4L/DVB (10172): add DVB_DEVICE_TYPE= to uevent
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-03 10:50:31 -02:00
Julia Lawall 03fb02c604 V4L/DVB (10171): Use usb_set_intfdata
This code had calls to both usb_set_intfdata and dev_set_drvdata, doing the
same thing.

The semantic patch that lead to finding this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@header@
@@

@same depends on header@
position p;
@@

usb_set_intfdata@p(...) { ... }

@depends on header@
position _p!=same.p;
identifier _f;
struct usb_interface *intf;
expression data;
@@

_f@_p(...) { <+...
- dev_set_drvdata(&intf->dev, data);
+ usb_set_intfdata(intf, data);
...+> }

// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-03 10:50:26 -02:00
Michael Krufky 6b55009e1d V4L/DVB (10170): tuner-simple: prevent possible OOPS caused by divide by zero error
A user reported the following OOPS with his pcHDTV HD5500 card, which
uses a cx88 PCI bridge with a LG-TDVS-H06xF frontend module, made up
of a TUA6034 tuner, TDA988x IF demod, and LG DT3303 ATSC/QAM demod.

Somehow, tuner-core gets loaded before the digital driver configures
the tuner, and tuner-core somehow incorrectly sets the tuner type to
LG NTSC (TAPE series) instead of LG TDVS-H06xF.  This tuner type does
not have the tuning stepsize defined, so an OOPS occurs during the
digital tune function.

We still dont know how the type gets set incorrectly in the first place.
The user has a tainted kernel with a binary nividia module, which COULD
have something to do with this, but it's hard to say for sure.

Nevertheless, to avoid this division by zero, we should check that
stepsize is defined.  If stepsize is not defined, print an error and
bail out on the tune request.

cx8800 0000:05:01.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
cx88[0]: subsystem: 7063:5500, board: pcHDTV HD5500 HDTV [card=47,autodetected], frontend(s): 1
cx88[0]: TV tuner type 47, Radio tuner type -1
tuner' 2-0043: chip found @ 0x86 (cx88[0])
tda9887 2-0043: creating new instance
tda9887 2-0043: tda988[5/6/7] found
tuner' 2-0061: chip found @ 0xc2 (cx88[0])
tuner-simple 2-0061: creating new instance
tuner-simple 2-0061: type set to 47 (LG NTSC (TAPE series))
cx88[0]/0: found at 0000:05:01.0, rev: 5, irq: 19, latency: 32, mmio: 0xea000000
cx88[0]/0: registered device video1 [v4l2]
cx88[0]/0: registered device vbi1
cx88_audio 0000:05:01.1: PCI INT A -> GSI 19 (level, low) -> IRQ 19
cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
cx88[0]/2: cx2388x 8802 Driver Manager
cx88-mpeg driver manager 0000:05:01.2: PCI INT A -> GSI 19 (level, low) -> IRQ 19
cx88[0]/2: found at 0000:05:01.2, rev: 5, irq: 19, latency: 32, mmio: 0xec000000
cx8802_probe() allocating 1 frontend(s)
cx88/2: cx2388x dvb driver version 0.0.6 loaded
cx88/2: registering cx8802 driver, type: dvb access: shared
cx88[0]/2: subsystem: 7063:5500, board: pcHDTV HD5500 HDTV [card=47]
cx88[0]/2: cx2388x based DVB/ATSC card
tuner-simple 2-0061: attaching existing instance
tuner-simple 2-0061: type set to 64 (LG NTSC (TAPE series))
tda9887 2-0043: attaching existing instance
DVB: registering new adapter (cx88[0])
DVB: registering adapter 0 frontend 0 (LG Electronics LGDT3303 VSB/QAM Frontend)...
[snip]
stepsize=0
divide error: 0000 [1] SMP
CPU 1
Modules linked in: nls_utf8 fuse sco bridge stp bnep l2cap bluetooth sunrpc nf_conntrack_netbios_ns nf_conntrack_ftp ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table xfs lgdt330x dm_multipath cx88_dvb cx88_vp3054_i2c uinput tda9887 tda8290 snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul tuner_simple tuner_types tuner msp3400 cx8800 cx88_alsa cx8802 snd_emu10k1 cx88xx snd_rawmidi snd_ac97_codec ir_common ac97_bus saa7115 snd_seq_dummy snd_seq_oss snd_seq_midi_event videobuf_dvb snd_seq dvb_core snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_device videobuf_dma_sg ppdev parport_pc snd_timer videobuf_core snd_page_alloc btcx_risc emu10k1_gp ivtv i2c_algo_bit cx2341x snd_util_mem snd_hwdep nvidia(P) gameport v4l2_common i2c_i801 snd soundcore parport videodev v4l1_compat v4l2_compat_ioctl32 tveeprom i2c_core pcspkr iTCO_wdt iTCO_vendor_support sky2 joydev floppy shpchp ata_generic pata_acpi pata_jmicron [last unloaded: microcode]
Pid: 3553, comm: kdvb-ad-0-fe-0 Tainted: P          2.6.27.9-159.fc10.x86_64 #1
RIP: 0010:[<ffffffffa09bc37a>]  [<ffffffffa09bc37a>] simple_dvb_calc_regs+0xab/0x281 [tuner_simple]
RSP: 0018:ffff8800605dfd30  EFLAGS: 00010246
RAX: 000000000365c040 RBX: ffff8800605dfdb0 RCX: ffff88007acb8c10
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000246
RBP: ffff8800605dfda0 R08: ffff8800605dfba0 R09: 0000000000000082
R10: 00000010e73c9df1 R11: 0000000100000000 R12: ffff88007ac29c00
R13: ffff88007ac29c00 R14: ffff88007acbb408 R15: ffffffffa09b6fb0
FS:  0000000000000000(0000) GS:ffff88007f804880(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00000000004e8f40 CR3: 000000007114e000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kdvb-ad-0-fe-0 (pid: 3553, threadinfo ffff8800605de000, task ffff88006fca0000)
Stack:  ffff8800605dfd40 00000000ffffffa1 ffff88007c055860 0000000000000001
 ffff8800605dfda0 ffff8800605dfda0 ffff88007acb8c10 ffffffffa004e48c
 8e01880000000390 ffff88007acb8c10 ffff88007ac29c00 0000000000000000
Call Trace:
 [<ffffffffa004e48c>] ? i2c_transfer+0x80/0x8b [i2c_core]
 [<ffffffffa09bc768>] simple_dvb_set_params+0x3e/0x9b [tuner_simple]
 [<ffffffffa0a0335a>] lgdt330x_set_parameters+0x188/0x1b9 [lgdt330x]
 [<ffffffffa08c9116>] dvb_frontend_swzigzag_autotune+0x18e/0x1b5 [dvb_core]
 [<ffffffffa08c9f6a>] dvb_frontend_swzigzag+0x1bc/0x21e [dvb_core]
 [<ffffffffa08ca4f4>] dvb_frontend_thread+0x528/0x62b [dvb_core]
 [<ffffffff810551e1>] ? autoremove_wake_function+0x0/0x38
 [<ffffffffa08c9fcc>] ? dvb_frontend_thread+0x0/0x62b [dvb_core]
 [<ffffffff81054e9b>] kthread+0x49/0x76
 [<ffffffff810116e9>] child_rip+0xa/0x11
 [<ffffffff81010a07>] ? restore_args+0x0/0x30
 [<ffffffff81054e52>] ? kthread+0x0/0x76
 [<ffffffff810116df>] ? child_rip+0x0/0x11

Code: 48 8b 05 2a 4e 00 00 41 8b 77 1c 31 d2 0f b7 40 0a 89 f1 03 45 d0 d1 e9 03 0d 23 4e 00 00 69 c0 24 f4 00 00 8d 04 01 48 8b 4d c0 <f7> f6 8a 55 d6 88 53 04 41 89 c4 c1 e8 08 88 43 01 8a 45 d7 44
RIP  [<ffffffffa09bc37a>] simple_dvb_calc_regs+0xab/0x281 [tuner_simple]
 RSP <ffff8800605dfd30>

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:15:18 -02:00
Michael Krufky f4c82548d4 V4L/DVB (10168): sms1xxx: fix inverted gpio for lna control on tiger r2
The GPIO logic for LNA control on the Tiger r2 devices was inverted.
This patch corrects the problem.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:15:14 -02:00
Michael Krufky dd72f31b4f V4L/DVB (10167): sms1xxx: add support for inverted gpio
negative gpio values signify inverted polarity

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:15:11 -02:00
Klaus Schmidinger faed4aa586 V4L/DVB (10165): Add FE_CAN_2G_MODULATION flag to frontends that support DVB-S2
Report to userspace that cx24116 and stv0899 drivers support DVB-S2.

Signed-off by: Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de>

Acked-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:15:04 -02:00
Mauro Carvalho Chehab 9baed99ee7 V4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev
Some devices require different setups on struct_audio. Due to that, we
may need to change some fields at dev.adev during device probe. So, this
patch moves the dynamic memory allocation of adev at em28xx-alsa to the
dynamic allocation of struct em28xx dev that happens during device
probe.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:14:55 -02:00
Mauro Carvalho Chehab 0b82c5d674 V4L/DVB (10162): tuner-simple: Fix tuner type set message
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:14:44 -02:00
Pham Thanh Nam 4a87d7c4f2 V4L/DVB (10161): saa7134: fix autodetection for AVer TV GO 007 FM Plus
This patch fixes autodetection for Avermedia AVerTV GO 007 FM Plus (M15C)
(PCI ID 1461:f31d).

Signed-off-by: Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:14:34 -02:00
Mauro Carvalho Chehab 87ea5f9d38 V4L/DVB (10160): em28xx: update chip id for em2710
em2710 uses the same chip ID as em2820 (0x12).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:14:28 -02:00
Mark Lord 5e6de7d9a1 V4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme
Signed-off-by: Mark Lord <mlord@pobox.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[tobias.lorenz@gmx.net: Code beautifications and documentation added]
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:13:56 -02:00
Pham Thanh Nam 6a2d802ca0 V4L/DVB (10156): saa7134: Add support for Avermedia AVer TV GO 007 FM Plus
This patch adds support for Avermedia AVer TV GO 007 FM Plus (M15C) on
saa7134 driver (PCI ID 1461:f31d).

Signed-off-by: Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:13:44 -02:00
Fabio Belavenuto 46a60cfef5 V4L/DVB (10155): Add TEA5764 radio driver
Add support for radio driver TEA5764 from NXP.
This chip is connected in pxa I2C bus in EZX phones
from Motorola, the chip is used in phone model A1200.
This driver is for OpenEZX project (www.openezx.org)
Tested with A1200 phone, openezx kernel and fm-tools

[mchehab@redhat.com: Fixed CodingStyle and solved some merge conflicts]
Signed-off-by: Fabio Belavenuto <belavenuto@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:52 -02:00
Mauro Carvalho Chehab b0c4be8cff V4L/DVB (10154): saa7134: fix a merge conflict on Behold H6 board
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:38 -02:00
Dmitri Belimov 47aeba5add V4L/DVB (10153): Add the Beholder H6 card to DVB-T part of sources.
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:34 -02:00
Dmitri Belimov f204ae40ad V4L/DVB (10152): Change configuration of the Beholder H6 card
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:31 -02:00
Dmitri Belimov 899a6f67b9 V4L/DVB (10151): Fix I2C bridge error in zl10353
Fix I2C bridge error in zl10353 if no tunner attached to internal I2C
bus of zl10353 chip.

When set enable bridge from internal I2C bus to the main I2C bus
(saa7134) the main I2C bus stopped very hardly. No any communication. In
our next board we solder additional resistors to internal I2C bus.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:27 -02:00
Mike Frysinger 91f7c130c2 V4L/DVB (10150): ttusb-dec: make it depend on PCI
Since ttusb_dec.c relies on pci_alloc_consistent and
pci_free_consistent, make it depend on PCI in Kconfig.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:24 -02:00
Mike Frysinger fbe9834a4a V4L/DVB (10149): ttusb-budget: make it depend on PCI
Since dvb-ttusb-budget.c relies on pci_alloc_consistent and
pci_free_consistent, make it depend on PCI in Kconfig.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:21 -02:00
roel kluin f347535a60 V4L/DVB (10148): cx23885: unsigned cx23417_mailbox cannot be negative
Unsigned cx23417_mailbox cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:18 -02:00
Cyrill Gorcunov 9ed5537591 V4L/DVB (10144): cx24116: build fix
Add missed MODULE check to eliminate inapropriate
declaration being choosed which causes a build error.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:12 -02:00
Hans Verkuil aecde8b53b V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID.
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.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:52 -02:00
Hans Verkuil da1b5c95e4 V4L/DVB (10140): gp8psk: fix incorrect return code (EINVAL instead of -EINVAL)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:43 -02:00
Hans Verkuil 9bb7cde793 V4L/DVB (10139): v4l: rename v4l_compat_ioctl32 to v4l2_compat_ioctl32
This rename prevents conflicts with the older compat_ioctl32 module.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:39 -02:00
Hans Verkuil 069b747931 V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl.
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.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:34 -02:00
Hans Verkuil 4ab9203b1b V4L/DVB (10137): v4l2-compat32: only build if needed
Add CONFIG_COMPAT check in Makefile.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:25 -02:00
Hans Verkuil bec43661b1 V4L/DVB (10135): v4l2: introduce v4l2_file_operations.
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.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:12 -02:00
Hans Verkuil 7943ecf161 V4L/DVB (10132): v4l2-compat-ioctl32: remove dependency on videodev.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:10:44 -02:00
Linus Torvalds f54a6ec0fd Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (583 commits)
  V4L/DVB (10130): use USB API functions rather than constants
  V4L/DVB (10129): dvb: remove deprecated use of RW_LOCK_UNLOCKED in frontends
  V4L/DVB (10128): modify V4L documentation to be a valid XHTML
  V4L/DVB (10127): stv06xx: Avoid having y unitialized
  V4L/DVB (10125): em28xx: Don't do AC97 vendor detection for i2s audio devices
  V4L/DVB (10124): em28xx: expand output formats available
  V4L/DVB (10123): em28xx: fix reversed definitions of I2S audio modes
  V4L/DVB (10122): em28xx: don't load em28xx-alsa for em2870 based devices
  V4L/DVB (10121): em28xx: remove worthless Pinnacle PCTV HD Mini 80e device profile
  V4L/DVB (10120): em28xx: remove redundant Pinnacle Dazzle DVC 100 profile
  V4L/DVB (10119): em28xx: fix corrupted XCLK value
  V4L/DVB (10118): zoran: fix warning for a variable not used
  V4L/DVB (10116): af9013: Fix gcc false warnings
  V4L/DVB (10111a): usbvideo.h: remove an useless blank line
  V4L/DVB (10111): quickcam_messenger.c: fix a warning
  V4L/DVB (10110): v4l2-ioctl: Fix warnings when using .unlocked_ioctl = __video_ioctl2
  V4L/DVB (10109): anysee: Fix usage of an unitialized function
  V4L/DVB (10104): uvcvideo: Add support for video output devices
  V4L/DVB (10102): uvcvideo: Ignore interrupt endpoint for built-in iSight webcams.
  V4L/DVB (10101): uvcvideo: Fix bulk URB processing when the header is erroneous
  ...
2008-12-30 17:41:32 -08:00
Linus Torvalds 14a3c4ab0e Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (407 commits)
  [ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devices
  [ARM] pxafb: cleanup of the timing checking code
  [ARM] pxafb: cleanup of the color format manipulation code
  [ARM] pxafb: add palette format support for LCCR4_PAL_FOR_3
  [ARM] pxafb: add support for FBIOPAN_DISPLAY by dma braching
  [ARM] pxafb: allow pxafb_set_par() to start from arbitrary yoffset
  [ARM] pxafb: allow video memory size to be configurable
  [ARM] pxa: add document on the MFP design and how to use it
  [ARM] sa1100_wdt: don't assume CLOCK_TICK_RATE to be a constant
  [ARM] rtc-sa1100: don't assume CLOCK_TICK_RATE to be a constant
  [ARM] pxa/tavorevb: update board support (smartpanel LCD + keypad)
  [ARM] pxa: Update eseries defconfig
  [ARM] 5352/1: add w90p910-plat config file
  [ARM] s3c: S3C options should depend on PLAT_S3C
  [ARM] mv78xx0: implement GPIO and GPIO interrupt support
  [ARM] Kirkwood: implement GPIO and GPIO interrupt support
  [ARM] Orion: share GPIO IRQ handling code
  [ARM] Orion: share GPIO handling code
  [ARM] s3c: define __io using the typesafe version
  [ARM] S3C64XX: Ensure CPU_V6 is selected
  ...
2008-12-30 17:36:49 -08:00
Julia Lawall 134179823b V4L/DVB (10130): use USB API functions rather than constants
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>
2008-12-30 09:40:40 -02:00
Steven Rostedt cec73844a9 V4L/DVB (10129): dvb: remove deprecated use of RW_LOCK_UNLOCKED in frontends
Impact: clean up

RW_LOCK_UNLOCKED is deprecated.  This patch replaces it with the
__RW_LOCK_UNLOCKED(lock) macro.  This change was a little trickier than
others due to the macro being used in another macro that fills an array.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:40 -02:00
Erik Andrén 1970f14fde V4L/DVB (10127): stv06xx: Avoid having y unitialized
As pointed by gcc:

drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c: In function ‘hdcs_set_size’:
drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c:301: warning: ‘y’ may be used uninitialized in this function

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:39 -02:00
Devin Heitmueller de84830e69 V4L/DVB (10125): em28xx: Don't do AC97 vendor detection for i2s audio devices
The current code was trying to query the AC97 registers for the vendor
information even if it was clearly not a AC97 audio device (resulting in errors
in the dmesg output).  This was due to a bug in the way we did the check.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:38 -02:00
Devin Heitmueller 3fbf930951 V4L/DVB (10124): em28xx: expand output formats available
Add additional output formats, which will be useful for the Pinnacle PCTV
Ultimate 880e integration with the saa7136.

Thanks to Ray Lu from Empia for providing the em2860/em2880 datasheet.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:38 -02:00
Devin Heitmueller 54d79e3398 V4L/DVB (10123): em28xx: fix reversed definitions of I2S audio modes
Noticed when doing the audio support for the Pinnacle PCTV HD Ultimate 808e
that the modes were incorrect (the 808e uses I2S in 5 sample mode)

Thanks for Ray Lu from Empia for providing the em2860/em2880 datasheet.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:37 -02:00
Devin Heitmueller 62f3e69bd5 V4L/DVB (10122): em28xx: don't load em28xx-alsa for em2870 based devices
Like the em2874, the em2870 does not have any analog support, so don't bother
loading the em28xx-alsa module.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:37 -02:00
Devin Heitmueller 7ed3a7a311 V4L/DVB (10121): em28xx: remove worthless Pinnacle PCTV HD Mini 80e device profile
The Pinnacle 80e cannot be supported since Micronas yanked their driver
support for the drx-j chipset at the last minute.  Remove the device profile
since it cannot work without the drx driver and it being there is only likely
to confuse people into thinking the device is supported but not working.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:36 -02:00
Devin Heitmueller e890759220 V4L/DVB (10120): em28xx: remove redundant Pinnacle Dazzle DVC 100 profile
The DVC 100 profile is redundant since we already have an existing identical
profile named "Pinnacle Dazzle DVC 90/DVC 100"

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:36 -02:00
Devin Heitmueller ed14e1c2f4 V4L/DVB (10119): em28xx: fix corrupted XCLK value
Correct problem introduced during the board refactoring where the XCLK
frequency would get zero'd out.  The sequence of events was as follows:

em28xx_pre_card_setup() called em28xx_set_model()
em28xx_set_model() would memcpy to dev->board configuration
em28xx_pre_card_setup() would set the dev->board.xclk if not set
em28xx_pre_card_setup() would set the XCLK register based on dev->board.xclk
...
em28xx_card_setup() would call em28xx_set_model()
em28xx_set_model() would memcpy to dev->board configuration (clearing out
 value of dev->board.xclk set in em28xx_pre_card_setup)
...
em28xx_audio_analog_set() sets the XCLK register based on dev->board.xclk
 (which now contains zero)

The change sets the default XCLK and I2C Clock fields in the board definition
inside of em28xx_set_model() so that subsequent calls do not cause the
values to be overwritten.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:35 -02:00
Mauro Carvalho Chehab 60b4bde48b V4L/DVB (10118): zoran: fix warning for a variable not used
Fix this warning:

drivers/media/video/zoran/zoran_card.c:156: warning: ‘zr36067_pci_tbl’ defined but not used

Currently, zoran driver relies on a find routine that doesn't use the
pci table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:35 -02:00
Mauro Carvalho Chehab 4d543096ee V4L/DVB (10116): af9013: Fix gcc false warnings
drivers/media/dvb/frontends/af9013.c: In function ‘af9013_set_coeff’:
drivers/media/dvb/frontends/af9013.c:231: warning: ‘ns_coeff2_8k’ may be used uninitialized in this function
drivers/media/dvb/frontends/af9013.c:230: warning: ‘ns_coeff2_2k’ may be used uninitialized in this function
drivers/media/dvb/frontends/af9013.c:229: warning: ‘ns_coeff1_8193nu’ may be used uninitialized in this function
drivers/media/dvb/frontends/af9013.c:228: warning: ‘ns_coeff1_8192nu’ may be used uninitialized in this function
drivers/media/dvb/frontends/af9013.c:227: warning: ‘ns_coeff1_8191nu’ may be used uninitialized in this function
drivers/media/dvb/frontends/af9013.c:226: warning: ‘ns_coeff1_2048nu’ may be used uninitialized in this function
drivers/media/dvb/frontends/af9013.c: In function ‘af9013_update_snr’:
drivers/media/dvb/frontends/af9013.c:1012: warning: ‘snr_table’ may be used uninitialized in this function

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:34 -02:00
Mauro Carvalho Chehab ed716dcb86 V4L/DVB (10111a): usbvideo.h: remove an useless blank line
This is needed to sync with the development tree. Probably, a merge
conflict were solved by adding this blank line.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:34 -02:00
Mauro Carvalho Chehab b484130661 V4L/DVB (10111): quickcam_messenger.c: fix a warning
drivers/media/video/usbvideo/quickcam_messenger.c: In function ‘qcm_sensor_init’:
drivers/media/video/usbvideo/quickcam_messenger.c:450: warning: operation on ‘ret’ may be undefined

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:33 -02:00
Mauro Carvalho Chehab 92ab788611 V4L/DVB (10110): v4l2-ioctl: Fix warnings when using .unlocked_ioctl = __video_ioctl2
This patch fixes this warning:

drivers/media/video/gspca/gspca.c:1811: warning: initialization from incompatible pointer type

The reason is that the returned argument should be a long, not an
integer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:33 -02:00
Mauro Carvalho Chehab 902571aaa9 V4L/DVB (10109): anysee: Fix usage of an unitialized function
drivers/media/dvb/dvb-usb/anysee.c: In function ‘anysee_master_xfer’:
drivers/media/dvb/dvb-usb/anysee.c:156: warning: ‘ret’ may be used uninitialized

By looking at the function, altrough very unlikely, this might
eventually be true if num  = 0. So, better to fix the warning by
initializing with ret = 0.

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:32 -02:00
Laurent Pinchart ff924203c9 V4L/DVB (10104): uvcvideo: Add support for video output devices
Extend the range of supported UVC devices by allowing video output devices
matching the following structure:

TT_STREAMING -> VC_PROCESSING_UNIT -> VC_EXTENSION_UNIT{0,n} -> OTT_*

Video output devices are reported with the V4L2_CAP_VIDEO_OUTPUT capability
flag and are subject to the same restrictions as video input devices.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:32 -02:00