1. May 03, 2013
    • Vinod Koul's avatar
      Merge branch 'topic/of' into for-linus · b2396f79
      Vinod Koul authored
      
      
      Conflicts:
      	include/linux/dmaengine.h
      
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      b2396f79
    • Lars-Peter Clausen's avatar
      dma:of: Use a mutex to protect the of_dma_list · de61608a
      Lars-Peter Clausen authored
      
      
      Currently the OF DMA code uses a spin lock to protect the of_dma_list from
      concurrent access and a per controller reference count to protect the controller
      from being freed while a request operation is in progress. If
      of_dma_controller_free() is called for a controller who's reference count is not
      zero it will return -EBUSY and not remove the controller. This is fine up until
      here, but leaves the question what the caller of of_dma_controller_free() is
      supposed to do if the controller couldn't be freed.  The only viable solution
      for the caller is to spin on of_dma_controller_free() until it returns success.
      E.g.
      
      	do {
      		ret = of_dma_controller_free(dev->of_node)
      	} while (ret != -EBUSY);
      
      This is rather ugly and unnecessary and none of the current users of
      of_dma_controller_free() check it's return value anyway. Instead protect the
      list by a mutex. The mutex will be held as long as a request operation is in
      progress. So if of_dma_controller_free() is called while a request operation is
      in progress it will be put to sleep and only wake up once the request operation
      has finished.
      
      This means that it is no longer possible to register or unregister OF DMA
      controllers from a context where it's not possible to sleep. But I doubt that
      we'll ever need this.
      
      Also rename of_dma_get_controller back to of_dma_find_controller.
      
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      de61608a
    • Lars-Peter Clausen's avatar
      dma: of: Fix of_node reference leak · f22eb140
      Lars-Peter Clausen authored
      
      
      of_dma_request_slave_channel() currently does not drop the reference to the
      dma_spec of_node if no DMA controller matching the of_node could be found. This
      patch fixes it by always calling of_node_put().
      
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarJon Hunter <jon-hunter@ti.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      f22eb140
  2. May 02, 2013
  3. Apr 30, 2013
  4. Apr 16, 2013
  5. Apr 15, 2013