1. 01 8月, 2013 1 次提交
    • S
      [media] media: lirc: Allow lirc dev to talk to rc device · ca7a722d
      Srinivas Kandagatla 提交于
      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: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      ca7a722d
  2. 11 6月, 2011 1 次提交
    • J
      [media] lirc_dev: store cdev in irctl, up maxdevs · 8de111e2
      Jarod Wilson 提交于
      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: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      8de111e2
  3. 29 12月, 2010 1 次提交
  4. 21 10月, 2010 2 次提交
    • J
      [media] IR/lirc: further ioctl portability fixups · be1f985f
      Jarod Wilson 提交于
      >From Joris van Rantwijk <jorispubl@xs4all.nl>:
      
      	I tested lirc_serial and found that it works fine.
      	Except the LIRC ioctls do not work in my 64-bit-kernel/32-bit-user
      	setup. I added compat_ioctl entries in the drivers to fix this.
      
      	While doing so, I noticed inconsistencies in the argument type of
      	the LIRC ioctls. All ioctls are declared in lirc.h as having argument
      	type __u32, however there are a few places where the driver calls
      	get_user/put_user with an unsigned long argument.
      
      	The patch below changes lirc_dev and lirc_serial to use __u32 for all
      	ioctl arguments, and adds compat_ioctl entries.
      	It should probably also be done in the other low-level drivers,
      	but I don't have hardware to test those.
      
      I've dropped the .compat_ioctl addition from Joris' original patch,
      as I swear the non-compat definition should now work for both 32-bit
      and 64-bit userspace. Technically, I think we still need/want a
      in getting a reply to you).
      Reported-by: NJoris van Rantwijk <jorispubl@xs4all.nl>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      be1f985f
    • G
      [media] lirc: Make struct file_operations pointer const · 22c00854
      Geert Uytterhoeven 提交于
      struct file_operations was made const in the drivers, but not in struct
      lirc_driver:
      
      drivers/staging/lirc/lirc_it87.c:365: warning: initialization discards qualifiers from pointer target type
      drivers/staging/lirc/lirc_parallel.c:571: warning: initialization discards qualifiers from pointer target type
      drivers/staging/lirc/lirc_serial.c:1073: warning: initialization discards qualifiers from pointer target type
      drivers/staging/lirc/lirc_sir.c:482: warning: initialization discards qualifiers from pointer target type
      drivers/staging/lirc/lirc_zilog.c:1284: warning: assignment discards qualifiers from pointer target type
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      22c00854
  5. 03 8月, 2010 3 次提交