summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-12-16 04:39:38 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-12-16 04:39:38 +0300
commit0e10f9c89332def4288b33866a1b793ffc94107b (patch)
tree0d98ce3c0da5edb059748f09656ee77c997bb7e6 /drivers
parentef9df0011791ce302b646e2adf3c698f3b20b90a (diff)
parentc3e9b463b41b45c4556a13043265097e2184226e (diff)
downloadlinux-0e10f9c89332def4288b33866a1b793ffc94107b.tar.xz
Merge tag 'hwlock-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc
Pull hwspinlock updates from Bjorn Andersson: "This contains a few minor cleanups and build warning fixes for the sprd and sirf hwspinlock drivers" * tag 'hwlock-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: hwspinlock: sirf: Remove the redundant 'of_match_ptr' hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match' hwspinlock: sprd: use module_platform_driver() instead postcore initcall hwspinlock: sprd: Remove redundant header files
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwspinlock/sirf_hwspinlock.c2
-rw-r--r--drivers/hwspinlock/sprd_hwspinlock.c17
2 files changed, 3 insertions, 16 deletions
diff --git a/drivers/hwspinlock/sirf_hwspinlock.c b/drivers/hwspinlock/sirf_hwspinlock.c
index 823d3c4f621e..a3f77120bad7 100644
--- a/drivers/hwspinlock/sirf_hwspinlock.c
+++ b/drivers/hwspinlock/sirf_hwspinlock.c
@@ -94,7 +94,7 @@ static struct platform_driver sirf_hwspinlock_driver = {
.probe = sirf_hwspinlock_probe,
.driver = {
.name = "atlas7_hwspinlock",
- .of_match_table = of_match_ptr(sirf_hwpinlock_ids),
+ .of_match_table = sirf_hwpinlock_ids,
},
};
diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c
index 36dc8038bbb4..d221fc9d756d 100644
--- a/drivers/hwspinlock/sprd_hwspinlock.c
+++ b/drivers/hwspinlock/sprd_hwspinlock.c
@@ -4,7 +4,6 @@
* Copyright (C) 2017 Spreadtrum - http://www.spreadtrum.com
*/
-#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
@@ -15,7 +14,6 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
-#include <linux/slab.h>
#include "hwspinlock_internal.h"
@@ -148,21 +146,10 @@ static struct platform_driver sprd_hwspinlock_driver = {
.probe = sprd_hwspinlock_probe,
.driver = {
.name = "sprd_hwspinlock",
- .of_match_table = of_match_ptr(sprd_hwspinlock_of_match),
+ .of_match_table = 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");