diff options
author | Chunyan Zhang <chunyan.zhang@unisoc.com> | 2020-11-12 08:04:10 +0100 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-11-18 04:42:13 +0100 |
commit | 8266b809264caa23038ceab2811fc452cf936e84 (patch) | |
tree | ee759b0abf380db3f8a91aee8c4461d32351468e /drivers/hwspinlock | |
parent | hwspinlock: sprd: use module_platform_driver() instead postcore initcall (diff) | |
download | linux-8266b809264caa23038ceab2811fc452cf936e84.tar.xz linux-8266b809264caa23038ceab2811fc452cf936e84.zip |
hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'
The macro function of_match_ptr() is NULL if CONFIG_OF is not set, in this
case Clang compiler would complain the of_device_id variable is unused.
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Fixes: d8c8bbbb1aba ("hwspinlock: sprd: Add hardware spinlock driver")
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Link: https://lore.kernel.org/r/20201112070410.14810-1-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c index 95f680a4c028..d221fc9d756d 100644 --- a/drivers/hwspinlock/sprd_hwspinlock.c +++ b/drivers/hwspinlock/sprd_hwspinlock.c @@ -146,7 +146,7 @@ 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, }, }; module_platform_driver(sprd_hwspinlock_driver); |