Skip to content

Commit

Permalink
hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_o…
Browse files Browse the repository at this point in the history
…f_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: d8c8bbb ("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>
  • Loading branch information
Chunyan Zhang authored and Bjorn Andersson committed Nov 18, 2020
1 parent 8308678 commit 8266b80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwspinlock/sprd_hwspinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8266b80

Please sign in to comment.