1. 22 12月, 2012 4 次提交
    • M
      [media] rc: Set rdev before irq setup · d62b6818
      Matthijs Kooijman 提交于
      This fixes a problem in fintek-cir and nuvoton-cir where the
      irq handler would trigger during module load before the rdev member was
      set, causing a NULL pointer crash.
      It seems this crash is very reproducible (just bombard the receiver with
      IR signals during module load), probably because when request_irq is
      called, any pending intterupt is handled immediately, before
      request_irq returns and rdev can be set.
      This same crash was supposed to be fixed by commit
      9ef449c6 ("[media] rc: Postpone ISR
      registration"), but the crash was still observed on the nuvoton-cir
      driver.
      This commit was tested on nuvoton-cir only.
      
      Cc: Jarod Wilson <jarod@redhat.com>
      Signed-off-by: NMatthijs Kooijman <matthijs@stdin.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d62b6818
    • M
      [media] rc: Make probe cleanup goto labels more verbose · 70ef6991
      Matthijs Kooijman 提交于
      Before, labels were simply numbered. Now, the labels are named after the
      cleanup action they'll perform (first), based on how the winbond-cir
      driver does it. This makes the code a bit more clear and makes changes
      in the ordering of labels easier to review.
      This change is applied only to the rc drivers that do significant
      cleanup in their probe functions: ati-remote, ene-ir, fintek-cir,
      gpio-ir-recv, ite-cir, nuvoton-cir.
      This commit should not change any code, it just renames goto labels.
      
      [mchehab@redhat.com: removed changes at gpio-ir-recv.c, due to
       merge conflicts]
      Signed-off-by: NMatthijs Kooijman <matthijs@stdin.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      70ef6991
    • J
      [media] rc: Fix double free in gpio_ir_recv_remove() · bbe2a1d3
      Jesper Juhl 提交于
      Since rc_unregister_device() frees its argument there's no need to
      subsequently call rc_free_device() on the same variable - in fact it's
      a double free bug.
      Easily fixed by just removing the rc_free_device() call.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      bbe2a1d3
    • J
      [media] rc: Fix double free in gpio_ir_recv_probe() · e5d85b9a
      Jesper Juhl 提交于
      At the 'err_request_irq' label, rc_unregister_device(rcdev) frees its
      argument. So when we fall through to the 'err_gpio_request' label
      further down and call rc_free_device(rcdev) then that's a double free.
      Fix that by moving 'rcdev = NULL' from after the call to
      rc_free_device() to after rc_unregister_device(). That fixes the
      problem since rc_free_device() just does nothing if passed NULL and
      there's no further use of 'rcdev' after the call to rc_free_device()
      so it's not needed there.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      e5d85b9a
  2. 22 11月, 2012 3 次提交
  3. 29 10月, 2012 2 次提交
  4. 28 10月, 2012 5 次提交
  5. 27 10月, 2012 2 次提交
    • D
      [media] rc-core: add separate defines for protocol bitmaps and numbers · c003ab1b
      David Härdeman 提交于
      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: NDavid 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: NMauro Carvalho Chehab <mchehab@redhat.com>
      c003ab1b
    • S
      [media] media/ir_rx51: use module_platform_driver macro · 304ce75d
      Srinivas Kandagatla 提交于
      This patch removes some code duplication by using
      module_platform_driver.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      304ce75d
  6. 07 10月, 2012 3 次提交
  7. 06 10月, 2012 2 次提交
  8. 26 9月, 2012 2 次提交
  9. 24 9月, 2012 2 次提交
  10. 18 9月, 2012 1 次提交
  11. 16 9月, 2012 4 次提交
  12. 15 9月, 2012 3 次提交
  13. 14 8月, 2012 7 次提交