1. 11 Oct, 2013 36 commits
  2. 08 Oct, 2013 4 commits
    • Ian Abbott's avatar
      staging: comedi: avoid memleak for subdevice private · 67aa4acb
      Ian Abbott authored
      `comedi_alloc_spriv()` allocates private storage for a comedi subdevice
      and sets the `SRF_FREE_SPRIV` flag in the `runflags` member of the
      subdevice to allow the private storage to be automatically freed when
      the comedi device is being cleaned up.  Unfortunately, the flag gets
      clobbered by `do_cmd_ioctl()` which calls
      `comedi_set_subdevice_runflags()` with a mask value `~0` and only the
      `SRF_USER` and `SRF_RUNNING` flags set, all the other SRF flags being
      cleared.
      
      Change the calls to `comedi_set_subdevice_runflags()` that currently use
      a mask value of `~0` to use a more relevant mask value.  For
      `do_cmd_ioctl()`, the relevant SRF flags are `SRF_USER`, `SRF_ERROR` and
      `SRF_RUNNING`.  (At one time, `SRF_RT` would be included in that set of
      flags, but it is no longer used.)  For `comedi_alloc_spriv()` replace
      the call to `comedi_set_subdevice_runflags()` with a simple
      OR-assignment to avoid unnecessary use of a spin-lock.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Cc: <stable@vger.kernel.org> # 3.11.y
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      67aa4acb
    • Malcolm Priestley's avatar
      staging: vt6656: rxtx.c cleanup s_vGenerateTxParameter · 92928f13
      Malcolm Priestley authored
      Remove white space and commented out code.
      Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      92928f13
    • Ian Abbott's avatar
      staging: comedi: remove 'settling_time_0' from subdevice · cd94d281
      Ian Abbott authored
      The `settling_time_0` member of `struct comedi_subdevice` can be set by
      a low-level comedi driver and will be copied to user-space as part of
      the information provided by the `COMEDI_SUBDINFO` ioctl.  No comedi
      driver has ever set it; it's just been left at its initial value of 0.
      Remove it to save a bit of space, and behave as though it is 0.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cd94d281
    • Ian Abbott's avatar
      staging: comedi: remove unused 'channel flags' support · 64d9b1d2
      Ian Abbott authored
      The `flags` and `flaglist` members of `struct comedi_subdevice` were
      defined to supply "all-channel" flags via the `COMEDI_SUBDINFO` ioctl,
      or "channel-specific" flags via the `COMEDI_CHANINFO` ioctls,
      respectively.  However, no comedi driver has ever set them.
      
      It's not entirely clear how "all-channel" flags would differ from the
      "subdevice" flags passed by `COMEDI_SUBDINFO`.  It is conceivable that
      "channel-specific" flags could be used to describe different analog
      reference values (or whatever) supported by different channels.
      Presumably these would use some sub-set of the `SDF_xxx` subdevice flag
      values, or possibly the `CR_xxx` flag values that get packed into a
      "chanspec" value (along with a channel number and range code).  The
      original intentions are lost in the mists of time.
      
      For now, just remove the `flags` and `flaglist` members from `struct
      comedi_subdevice` and behave as though they have been left at their
      default values (0 or NULL) by the low-level comedi driver.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      64d9b1d2