summaryrefslogtreecommitdiff
path: root/drivers/hwspinlock
diff options
context:
space:
mode:
authorChunyan Zhang <chunyan.zhang@unisoc.com>2020-10-30 06:46:54 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2020-11-03 03:04:06 +0300
commit8308678ebde1cbca9fb628ba2e7b6e4ea0b15acf (patch)
tree3050bba2e1c4659ca56c349b5e7e8c6372d6634a /drivers/hwspinlock
parent3116a9931fa6fa067986a2cb0cc447c58530b1f0 (diff)
downloadlinux-8308678ebde1cbca9fb628ba2e7b6e4ea0b15acf.tar.xz
hwspinlock: sprd: use module_platform_driver() instead postcore initcall
The hardware spinlock devices are defined in the DT, there's no need for init calls order, remove boilerplate code by using module_platform_driver. Reviewed-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com> Link: https://lore.kernel.org/r/20201030034654.15775-3-zhang.lyra@gmail.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/hwspinlock')
-rw-r--r--drivers/hwspinlock/sprd_hwspinlock.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c
index b1574953d95f..95f680a4c028 100644
--- a/drivers/hwspinlock/sprd_hwspinlock.c
+++ b/drivers/hwspinlock/sprd_hwspinlock.c
@@ -149,18 +149,7 @@ static struct platform_driver sprd_hwspinlock_driver = {
.of_match_table = of_match_ptr(sprd_hwspinlock_of_match),
},
};
-
-static int __init sprd_hwspinlock_init(void)
-{
- return platform_driver_register(&sprd_hwspinlock_driver);
-}
-postcore_initcall(sprd_hwspinlock_init);
-
-static void __exit sprd_hwspinlock_exit(void)
-{
- platform_driver_unregister(&sprd_hwspinlock_driver);
-}
-module_exit(sprd_hwspinlock_exit);
+module_platform_driver(sprd_hwspinlock_driver);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Hardware spinlock driver for Spreadtrum");