History log of /drivers/media/rc/lirc_dev.c
Revision Date Author Comments
60519af3fd0e75a97036075fc657f1ebe87e0f0d 21-Aug-2014 Hans Verkuil <hans.verkuil@cisco.com> [media] lirc_dev: fix sparse warnings

drivers/media/rc/lirc_dev.c:598:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:606:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:616:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:625:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:634:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:643:26: warning: incorrect type in argument 1 (different address spaces)
drivers/media/rc/lirc_dev.c:739:45: warning: cast removes address space of expression
drivers/media/rc/lirc_dev.c:739:58: warning: incorrect type in argument 1 (different address spaces)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
ca7a722db1c90dfe0dba165ecef01d6ac8cfee0d 22-Jul-2013 Srinivas Kandagatla <srinivas.kandagatla@st.com> [media] media: lirc: Allow lirc dev to talk to rc device

The use case is simple, if any rc device has allowed protocols =
RC_TYPE_LIRC and map_name = RC_MAP_LIRC set, the driver open will be never
called. The reason for this is, all of the key maps except lirc have some
KEYS in there map, so during rc_register_device process these keys are
matched against the input drivers and open is performed, so for the case
of RC_MAP_EMPTY, a vt/keyboard is matched and the driver open is
performed.
In case of lirc, there is no match and result is that there is no open
performed, however the lirc-dev will go ahead and create a /dev/lirc0
node. Now when lircd/mode2 opens this device, no data is available
because the driver was never opened.
Other case pointed by Sean Young, As rc device gets opened via the
input interface. If the input device is never opened (e.g. embedded with
no console) then the rc open is never called and lirc will not work
either. So that's another case.
lirc_dev seems to have no link with actual rc device w.r.t open/close.
This patch adds rc_dev pointer to lirc_driver structure for cases like
this, so that it can do the open/close of the real driver in accordance
to lircd/mode2 open/close.
Without this patch its impossible to open a rc device which has
RC_TYPE_LIRC ad RC_MAP_LIRC set.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
75ef9de1267ba171ecefafca35758e2be0db10dc 05-Apr-2013 Al Viro <viro@zeniv.linux.org.uk> constify a bunch of struct file_operations instances

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
0990a97a1fc649bf9a7e6057c326a835d1520847 25-Jan-2013 Al Viro <viro@zeniv.linux.org.uk> lirc: get rid of bogus checks

file argument is a struct file being passed to ->open() or
already opened; none of the checks in lirc_get_pdata()
can fail.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
496ad9aa8ef448058e36ca7a787c61f2e63f0f54 23-Jan-2013 Al Viro <viro@zeniv.linux.org.uk> new helper: file_inode(file)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
90ab5ee94171b3e28de6bb42ee30b527014e0be7 13-Jan-2012 Rusty Russell <rusty@rustcorp.com.au> module_param: make bool parameters really bool (drivers & misc)

module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8de111e27688798623b9e9062235bb0cac29f599 27-May-2011 Jarod Wilson <jarod@redhat.com> [media] lirc_dev: store cdev in irctl, up maxdevs

Store the cdev pointer in struct irctl, allocated dynamically as needed,
rather than having a static array. At the same time, recycle some of the
saved memory to nudge the maximum number of lirc devices supported up a
ways -- its not that uncommon these days, now that we have the rc-core
lirc bridge driver, to see a system with at least 4 raw IR receivers.
(consider a mythtv backend with several video capture devices and the
possible need for IR transmit hardware).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
b395cbac36e58a55729fe7e6262a3f0b1691bced 26-Nov-2010 Vasiliy Kulikov <segoon@openwall.com> [media] media: rc: lirc_dev: check kobject_set_name() result

kobject_set_name() may fail with -ENOMEM, check for it.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
0e835087dfe7db19f1f072046f5e116d4ec6662b 17-Nov-2010 Dan Carpenter <error27@gmail.com> [media] lirc_dev: add some __user annotations

Sparse complains because there are no __user annotations.

drivers/media/rc/lirc_dev.c:156:27: warning:
incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/media/rc/lirc_dev.c:156:27: expected int ( *read )( ... )
drivers/media/rc/lirc_dev.c:156:27: got int ( extern [toplevel] *<noident> )( ... )

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
32cf86f6d16367db5a10039c1dd938a2427d697c 10-Nov-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rename drivers/media/IR to drives/media/rc

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>