On 9/10/21 1:47 AM, Greg KH wrote:
+ /* Don't allow module to be removed while any LEDs are linked */
+ if (WARN_ON(!try_module_get(THIS_MODULE))) {
That pattern is racy and broken and never ever ever add it to the kernel
again please. All existing in-kernel users of it are also wrong, we
have been removing them for decades now.
OK. (I was misled by the instances that you haven't gotten to yet.)
You have created a "raw" kobject in the device tree now, which means
that userspace will not be notified of it and will have a "hole" in it's
knowledge. Why not just create a named attribute group to this device
instead?
What would I pass as the first argument to sysfs_create_link() in that
case?
--
========================================================================
In Soviet Russia, Google searches you!
========================================================================