Home
last modified time | relevance | path

Searched hist:"91 f7d2e89868fcac0e750a28230fdb1ad4512137" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/usb/core/
H A Dledtrig-usbport.cdiff 91f7d2e89868fcac0e750a28230fdb1ad4512137 Fri Jan 11 10:29:45 CST 2019 Christian Lamparter <chunkeey@gmail.com> USB: leds: fix regression in usbport led trigger

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.

Fixes: 6f7b0bad8839 ("usb: simplify usbport trigger")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>