RE: [EXT] Re: [PATCH v2] USB: gadget: Add ID numbers to configfs-gadget driver names

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

 



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





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux