Commit Graph

280 Commits (895507c19f88b7bbf82f24737d86cca0398647cb)

Author SHA1 Message Date
Mauro Carvalho Chehab a3faff2b39 fintek-cir: get rid of warning: no previous prototype
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>

drivers/media/rc/fintek-cir.c:687:5: warning: no previous prototype for 'fintek_init' [-Wmissing-prototypes]
drivers/media/rc/fintek-cir.c:692:6: warning: no previous prototype for 'fintek_exit' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28 07:39:05 -02:00
Mauro Carvalho Chehab 230dc94a2a [media] nuvoton-cir: carrier detect support is broken - remove it
The carrier detect return value is never used on nuvoton driver:
drivers/media/rc/nuvoton-cir.c: In function 'nvt_process_rx_ir_data':
drivers/media/rc/nuvoton-cir.c:623:6: warning: variable 'carrier' set but not used [-Wunused-but-set-variable]
Also, this would be called only if a boolean variable is enabled,
but there's no condition that enables it inside the driver. So,
comment the carrier detection code, as it might be useful later,
and remove the unused glue code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 18:10:07 -02:00
Mauro Carvalho Chehab 8e1803f4cd [media] nuvoton-cir: get rid of warning: no previous prototype
drivers/media/rc/nuvoton-cir.c:1223:5: warning: no previous prototype for 'nvt_init' [-Wmissing-prototypes]
drivers/media/rc/nuvoton-cir.c:1228:6: warning: no previous prototype for 'nvt_exit' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 18:09:53 -02:00
Mauro Carvalho Chehab 3d4bf09c1d [media] ite-cir.c: get rid of warning: no previous prototype
drivers/media/rc/ite-cir.c:1711:5: warning: no previous prototype for 'ite_init' [-Wmissing-prototypes]
drivers/media/rc/ite-cir.c:1716:6: warning: no previous prototype for 'ite_exit' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 18:09:42 -02:00
Mauro Carvalho Chehab e03cd645df [media] ene_cir: get rid of warning: no previous prototype
drivers/media/rc/ene_ir.c:332:6: warning: no previous prototype for 'ene_rx_sense_carrier' [-Wmissing-prototypes]

Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 18:08:40 -02:00
David Härdeman c003ab1bed [media] rc-core: add separate defines for protocol bitmaps and numbers
The RC_TYPE_* defines are currently used both where a single protocol is
expected and where a bitmap of protocols is expected.

Functions like rc_keydown() and functions which add/remove entries to the
keytable want a single protocol. Future userspace APIs would also
benefit from numeric protocols (rather than bitmap ones). Keytables are
smaller if they can use a small(ish) integer rather than a bitmap.

Other functions or struct members (e.g. allowed_protos,
enabled_protocols, etc) accept multiple protocols and need a bitmap.

Using different types reduces the risk of programmer error. Using a
protocol enum whereever possible also makes for a more future-proof
user-space API as we don't need to worry about a sufficient number of
bits being available (e.g. in structs used for ioctl() calls).

The use of both a number and a corresponding bit is dalso one in e.g.
the input subsystem as well (see all the references to set/clear bit when
changing keytables for example).

This patch separate the different usages in preparation for
upcoming patches.

Where a single protocol is expected, enum rc_type is used; where one or more
protocol(s) are expected, something like u64 is used.

The patch has been rewritten so that the format of the sysfs "protocols"
file is no longer altered (at the loss of some detail). The file itself
should probably be deprecated in the future though.

Signed-off-by: David Härdeman <david@hardeman.nu>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Antti Palosaari <crope@iki.fi>
Cc: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 11:49:51 -02:00
Srinivas Kandagatla 304ce75dd5 [media] media/ir_rx51: use module_platform_driver macro
This patch removes some code duplication by using
module_platform_driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 11:36:29 -02:00
Wolfgang Bail b45681a60e [media] rc-msi-digivox-ii: Add full scan keycodes
The ir-rc from my MSI DigiVox mini II Version 3 (af9015) will not work since
kernel 3.2.x.

sudo ir-keytable -t shows:

	1348890734.303273: event MSC: scancode = 317
	1348890734.303280: event key down: KEY_POWER (0x0074)
	1348890734.303282: event sync
	1348890734.553961: event key up: KEY_POWER (0x0074)
	1348890734.553963: event sync
	1348890741.303451: event MSC: scancode = 30d
	1348890741.303457: event key down: KEY_DOWN (0x006c)
	1348890741.303459: event sync
	1348890741.553956: event key up: KEY_DOWN (0x006c)

So I changed in rc-msi-digivox-ii.c { 0x0002, KEY_2 }, to { 0x0302, KEY_2 },
and so on. And now it works well.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:57:34 -03:00
Sean Young 54fd321e13 [media] winbond: remove space from driver name
-snip-
ACTION=add
DEVPATH=/devices/pnp0/00:04/rc/rc0
DRV_NAME=Winbond CIR
NAME=rc-rc6-mce
SUBSYSTEM=rc
UDEV_LOG=6
USEC_INITIALIZED=88135858
run: '/usr/bin/ir-keytable -a /etc/rc_maps.cfg -s rc0'
Having a space makes it impossible to match in /etc/rc_maps.cfg.

[root@pequod ~]# udevadm test /sys/class/rc/rc0
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:04:18 -03:00
Sean Young 48b0fa6afa [media] iguanair: cannot send data from the stack
Note that the firmware already disables the receiver before transmit,
there is no need to do this from the driver.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-07 09:03:35 -03:00
Dan Carpenter 5f49908adb [media] rc-core: fix return codes in ir_lirc_ioctl()
These should be -ENOSYS because not -EINVAL.

Reported-by: Sean Young <sean@mess.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:25:01 -03:00
Dan Carpenter 48cafec9a9 [media] rc: divide by zero bugs in s_tx_carrier()
"carrier" comes from a get_user() in ir_lirc_ioctl().  We need to test
that it's not zero before using it as a divisor.  It might have been
nice to test for this ir_lirc_ioctl() but the mceusb driver uses zero to
disable carrier modulation.
The bug in redrat3 is a little more subtle.  The ->carrier is passed to
mod_freq_to_val() which uses it as a divisor.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:24:39 -03:00
David Härdeman 7bfb5dc1cd [media] winbond-cir: asynchronous tx
Change winbond-cir's tx support to be asynchronous and not to mess with
the TX buffer. Essentially the winbond-cir counterpart to the patch
Sean Young sent for iguanair.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-25 14:08:46 -03:00
David Härdeman 30cedcf34f [media] winbond-cir: correctness fix
This is a minor correctness fix for the duration calculation in
winbond-cir (the read value should be incremented by one).

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-25 13:09:10 -03:00
Peter Senna Tschudin a84b17e20f [media] drivers/media/rc/ati_remote.c: fix error return code
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-23 13:42:45 -03:00
Peter Senna Tschudin 6ea7cf7680 [media] drivers/media/rc/redrat3.c: fix error return code
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-23 13:40:14 -03:00
Jean Delvare ed7dd24007 [media] mceusb: Optimize DIV_ROUND_CLOSEST call
DIV_ROUND_CLOSEST is faster if the compiler knows it will only be
dealing with unsigned dividends.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-18 12:22:58 -03:00
Timo Kokkonen 36aee5ff90 [media] ir-rx51: Adjust dependencies
Although this kind of IR diode circuitry is known to exist only in
N900 hardware, nothing prevents making similar circuitry on any OMAP
based board. The MACH_NOKIA_RX51 dependency is thus not something we
want to be there.

Also, this should depend on LIRC as it is a LIRC driver.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15 19:44:30 -03:00
Timo Kokkonen 362b29ba6e [media] ir-rx51: Trivial fixes
-Fix typo
-Change pwm_timer_num type to match type in platform data
-Remove extra parenthesis
-Replace magic constant with proper bit defintions
-Remove duplicate exit pointer

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15 15:07:31 -03:00
Sean Young 3404cb5c4d [media] ttusbir: ad support suspend and resume
While here, fix the led name: the led is green, not yellow.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15 13:28:03 -03:00
Sean Young 3920631c4b [media] iguanair: do not modify transmit buffer
Since commit "[media] rc-core: move timeout and checks to lirc", the
incoming buffer is used after the driver transmits.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15 13:08:04 -03:00
Sean Young 3ab2a83eaf [media] ttusbir: Add USB dependency
This patch fixes the error:
ERROR: "usb_speed_string" [drivers/usb/core/usbcore.ko] undefined!

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15 11:52:24 -03:00
Sean Young 586c61fd88 [media] rc: fix buffer overrun
"[media] rc-core: move timeout and checks to lirc" introduced a buffer
overrun by passing the number of bytes, rather than the number of samples,
to the transmit function.

Signed-off-by: Sean Young <sean@mess.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15 11:51:28 -03:00
Ben Hutchings 4b961180ef [media] rc: ite-cir: Initialise ite_dev::rdev earlier
ite_dev::rdev is currently initialised in ite_probe() after
rc_register_device() returns.  If a newly registered device is opened
quickly enough, we may enable interrupts and try to use ite_dev::rdev
before it has been initialised.  Move it up to the earliest point we
can, right after calling rc_allocate_device().

Reported-and-tested-by: YunQiang Su <wzssyqa@gmail.com>

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-14 14:04:16 -03:00
Mauro Carvalho Chehab 79e8c7bebb Linux 3.6-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJQNUEyAAoJEHm+PkMAQRiGs+sH/iLtdAVcfBfUwdmGV0qDXbVE
 L3gCg3IERPCSaQo8qsT3zujdLAQ2HsiMs73jbqJaBWSV16ZMqkglRKbn+QMGpqJV
 bi/pf5Akrm9IL/u+427ycB8QxzyjGal8uJ6btuwXa03VROSfOsEiQbtsByFNaDv/
 8oq0/DaE8mWRedlcAaeN+l8nD4Enb2jSKp0UADkBMnUr4KCbwSVQ+ITXAggqVq23
 htA3Yt0oGf1JYq+k99D5k92h0I/4VwiorUgwPKhmS5DM9gVtJ4L+SigbekS/MFq+
 huyzOHRWlO++OxBlgSTMuJAE1k/G2B7tGeoERY0tEL/hAWcKYTfGIXSc7X6JvM0=
 =Dmsv
 -----END PGP SIGNATURE-----

Merge tag 'v3.6-rc3' into staging/for_v3.7

Linux 3.6-rc3

* tag 'v3.6-rc3': (764 commits)
  Linux 3.6-rc3
  task_work: add a scheduling point in task_work_run()
  fs: fix fs/namei.c kernel-doc warnings
  eventpoll: use-after-possible-free in epoll_create1()
  vfio: grab vfio_device reference *before* exposing the sucker via fd_install()
  vfio: get rid of vfio_device_put()/vfio_group_get_device* races
  vfio: get rid of open-coding kref_put_mutex
  introduce kref_put_mutex()
  vfio: don't dereference after kfree...
  fbcon: fix race condition between console lock and cursor timer (v1.1)
  mm: compaction: Abort async compaction if locks are contended or taking too long
  mm: have order > 0 compaction start near a pageblock with free pages
  rapidio/tsi721: fix unused variable compiler warning
  rapidio/tsi721: fix inbound doorbell interrupt handling
  drivers/rtc/rtc-rs5c348.c: fix hour decoding in 12-hour mode
  mm: correct page->pfmemalloc to fix deactivate_slab regression
  drivers/rtc/rtc-pcf2123.c: initialize dynamic sysfs attributes
  mm/compaction.c: fix deferring compaction mistake
  drivers/misc/sgi-xp/xpc_uv.c: SGI XPC fails to load when cpu 0 is out of IRQ resources
  string: do not export memweight() to userspace
  ...
2012-08-24 11:25:10 -03:00
Mauro Carvalho Chehab 2ea4b44258 [media] rc/Kconfig: Fix a warning
drivers/media/rc/Kconfig:291:warning: multi-line strings not supported

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 23:00:33 -03:00
David Härdeman f8e00d5fa8 [media] rc-core: move timeout and checks to lirc
The lirc TX functionality expects the process which writes (TX) data to
the lirc dev to sleep until the actual data has been transmitted by the
hardware.

Since the same timeout calculation is duplicated in more than one driver
(and would have to be duplicated in even more drivers as they gain TX
support), it makes sense to move this timeout calculation to the lirc
layer instead.

At the same time, centralize some of the sanity checks.

Signed-off-by: David Härdeman <david@hardeman.nu>
Cc: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 19:59:41 -03:00
Timo Kokkonen c332e8472d [media] media: rc: Introduce RX51 IR transmitter driver
This is the driver for the IR transmitter diode found on the Nokia
N900 (also known as RX51) device. The driver is mostly the same as
found in the original 2.6.28 based kernel that comes with the device.

The following modifications have been made compared to the original
driver version:

- Adopt to the changes that has happen in the kernel during the past
  five years, such as the change in the include paths

- The OMAP DM-timers require much more care nowadays. The timers need
  to be enabled and disabled or otherwise many actions fail. Timers
  must not be freed without first stopping them or otherwise the timer
  cannot be requested again.

The code has been tested with sending IR codes with N900 device
running Debian userland. The device receiving the codes was Anysee
DVB-C USB receiver.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:53:45 -03:00
Andy Shevchenko 7c94c69d20 [media] ati_remote: use %*ph to dump small buffers
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:39:51 -03:00
Sean Young d07df223ab [media] rc: transmit on device which does not support it should fail
Currently write() will return 0 if an IR device does not support sending.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:19:14 -03:00
Sean Young b83bfd1b01 [media] rc: do not wake up rc thread unless there is something to do
The TechnoTrend USB IR Receiver sends 125 ISO URBs per second, even when
there is no IR activity. Reduce the number of wake ups from the other
drivers too.

This saves about 0.25ms/s on a 2.4GHz Core 2 according to powertop.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:19:12 -03:00
Sean Young 0938069fa0 [media] rc: Add support for the TechnoTrend USB IR Receiver
This driver adds support for TechnoTrend USB IR Receiver. It is a complete
rewrite of the staging/media/lirc/lirc_ttusbir driver. It adds more
accurate sample reporting and led control.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:19:11 -03:00
Sean Young 640583836b [media] iguanair: fix receiver overflow
The Pioneer CU-700 remote causes receiver overflows if you hold down any
button. The remote does not send NEC IR repeats, it repeats the entire
NEC code after 20ms.

The iguanair hardware advertises an interval of 10 which just not enough;
with 100 URBs per second and at most 7 edges per URB, we handle at most
700 edges per second. The remote generates about 900.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:19:10 -03:00
Sean Young 2eec676cd3 [media] iguanair: advertise the resolution and timeout properly
With the timeout supplied the interface can go idle. The keymap is
the same one as other drivers which do not come with a remote.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:19:10 -03:00
Sean Young 116e4f592a [media] iguanair: reset the IR state after rx overflow or receiver enable
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:07:19 -03:00
Sean Young 884bfd08e3 [media] iguanair: fix return value for transmit
Also fix error codes returned from open.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:07:00 -03:00
Sean Young 7c0bd96b76 [media] iguanair: support suspend and resume
Now unbind also stops the receiver.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:06:22 -03:00
Sean Young 0797b4802b [media] iguanair: ignore unsupported firmware versions
Firmware versions lower than 0x0205 use a different interface which is not
supported. Also report the firmware version in the standard format.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:05:57 -03:00
Sean Young e99a7cfe93 [media] iguanair: reuse existing urb callback for command responses
Rather than using usb_interrupt_msg() to receive responses, reuse the
urb callback we already have in place.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:04:18 -03:00
Guenter Roeck ac6eb458f5 [media] Add USB dependency for IguanaWorks USB IR Transceiver
This patch fixes the error
	drivers/usb/core/hub.c:3753: undefined reference to `usb_speed_string'
seen in various random configurations.

Cc: Sean Young <sean@mess.org>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12 07:35:00 -03:00
Sean Young 743135e7a5 [media] nec-decoder: fix NEC decoding for Pioneer Laserdisc CU-700 remote
This remote sends a header pulse of 8150us followed by a space of 4000us.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-11 17:31:22 -03:00
Sean Young 26ff63137c [media] Add support for the IguanaWorks USB IR Transceiver
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 21:53:49 -03:00
Sean Young 6ac454aa98 [media] Minor cleanups for MCE USB
Signed-off-by: Sean Young <sean@mess.org>
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 21:50:19 -03:00
Mark Lord a4de5f058c [media] mceusb: Add Twisted Melon USB IDs
Add USB identifiers for MCE compatible I/R transceivers from Twisted Melon.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 21:36:03 -03:00
Du, Changbin a342daea70 [media] rc: ati_remote.c: code style fixing
changes:
	1. wrap some lines that are longer than 80 characters.
	2. remove local function prototype declarations which do not
	   need.
	3. replace TAB character with a space character in function
	   comments.

Signed-off-by: Du, Changbin <changbin.du@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 21:17:23 -03:00
Douglas Bagnall 720bb6436f [media] Avoid sysfs oops when an rc_dev's raw device is absent
For some reason, when the lirc daemon learns that a usb remote control
has been unplugged, it wants to read the sysfs attributes of the
disappearing device. This is useful for uncovering transient
inconsistencies, but less so for keeping the system running when such
inconsistencies exist.

Under some circumstances (like every time I unplug my dvb stick from
my laptop), lirc catches an rc_dev whose raw event handler has been
removed (presumably by ir_raw_event_unregister), and proceeds to
interrogate the raw protocols supported by the NULL pointer.

This patch avoids the NULL dereference, and ignores the issue of how
this state of affairs came about in the first place.

Version 2 incorporates changes recommended by Mauro Carvalho Chehab
(-ENODEV instead of -EINVAL, and a signed-off-by).

Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 21:15:32 -03:00
Mauro Carvalho Chehab 931efdf58b Merge branch 'v4l_for_linus' into staging/for_v3.6
* v4l_for_linus: (31 commits)
  [media] Revert "[media] V4L: JPEG class documentation corrections"
  [media] s5p-fimc: Add missing FIMC-LITE file operations locking
  [media] omap3isp: preview: Fix contrast and brightness handling
  [media] omap3isp: preview: Fix output size computation depending on input format
  [media] winbond-cir: Initialise timeout, driver_type and allowed_protos
  [media] winbond-cir: Fix txandrx module info
  [media] cx23885: Silence unknown command warnings
  [media] cx23885: add support for HVR-1255 analog (cx23888 variant)
  [media] cx23885: make analog support work for HVR_1250 (cx23885 variant)
  [media] cx25840: fix vsrc/hsrc usage on cx23888 designs
  [media] cx25840: fix regression in HVR-1800 analog audio
  [media] cx25840: fix regression in analog support hue/saturation controls
  [media] cx25840: fix regression in HVR-1800 analog support
  [media] s5p-mfc: Fixed setup of custom controls in decoder and encoder
  [media] cx231xx: don't DMA to random addresses
  [media] em28xx: fix em28xx-rc load
  [media] dvb-core: Release semaphore on error path dvb_register_device()
  [media] s5p-fimc: Stop media entity pipeline if fimc_pipeline_validate fails
  [media] s5p-fimc: Fix compiler warning in fimc-lite.c
  [media] s5p-fimc: media_entity_pipeline_start() may fail
  ...
2012-07-14 15:45:44 -03:00
Joe Perches 563cd5cec4 [media] media: Use pr_info not homegrown pr_reg macro
No need to duplicate normal kernel logging capabilities.

Add pr_fmt and convert pr_reg to pr_info.
Remove pr_reg macros.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 20:41:12 -03:00
Anton Blanchard 8299d62843 [media] winbond-cir: Initialise timeout, driver_type and allowed_protos
We need to set a timeout so we can go idle on no activity.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:38 -03:00
Anton Blanchard 57f4422f7b [media] winbond-cir: Fix txandrx module info
We aren't getting any module info for the txandx option because
of a typo:

parm:           txandrx:bool

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:37 -03:00