Re: Device driver .shutdown() VS .remove()

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

 





On Thu, Apr 22, 2021 at 1:37 AM Luca Ceresoli <luca@xxxxxxxxxxxxxxxx> wrote:
Hello,

despite having been searching for documentation I couldn't find out the
exact and detailed difference between the .shutdown() and .remove()
calls in struct device_driver.


so, I'll start by saying I know next to nothing, but most of what you said sounds good


 
>From the above it looks like the shutdown() actions must be a subset of
remove() actions.


but subset is a bit vague.
theres 2 dimensions to think about.
lifetime -  shutdown/startup is surely the longer window, add/remove happen within that
hierarchy - subsystems must be ready to handle add / remove

fwiw, I 'grepped' (with ack), it shows a few drivers with both functions,
many others with just remove
you could see in detail what the difference is.

$> ack '(\.remove|\.shutdown)\b' drivers/
 
drivers/rtc/rtc-twl.c
645: .remove = twl_rtc_remove,
646: .shutdown = twl_rtc_shutdown,

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux