mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 08:20:52 +07:00
watchdog: bcm281xx: Fix use of uninitialized spinlock.
The bcm_kona_wdt_set_resolution_reg() call takes the spinlock, so
initialize it earlier. Fixes a warning at boot with lock debugging
enabled.
Fixes: 6adb730dc2
("watchdog: bcm281xx: Watchdog Driver")
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
parent
07441a7dd1
commit
fedf266f99
@ -304,6 +304,8 @@ static int bcm_kona_wdt_probe(struct platform_device *pdev)
|
||||
if (!wdt)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&wdt->lock);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
wdt->base = devm_ioremap_resource(dev, res);
|
||||
if (IS_ERR(wdt->base))
|
||||
@ -316,7 +318,6 @@ static int bcm_kona_wdt_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
spin_lock_init(&wdt->lock);
|
||||
platform_set_drvdata(pdev, wdt);
|
||||
watchdog_set_drvdata(&bcm_kona_wdt_wdd, wdt);
|
||||
bcm_kona_wdt_wdd.parent = &pdev->dev;
|
||||
|
Loading…
Reference in New Issue
Block a user