summaryrefslogtreecommitdiff
path: root/include/linux/hwspinlock.h
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2018-06-22 16:09:00 +0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-06-26 13:46:23 -0700
commitc102780acdbc22e5f664cfaf760eaccffbd6c385 (patch)
tree50c616d48090d5fd83c23efbfbb1b7e3c4af1a51 /include/linux/hwspinlock.h
parent4f1acd758b08d93306d13010c74d38dd8d9f5768 (diff)
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>
Diffstat (limited to 'include/linux/hwspinlock.h')
-rw-r--r--include/linux/hwspinlock.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h
index dfd05938a3cb..94064cce6962 100644
--- a/include/linux/hwspinlock.h
+++ b/include/linux/hwspinlock.h
@@ -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 */