]> Git Repo - linux.git/commitdiff
hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'
authorChunyan Zhang <[email protected]>
Thu, 12 Nov 2020 07:04:10 +0000 (15:04 +0800)
committerBjorn Andersson <[email protected]>
Wed, 18 Nov 2020 03:42:13 +0000 (21:42 -0600)
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 <[email protected]>
Reported-by: kernel test robot <[email protected]>
Fixes: d8c8bbbb1aba ("hwspinlock: sprd: Add hardware spinlock driver")
Signed-off-by: Chunyan Zhang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Andersson <[email protected]>
drivers/hwspinlock/sprd_hwspinlock.c

index 95f680a4c0286cc504728b305088046dc78f9a75..d221fc9d756d65a713cc46d659dfab235642f0e9 100644 (file)
@@ -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);
This page took 0.057946 seconds and 4 git commands to generate.