From patchwork Tue Nov 8 21:42:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 622884 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 0877EC4332F for ; Tue, 8 Nov 2022 21:43:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbiKHVnH (ORCPT ); Tue, 8 Nov 2022 16:43:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229795AbiKHVnF (ORCPT ); Tue, 8 Nov 2022 16:43:05 -0500 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38C2361B98 for ; Tue, 8 Nov 2022 13:43:03 -0800 (PST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20221108214301euoutp0234abf8f5569c2463df99767f89f92df1~lugg-ozET2689126891euoutp02i for ; Tue, 8 Nov 2022 21:43:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20221108214301euoutp0234abf8f5569c2463df99767f89f92df1~lugg-ozET2689126891euoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1667943781; bh=7PFzQzZuRqIsMoS+PTjvImnvaLoj2mDytyqrGhPf8lo=; h=From:To:Cc:Subject:Date:References:From; b=LRfaPxsWS4OwL+DWgtPRv8swHDpkpenxkyIsRJOgWSv90fAvup+k21wu9m2HjWHxf okEaSfKbFoS7yoc3JFuG0fAitvTGdcRCOLshJDFVzlGS6zJcTDl2pQ712Ma/eszrEc bnD17++SwsZDcesOTp53I4Gzv20r41a9bwn//8b0= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20221108214301eucas1p231aacff643c48f958b6f09cd6b5bef9f~luggrYdk20220602206eucas1p2-; Tue, 8 Nov 2022 21:43:01 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id A2.9E.09549.56DCA636; Tue, 8 Nov 2022 21:43:01 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20221108214300eucas1p22140957c56a1cf2f5203e171118e3d0b~luggHLoQa0092600926eucas1p2H; Tue, 8 Nov 2022 21:43:00 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20221108214300eusmtrp14b6bb0c9311249357e10c6f5ce44af1f~luggGptW71361613616eusmtrp1F; Tue, 8 Nov 2022 21:43:00 +0000 (GMT) X-AuditID: cbfec7f5-f5dff7000000254d-c3-636acd65c24c Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 92.BE.08916.46DCA636; Tue, 8 Nov 2022 21:43:00 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20221108214300eusmtip2413149577861fc2be1faf2af2dce8614~lugfn0CJZ0187301873eusmtip2V; Tue, 8 Nov 2022 21:43:00 +0000 (GMT) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Thinh Nguyen , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar Subject: [PATCH] usb: dwc3: exynos: Fix remove() function Date: Tue, 8 Nov 2022 22:42:49 +0100 Message-Id: <20221108214249.32528-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEIsWRmVeSWpSXmKPExsWy7djP87qpZ7OSDbad4LB4MG8bm0Xz4vVs Fntfb2W3mHF+H5PFomWtzBZrj9xlt1i14AC7A7vHnWt72Dz2z13D7tG3ZRWjx5b9nxk9Pm+S C2CN4rJJSc3JLEst0rdL4Mpo+rmHqaCDq2JCT3UD4yGOLkZODgkBE4kFR+eydjFycQgJrGCU aG9/yQLhfGGU2Px5AROE85lR4smCxcwwLe/m7oNqWc4ocWj1eya4lss3jzKCVLEJGEp0ve1i A7FFBBwkliy9wwZSxCzwllHi8Iad7CAJYQFLif1H3jGB2CwCqhLHZm4As3kFbCUOHJjFArFO XmL1hgNQq/+yS/TuNYKwXSSOHeiFqhGWeHV8CzuELSNxenIP2BMSAu2MEgt+32eCcCYwSjQ8 v8UIUWUtcefcL6CTOIBO0pRYv0sfIuwocXfnGrCwhACfxI23giBhZiBz0rbpzBBhXomONiGI ajWJWcfXwa09eOES1JkeEseWXwWLCwnESqx8uIZtAqPcLIRdCxgZVzGKp5YW56anFhvnpZbr FSfmFpfmpesl5+duYgQmg9P/jn/dwbji1Ue9Q4xMHIyHGCU4mJVEeNesy0oW4k1JrKxKLcqP LyrNSS0+xCjNwaIkzss2QytZSCA9sSQ1OzW1ILUIJsvEwSnVwCS6xXDVslpbdofNUUH3ekOX +1zpPCuUMqn8mcTSbi+VY1z3F8+tLlbtX7Da/Vq9+2nh22vrOFUnLxQ4oHT9zod3gfE3sli/ JRnmKp1OYQr9I2elqfju5+UXV3SkJ7b7bcqyNPurabhZq9Yv5YdG67VMSX7mh3b/WfdY69te ivsvZj1fWjH0gODlTf5nzTaXC50TYeTr3j9LSHd78d6gTbM09514Kq8wWWnlDN9JOi22bipy 99dO+NLQxL455xdb8tazAst+/Zr2OOHp97bv76a5vt11x7d+9hnXmrjzwcdPaPOITO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ailID: 20221108214300eucas1p22140957c56a1cf2f5203e171118e3d0b X-Msg-Generator: CA X-RootMTR: 20221108214300eucas1p22140957c56a1cf2f5203e171118e3d0b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20221108214300eucas1p22140957c56a1cf2f5203e171118e3d0b References: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The core DWC3 device node was not properly removed by the custom dwc3_exynos_remove_child() function. Replace it with generic of_platform_depopulate() which does that job right. Signed-off-by: Marek Szyprowski Acked-by: Thinh Nguyen --- drivers/usb/dwc3/dwc3-exynos.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index 0ecf20eeceee..4be6a873bd07 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c @@ -37,15 +37,6 @@ struct dwc3_exynos { struct regulator *vdd10; }; -static int dwc3_exynos_remove_child(struct device *dev, void *unused) -{ - struct platform_device *pdev = to_platform_device(dev); - - platform_device_unregister(pdev); - - return 0; -} - static int dwc3_exynos_probe(struct platform_device *pdev) { struct dwc3_exynos *exynos; @@ -142,7 +133,7 @@ static int dwc3_exynos_remove(struct platform_device *pdev) struct dwc3_exynos *exynos = platform_get_drvdata(pdev); int i; - device_for_each_child(&pdev->dev, NULL, dwc3_exynos_remove_child); + of_platform_depopulate(&pdev->dev); for (i = exynos->num_clks - 1; i >= 0; i--) clk_disable_unprepare(exynos->clks[i]);