[EXT] Re: [PATCH v2] USB: gadget: Add ID numbers to configfs-gadget driver names
Frank Li
frank.li at nxp.com
Sun Dec 25 14:07:12 AEDT 2022
>
> I'm wondering if it maybe makes more sense to use the gadget name as a
> suffix
> instead?
>
> gi->composite.gadget_driver.driver.name =
> kasprintf(GFP_KERNEL, "configfs-gadget.%s" name);
>
> So that when you
>
> mkdir g1
>
> you will ultimately see /sys/bus/gadget/drivers/configfs-gadget.g1
>
> instead of /sys/bus/gadget/drivers/configfs-gadget.0
>
> Gadget names are guaranteed to be unique because they are created
> as sibling subdirectories in configfs. Your patch would then be greatly
> simplified (no need for ida).
I vote this ways.
Best regards
Frank Li
>
> Regards,
>
> Andrzej
>
More information about the openbmc
mailing list