From: k.kozlowski@samsung.com (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 2/4] power: reset: add reboot mode driver
Date: Tue, 12 Apr 2016 13:18:27 +0200 [thread overview]
Message-ID: <570CD983.9090202@samsung.com> (raw)
In-Reply-To: <570CBF7F.9090300@rock-chips.com>
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
next prev parent reply other threads:[~2016-04-12 11:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 2:18 [PATCH v7 0/4] add reboot mode driver Andy Yan
2016-03-30 2:19 ` [PATCH v7 1/4] dt-bindings: power: reset: add document for reboot-mode driver Andy Yan
2016-03-30 3:44 ` Krzysztof Kozlowski
2016-03-30 2:20 ` [PATCH v7 2/4] power: reset: add reboot mode driver Andy Yan
2016-03-30 3:36 ` Krzysztof Kozlowski
2016-04-06 0:50 ` Andy Yan
2016-04-06 1:00 ` Krzysztof Kozlowski
2016-04-12 9:27 ` Andy Yan
2016-04-12 11:18 ` Krzysztof Kozlowski [this message]
2016-04-12 11:29 ` Andy Yan
2016-03-30 2:21 ` [PATCH v7 3/4] ARM: dts: rockchip: add syscon-reboot-mode DT node Andy Yan
2016-03-30 2:22 ` [PATCH v7 4/4] ARM64: " Andy Yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=570CD983.9090202@samsung.com \
--to=k.kozlowski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox