hwspinlock: Add devm_xxx() APIs to request/free hwlock

This patch introduces some devm_xxx() APIs to help to request or free
the hwlocks, which will help to simplify the cleanup code for drivers
requesting one hwlock, ensuring that the hwlock is automatically freed
whenever the device is unbound.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Baolin Wang 2018-06-22 16:08:59 +08:00 • committed by Bjorn Andersson
commit 4f1acd758b
2 changed files with 132 additions and 0 deletions