lkml.org 
[lkml]   [2022]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [EXT] Re: [PATCH v2] USB: gadget: Add ID numbers to configfs-gadget driver names
Date
> 
> 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
>

\
 
 \ /
  Last update: 2023-03-26 23:19    [W:0.075 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site