+ /* 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.
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?