linux-stable/include/linux/usb
Alan Stern f9d76d1507 USB: gadget: Add ID numbers to gadget names
Putting USB gadgets on a new bus of their own encounters a problem
when multiple gadgets are present: They all have the same name!  The
driver core fails with a "sys: cannot create duplicate filename" error
when creating any of the /sys/bus/gadget/devices/<gadget-name>
symbolic links after the first.

This patch fixes the problem by adding a ".N" suffix to each gadget's
name when the gadget is registered (where N is a unique ID number),
thus making the names distinct.

Reported-and-tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Fixes: fc274c1e99 ("USB: gadget: Add a new bus for gadgets")
Link: https://lore.kernel.org/r/YnqKAXKyp9Vq/pbn@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-11 18:59:25 +02:00
..
audio-v2.h
audio-v3.h
audio.h
c67x00.h
ccid.h
cdc-wdm.h
cdc.h
cdc_ncm.h
ch9.h
chipidea.h
composite.h
ehci-dbgp.h
ehci_def.h
ehci_pdriver.h
ezusb.h
functionfs.h
g_hid.h
gadget.h USB: gadget: Add ID numbers to gadget names 2022-05-11 18:59:25 +02:00
gadget_configfs.h
hcd.h Revert "usb: core: hcd: Create platform devices for onboard hubs in probe()" 2022-05-03 16:48:09 +02:00
input.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
m66592.h
musb-ux500.h
musb.h
net2280.h
of.h
ohci_pdriver.h
otg-fsm.h
otg.h
pd.h
pd_ado.h
pd_bdo.h usb: typec: tcpm: Fix undefined behavior due to shift overflowing the constant 2022-04-21 18:33:56 +02:00
pd_ext_sdb.h
pd_vdo.h
phy.h
phy_companion.h
quirks.h
r8a66597.h
r8152.h
renesas_usbhs.h
rndis_host.h
role.h
serial.h
sl811.h
storage.h
tcpm.h
tegra_usb_phy.h
typec.h
typec_altmode.h
typec_dp.h
typec_mux.h usb: typec: mux: Introduce indirection 2022-04-26 13:47:13 +02:00
typec_tbt.h
uas.h
ulpi.h
usb338x.h
usb_phy_generic.h
usbnet.h
xhci-dbgp.h usb: early: xhci-dbc: Remove duplicate keep parsing 2022-03-15 18:20:34 +01:00