Re: [PATCH] watchdog: cadence_wdt: Fix the suspend resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 16, 2016 at 10:04 PM, Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> On Tue, Aug 16, 2016 at 03:47:32PM +0530, Shubhrajyoti Datta wrote:
>> Currently even if no users are there the suspend tries to
>> stop the watchdog and resume starts the watchdog.
>>
>> So after resume the watchdog starts and resets the board.
>> Fix the same by adding a check for users.
>>
>> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xxxxxxxxxx>
>> ---
>>  drivers/watchdog/cadence_wdt.c | 22 +++++++++++++++-------
>>  1 file changed, 15 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
>> index 4dda902..b58343c 100644
>> --- a/drivers/watchdog/cadence_wdt.c
>> +++ b/drivers/watchdog/cadence_wdt.c
>> @@ -77,6 +77,7 @@ MODULE_PARM_DESC(nowayout,
>>  struct cdns_wdt {
>>       void __iomem            *regs;
>>       bool                    rst;
>> +     bool                    cdns_wdt_users;
>>       struct clk              *clk;
>>       u32                     prescaler;
>>       u32                     ctrl_clksel;
>> @@ -129,6 +130,7 @@ static int cdns_wdt_stop(struct watchdog_device *wdd)
>>       struct cdns_wdt *wdt = watchdog_get_drvdata(wdd);
>>
>>       spin_lock(&wdt->io_lock);
>> +     wdt->cdns_wdt_users = false;
>
> Why not use watchdog_active() ?
will fix in next version

>
> Guenter
>
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux