Hi Hans, On Thu, Jun 27, 2024 at 08:43:47AM +0200, Hans Verkuil wrote: > On 10/06/2024 12:05, Sakari Ailus wrote: > > Clear the media device's minor number reservation at unregister time as > > there's no need to keep it reserved for longer. This makes it possible to > > reserve the same minor right after unregistration. > > Have you tested this? By unbinding and re-binding a device while file handles to the old Media device one are still around. > > I'm not certain whether this won't cause kobject errors. If an app has the > media device open when the device is unbound, then the old device node still > is around until the application closes the fh. I'm not sure if you can create > a new device node with the same minor while an old device node with the same > minor is still around. I added the patch based on Laurent's comments <URL:https://lore.kernel.org/linux-media/20240207100810.GG23702@xxxxxxxxxxxxxxxxxxxxxxxxxx/>. > > V4L2 and CEC definitely both keep the old minor until the last user has gone. -- Kind regards, Sakari Ailus