[PATCH RFC 1/2] drivers/base: export lock_device_hotplug/unlock_device_hotplug

Greg Kroah-Hartman gregkh at linuxfoundation.org
Sat Aug 18 03:02:39 AEST 2018


On Fri, Aug 17, 2018 at 01:56:35PM +0200, David Hildenbrand wrote:
> E.g. When adding the memory block devices, we know that there won't be a
> driver to attach to (as there are no drivers for the "memory" subsystem)
> - the bus_probe_device() function that takes the device_lock() could
> pretty much be avoided for that case. But burying such special cases
> down in core driver code definitely won't make locking related to memory
> hotplug easier.

You don't have to have a driver for a device if you don't want to, or
you can just have a default one for all memory devices if you somehow
need it.  No reason to not do this if it makes things easier for you.

thanks,

greg k-h


More information about the Linuxppc-dev mailing list