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 8A9EAC433FE for ; Tue, 29 Nov 2022 17:00:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236466AbiK2RAL (ORCPT ); Tue, 29 Nov 2022 12:00:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236471AbiK2Q7v (ORCPT ); Tue, 29 Nov 2022 11:59:51 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11CD26DCCD for ; Tue, 29 Nov 2022 08:55:22 -0800 (PST) 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 A23E761847 for ; Tue, 29 Nov 2022 16:55:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BD18C433C1; Tue, 29 Nov 2022 16:55:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1669740921; bh=uSSon1nDgKxns3zcgiKcO+TjSlGC3gN72uBDuV0XEK0=; h=Subject:To:Cc:From:Date:From; b=wq63DdlHrP94gWmCANF6Aochau5TueNFpOe0EeL9/VbJJhKusbnnnpjl3b+Gz387s P8BqxnlPklyGIydPTd16nhjsRwZEn6rH4yFdAY5nADtMu+31T4A0oNVXsEopQuiymY 9bkALMjCIJl2HR/1b3Xqbkbu24k5nO4HKDQr94ts= Subject: FAILED: patch "[PATCH] usb: dwc3: exynos: Fix remove() function" failed to apply to 4.14-stable tree To: m.szyprowski@samsung.com, Thinh.Nguyen@synopsys.com, gregkh@linuxfoundation.org, semen.protsenko@linaro.org Cc: From: Date: Tue, 29 Nov 2022 17:55:09 +0100 Message-ID: <166974090998148@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Possible dependencies: e0481e5b3cc1 ("usb: dwc3: exynos: Fix remove() function") 1e041b6f313a ("usb: dwc3: exynos: Remove dead code") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From e0481e5b3cc12ea7ccf4552d41518c89d3509004 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 10 Nov 2022 16:41:31 +0100 Subject: [PATCH] usb: dwc3: exynos: Fix remove() function 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 Link: https://lore.kernel.org/r/20221110154131.2577-1-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman 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]);