<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 22, 2021 at 1:37 AM Luca Ceresoli <<a href="mailto:luca@lucaceresoli.net">luca@lucaceresoli.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
despite having been searching for documentation I couldn't find out the<br>
exact and detailed difference between the .shutdown() and .remove()<br>
calls in struct device_driver.<br>
<br></blockquote><div><br></div><div>so, I'll start by saying I know next to nothing, but most of what you said sounds good</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
>From the above it looks like the shutdown() actions must be a subset of<br>
remove() actions.<br>
<br></blockquote><div><br></div><div>but subset is a bit vague.</div><div>theres 2 dimensions to think about.</div><div>lifetime -  shutdown/startup is surely the longer window, add/remove happen within that</div><div>hierarchy - subsystems must be ready to handle add / remove</div><div><br></div><div>fwiw, I 'grepped' (with ack), it shows a few drivers with both functions,</div><div>many others with just remove</div><div>you could see in detail what the difference is.</div><div><br></div><div>$> ack '(\.remove|\.shutdown)\b' drivers/<br></div><div> </div><div>drivers/rtc/rtc-twl.c<br>645:      .remove         = twl_rtc_remove,<br>646: .shutdown       = twl_rtc_shutdown,<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
</blockquote></div></div>