OSDN Git Service

staging: xillybus: Use devm_ API for memory allocation and DMA mapping
authorEli Billauer <eli.billauer@gmail.com>
Sat, 21 Jun 2014 11:07:12 +0000 (14:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:19:25 +0000 (20:19 -0400)
commit525be905dc5db388487470be44734f6fb33a8fda
tree53b8300bb058ecab55c4d3b0c848e21fbe692576
parent31cd921dea3274202399078443dc6e93ca3f84c1
staging: xillybus: Use devm_ API for memory allocation and DMA mapping

Managed device resource API replaces code that reinvents it for memory
allocation, page allocation and DMA mapping.

devm_add_action() is used for unwinding DMA mappings, since there is no
devm_* API for dma_map_single(). A recent patch that introduces such API
was rejected, mainly on the grounds that it may cause an unnecessary waste of
resources.

Suggested-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xillybus/xillybus.h
drivers/staging/xillybus/xillybus_core.c
drivers/staging/xillybus/xillybus_of.c
drivers/staging/xillybus/xillybus_pcie.c