lkml.org 
[lkml]   [2016]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 2/4] power: reset: add reboot mode driver
From
Date
Hi Krzysztof:
Thanks for you kindly suggestion. I will follow it in next version.

On 2016年04月12日 19:18, Krzysztof Kozlowski wrote:
> On 04/12/2016 11:27 AM, Andy Yan wrote:
>>>>>> +
>>>>>> +static const struct of_device_id syscon_reboot_mode_of_match[] = {
>>>>>> + { .compatible = "syscon-reboot-mode" },
>>>>>> + {}
>>>>>> +};
>>>>>> +
>>>>>> +static struct platform_driver syscon_reboot_mode_driver = {
>>>>>> + .probe = syscon_reboot_mode_probe,
>>>>> Cleanup needed. What will happen after device unbind? Memory will be
>>>>> released (devm-*()) but reboot notifier won't thus leading to OOPS on
>>>>> reboot.
>>>> From the kernel_restart_prepare function, the reboot notifier will
>>>> be called before device_shutdown. Is there any other case the device
>>>> unbind before reboot notifier
>>>> called?
>>> This is a regular module platform driver so unbind can happen any time
>>> initiated by user, either by unbind command or by module removal. User
>>> can then re-bind device or not - probably does not matter. Anyway after
>>> such first unbind, the restart will kaboom instead of do a restart.
>> I just need to do clean up in remove?
> Yes, you need to clean up everything in remove() callback (in a reversed
> order).
>
> Best regards,
> Krzysztof
>
>
>


\
 
 \ /
  Last update: 2016-04-12 14:01    [W:0.046 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site