> > 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 >