lkml.org 
[lkml]   [2017]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] watchdog: core: Make use of devm_register_reboot_notifier()
On Tue, Apr 4, 2017 at 7:51 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 04/04/2017 08:47 AM, Andy Shevchenko wrote:
>> On Tue, Apr 4, 2017 at 5:10 PM, Andrey Smirnov <andrew.smirnov@gmail.com>
>> wrote:

>>> + ret = devm_register_reboot_notifier(wdd->parent,
>>> + &wdd->reboot_nb);
>>
>>
>> I'm not sure it's logically correct. Perhaps binding to the actual
>> watchdog device would be better.
>> Though, Guenter can correct me.
>>
>
> As mentioned in my other reply, it doesn't work since wdd->parent can be
> NULL.
> It might be possible to move the code into watchdog_dev_register() and tie
> it
> to the watchdog device, but I have not explored what that would require.

I would rather add device pointer to watchdoig struct, though it's your call :-)
So, what you decide I'll agree with.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-04-04 18:57    [W:1.586 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site