lkml.org 
[lkml]   [2015]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 5/10] watchdog: bcm63xx_wdt: Use WATCHDOG_CORE
From
On Wed, November 25, 2015 02:44, Guenter Roeck wrote:
> The "running" flag should no longer be needed. watchdog_active()
> should provide that information.

I'm going to need to keep that because I need to know if it's running
in the interrupt handler, and wdd->lock is a mutex.

>> @@ -306,17 +202,18 @@ unregister_timer:
>>
>> static int bcm63xx_wdt_remove(struct platform_device *pdev)
>> {
>> - if (!nowayout)
>> - bcm63xx_wdt_hw_stop();
>> + struct watchdog_device *wdd = platform_get_drvdata(pdev);
>>
>> - misc_deregister(&bcm63xx_wdt_miscdev);
>> bcm63xx_timer_unregister(TIMER_WDT_ID);
>> + watchdog_unregister_device(wdd);
>
> Shouldn't that come first, before unregistering the timer ?

No, because wdd->dev is used in the interrupt handler. I will have to
move registration of the interrupt to after creating the watchdog
because it could currently be used before wdd->dev is set.

--
Simon Arlott


\
 
 \ /
  Last update: 2015-11-25 14:21    [W:0.167 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site