From patchwork Thu Nov 10 15:41:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 13038945 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 38D6EC4332F for ; Thu, 10 Nov 2022 15:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231398AbiKJPlr (ORCPT ); Thu, 10 Nov 2022 10:41:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231594AbiKJPlq (ORCPT ); Thu, 10 Nov 2022 10:41:46 -0500 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BED89589 for ; Thu, 10 Nov 2022 07:41:44 -0800 (PST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20221110154142euoutp0167f624592e3cace0ea7595ed846dd965~mQ3m_E0Dz3077430774euoutp010 for ; Thu, 10 Nov 2022 15:41:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20221110154142euoutp0167f624592e3cace0ea7595ed846dd965~mQ3m_E0Dz3077430774euoutp010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1668094902; bh=fd5p8aksmy9UiVn+D8PCYzWaUuHsJ2tCEvCv/Rm0KCk=; h=From:To:Cc:Subject:Date:References:From; b=LX3ntitBa9x6s55Bt5uFG3nnB27OzWD9LI1PxSaJGAAxXi4cWC6fFe37OqIH3i9GF EOljzwpnfm/NFBTwqq0LsB6VxNa+N9SmBJc8237rUMKTL8sBJzswyONAtmxbhYIcRZ +ECh2seSLq1/CdLNyUaEAXu/SISJlxOTJajDEcv4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20221110154141eucas1p2ef9f9a1299eb1e9705b0e7d51aeaf5fd~mQ3mmbuFC1919919199eucas1p2m; Thu, 10 Nov 2022 15:41:41 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 31.86.10112.5BB1D636; Thu, 10 Nov 2022 15:41:41 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20221110154141eucas1p1e69a91704c32c07307a9c73b95e0d9a3~mQ3mOmKio0296002960eucas1p14; Thu, 10 Nov 2022 15:41:41 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20221110154141eusmtrp24f23e9429f1247377d2faaddf4137383~mQ3mN8VaS2466524665eusmtrp2m; Thu, 10 Nov 2022 15:41:41 +0000 (GMT) X-AuditID: cbfec7f4-cf3ff70000002780-af-636d1bb5c524 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 32.6E.08916.5BB1D636; Thu, 10 Nov 2022 15:41:41 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20221110154140eusmtip20734298fba776ec0fa098dfceb081455~mQ3lu_fMC1468614686eusmtip2e; Thu, 10 Nov 2022 15:41:40 +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 , stable@vger.kernel.org Subject: [PATCH v2] usb: dwc3: exynos: Fix remove() function Date: Thu, 10 Nov 2022 16:41:31 +0100 Message-Id: <20221110154131.2577-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGIsWRmVeSWpSXmKPExsWy7djP87pbpXOTDR6/VLV4MG8bm0Xz4vVs Fntfb2W3mHF+H5PFomWtzBZrj9xlt1iw8RGjxaoFB9gdODzuXNvD5rF/7hp2j74tqxg9tuz/ zOjxeZNcAGsUl01Kak5mWWqRvl0CV8biA7uZCjZyV3zb/JCxgfEqZxcjJ4eEgInEpWmL2LsY uTiEBFYwSjz5fZUZJCEk8IVRonFjAYT9mVFi9lEpmIZprTeYIRqWM0q0Nv9ngnCAGjZfu8oE UsUmYCjR9baLDcQWEXCQWLL0DhtIEbNAO5PE3+1zWEASwgI2Ev8/7wdbxyKgKrF1bzdYnBco /unEWXaIdfISqzccAFsnIdDJIdF86h8LRMJF4siKLqgiYYlXx7dA2TIS/3fOZ4JoaGeUWPD7 PpQzgVGi4fktRogqa4k7534B3cQBdJOmxPpd+iCmhICjRMuFKAiTT+LGW0GQYmYgc9K26cwQ YV6JjjYhiBlqErOOr4PbevDCJWYI20Ni4ZHzjJCQi5Xo2fOTcQKj3CyEVQsYGVcxiqeWFuem pxYb5aWW6xUn5haX5qXrJefnbmIEJoXT/45/2cG4/NVHvUOMTByMhxglOJiVRHi5NbKThXhT EiurUovy44tKc1KLDzFKc7AoifOyzdBKFhJITyxJzU5NLUgtgskycXBKNTCtP/CVt9I3ZseC F50N8qY+Hg3S5rb/7ghqnePmybStFHjmV/hX//Irh59CTPcfe5hZFZ1jKA0V/Sdiu+Rw3q1X fNJBaRkfdXw/M2TUBIa+3tWY3HyQOfai0/7nypmPL17a+VnwpvpL9o8P9MwWzn8V15s85xD3 9f5UM6eN2fb/+9ftcbn89cbHM6c/RW8PdqlYIp5cdeVhz9xyU9+4p3tkeMJCWrJrutM8i2d6 prreV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i1/01+Kr3spvE6x/btFkb1z368vCdc05 qmb7OSOUWIozEg21mIuKEwGAGZX+0QIAAA== X-CMS-MailID: 20221110154141eucas1p1e69a91704c32c07307a9c73b95e0d9a3 X-Msg-Generator: CA X-RootMTR: 20221110154141eucas1p1e69a91704c32c07307a9c73b95e0d9a3 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20221110154141eucas1p1e69a91704c32c07307a9c73b95e0d9a3 References: Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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. Fixes: adcf20dcd262 ("usb: dwc3: exynos: Use of_platform API to create dwc3 core pdev") Signed-off-by: Marek Szyprowski Acked-by: Thinh Nguyen Cc: stable@vger.kernel.org Reviewed-by: Sam Protsenko --- 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]);