Re: [PATCH 6/6] USB: file.c: make usb class a static const structure

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

 



On 20.06.2023 18:22, Greg Kroah-Hartman wrote:
Is this structure needed anymore at all now that the thing the kref was
"protecting" is gone?  I think it can be dropped entirely, right?

thanks,

greg k-h

As I understood after reading the code, this kref is used for checking how many devices uses our class and testing when we can unregister it.

As we register our class only when the first device is registered, I think the best solution is to move this kref structure out of the usb_class structure as we still need it for detecting when we could finally unregister our class. What do you think about it?




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux