1. 23 Apr, 2013 2 commits
    • Arnd Bergmann's avatar
      staging: nvec: allow modular build · 14d7547c
      Arnd Bergmann authored
      The serio code can be a loadable module, which in turn means that nvec
      also has to be a module, so mark it as "tristate" in Kconfig.
      
      drivers/built-in.o: In function `nvec_mouse_remove':
      drivers/staging/nvec/nvec_ps2.c:136: undefined reference to `serio_unregister_port'
      drivers/built-in.o: In function `nvec_mouse_probe':
      drivers/staging/nvec/nvec_ps2.c:126: undefined reference to `__serio_register_port'
      drivers/built-in.o: In function `nvec_ps2_notifier':
      drivers/staging/nvec/nvec_ps2.c:84: undefined reference to `serio_interrupt'
      drivers/staging/nvec/nvec_ps2.c:91: undefined reference to `serio_interrupt'
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Marc Dietrich <marvin24@gmx.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      14d7547c
    • Arnd Bergmann's avatar
      staging/zsmalloc: don't use pgtable-mapping from modules · 796ce5a7
      Arnd Bergmann authored
      Building zsmalloc as a module does not work on ARM because it uses
      an interface that is not exported:
      
      ERROR: "flush_tlb_kernel_range" [drivers/staging/zsmalloc/zsmalloc.ko] undefined!
      
      Since this is only used as a performance optimization and only on ARM,
      we can avoid the problem simply by not using that optimization when
      building zsmalloc it is a loadable module.
      
      flush_tlb_kernel_range is often an inline function, but out of the
      architectures that use an extern function, only powerpc exports
      it.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
      Cc: Nitin Gupta <ngupta@vflare.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      796ce5a7
  2. 22 Apr, 2013 4 commits
  3. 19 Apr, 2013 13 commits
  4. 17 Apr, 2013 2 commits
    • H Hartley Sweeten's avatar
      staging: comedi: introduce, and use, comedi_spriv_free() · 2f69915c
      H Hartley Sweeten authored
      The comedi_subdevice 'private' variable is a void * that is available
      for the subdevice to use in manner. It's common in comedi drivers for
      the driver to allocate memory for a subdevice and store the pointer
      to that memory in the 'private' variable. It's then the responsibility
      of the driver to free that memory when the device is detached.
      
      Due to how the attach/detach works in comedi, the drivers need to do
      some sanity checking before they can free the allocated memory during
      the detach.
      
      Introduce a helper function, comedi_spriv_free(), to handle freeing
      the private data allocated for a subdevice. This allows moving all the
      sanity checks into the helper function and makes it safe to call
      with any context. It also allows removing some of the boilerplate
      code in the (*detach) functions.
      
      Remove the subdev_8255_cleanup() export in the 8255 subdevice driver
      as well as the addi_watchdog_cleanup() export in the addi_watchdog
      driver and use the new helper instead.
      
      The amplc_dio200_common driver uses a number of local helper functions
      to free the private data for it's subdevices. Remove those as well and
      use the new helper.
      Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2f69915c
    • H Hartley Sweeten's avatar
      staging: comedi: unionxx5: fix memory leak during subdevice init · f4362867
      H Hartley Sweeten authored
      In the subdevice init during the attach of this driver, private data
      is allocated for each subdevice. The pointer to this data is then
      saved in the subdevice 's->private' so it can be free'ed during the
      detach.
      
      In __unioxx5_subdev_init() an error path exists that can happen before
      the allocated pointer is saved in s->private. Make sure the allocated
      memory is free'ed before returning the error.
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f4362867
  5. 15 Apr, 2013 9 commits
  6. 14 Apr, 2013 10 commits