From nobody Fri Dec 19 19:23:29 2025 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 ED93FC4332F for ; Thu, 13 Oct 2022 18:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231129AbiJMSDb (ORCPT ); Thu, 13 Oct 2022 14:03:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230484AbiJMSDC (ORCPT ); Thu, 13 Oct 2022 14:03:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF6BD152C6F; Thu, 13 Oct 2022 11:02:47 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 1650E6194E; Thu, 13 Oct 2022 17:59:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EEA3C433C1; Thu, 13 Oct 2022 17:59:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665683950; bh=DdUGzI2prsvOQgSs5XCjWOCD4D1KUOHY03lBWxbnGn0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yfMu0Gp7yesb1UTRu+0H9HaJlvpZQ/8CP4aKbLRkDoLZgFj1yc7ngpzAu5K1aC6mm Cm/6MXprnjbBH1paO7+70IzQXmIhgmM632gD+vCq3l2FCboebl0JOm7no3E2fdw56n H//f/+Xc9QbjgmkisswDWwNAzucV/df3vqC1fAo8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ferry Toth , Andy Shevchenko Subject: [PATCH 5.19 14/33] Revert "USB: fixup for merge issue with "usb: dwc3: Dont switch OTG -> peripheral if extcon is present"" Date: Thu, 13 Oct 2022 19:52:46 +0200 Message-Id: <20221013175145.750236704@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221013175145.236739253@linuxfoundation.org> References: <20221013175145.236739253@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Andy Shevchenko commit 2adc960ce79d3231b02f820daeee434542fe2911 upstream. This reverts commit 8bd6b8c4b1009d7d2662138d6bdc6fe58a9274c5. Prerequisite revert for the reverting of the original commit 0f0101719138. Fixes: 8bd6b8c4b100 ("USB: fixup for merge issue with "usb: dwc3: Don't swi= tch OTG -> peripheral if extcon is present"") Fixes: 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral if extcon i= s present") Reported-by: Ferry Toth Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth # for Merrifield Link: https://lore.kernel.org/r/20220927155332.10762-2-andriy.shevchenko@li= nux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1650,8 +1650,13 @@ static struct extcon_dev *dwc3_get_extco * This device property is for kernel internal use only and * is expected to be set by the glue code. */ - if (device_property_read_string(dev, "linux,extcon-name", &name) =3D=3D 0) - return extcon_get_extcon_dev(name); + if (device_property_read_string(dev, "linux,extcon-name", &name) =3D=3D 0= ) { + edev =3D extcon_get_extcon_dev(name); + if (!edev) + return ERR_PTR(-EPROBE_DEFER); + + return edev; + } =20 /* * Try to get an extcon device from the USB PHY controller's "port"