Re: [PATCH v2] leds: fix regression in usbport led trigger

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

 



On Fri, Jan 11, 2019 at 05:29:45PM +0100, Christian Lamparter wrote:
> The patch "usb: simplify usbport trigger" together with "leds: triggers:
> add device attribute support" caused an regression for the usbport
> trigger. it will no longer enumerate any active usb hub ports under the
> "ports" directory in the sysfs class directory, if the usb host drivers
> are fully initialized before the usbport trigger was loaded.
> 
> The reason is that the usbport driver tries to register the sysfs
> entries during the activate() callback. And this will fail with -2 /
> ENOENT because the patch "leds: triggers: add device attribute support"
> made it so that the sysfs "ports" group was only being added after the
> activate() callback succeeded.
> 
> This version of the patch reverts parts of the "usb: simplify usbport
> trigger" patch and restores usbport trigger's functionality.

This feels like going backwards, as a driver should not be adding and
removing sysfs groups, because you race with userspace.  Userspace has
no idea that the new sysfs files were added or removed, right?

I'll apply this, but this feels like a problem in the led api if the
above really is true.

also, please wrap your changelogs at 72 columns, making it easier to
read.  I did that here for you...

thanks,

greg k-h



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux