From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB574C433F5 for ; Wed, 11 May 2022 15:18:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245700AbiEKPR7 (ORCPT ); Wed, 11 May 2022 11:17:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245689AbiEKPR6 (ORCPT ); Wed, 11 May 2022 11:17:58 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8189120D4FF for ; Wed, 11 May 2022 08:17:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 81485CE25BF for ; Wed, 11 May 2022 15:17:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07053C340EE; Wed, 11 May 2022 15:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652282272; bh=zotC/W6Dt2ny/Ig5F9uheW/78JqNBstGhsdUSXPqzVI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a9LRdW5WdIfBAk8vnwqMxCF/fKa3nhXizVZ4gkIfdFcx69crfiMvJ2gkEGUE559YU mqyPMEfU21FJLEMXdXa6vCvnrUIB3lLnwgOzlfRaYbP/EiEJRNSk7PPFt6BvBEYOgk st9UMd+b7sMFiMlI/x2nbJjgtKtdpfCgd2IyIFvM= Date: Wed, 11 May 2022 17:17:48 +0200 From: Greg KH To: Alan Stern Cc: Geert Uytterhoeven , Felipe Balbi , USB mailing list Subject: Re: [PATCH] USB: gadget: Add ID numbers to gadget names Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Tue, May 10, 2022 at 11:51:29AM -0400, Alan Stern wrote: > 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/ > 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 > Signed-off-by: Alan Stern > Reviewed-by: Geert Uytterhoeven > Fixes: fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") > > --- > > > [as1980] Thanks, let me run this through the Android test suite first. You can see the results here: https://android-review.googlesource.com/c/kernel/common/+/2095109 I'll let you know how it goes as I do not know if you are not logged in if you can see the test results or not, gerrit is odd... thanks, greg k-h