mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
hwspinlock: Add devm_xxx() APIs to register/unregister one hwlock controller
This patch introduces devm_hwspin_lock_register() and devm_hwspin_lock_unregister() interfaces to help to register or unregister one hardware spinlock controller, that will help to simplify the cleanup code for hwspinlock drivers. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
parent
4f1acd758b
commit
c102780acd
2 changed files with 88 additions and 0 deletions
|
@ -71,6 +71,12 @@ int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock);
|
|||
struct hwspinlock *devm_hwspin_lock_request(struct device *dev);
|
||||
struct hwspinlock *devm_hwspin_lock_request_specific(struct device *dev,
|
||||
unsigned int id);
|
||||
int devm_hwspin_lock_unregister(struct device *dev,
|
||||
struct hwspinlock_device *bank);
|
||||
int devm_hwspin_lock_register(struct device *dev,
|
||||
struct hwspinlock_device *bank,
|
||||
const struct hwspinlock_ops *ops,
|
||||
int base_id, int num_locks);
|
||||
|
||||
#else /* !CONFIG_HWSPINLOCK */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue