From patchwork Fri Jan 11 03:50:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 155297 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp119269jaa; Thu, 10 Jan 2019 19:51:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN48pQjuuF7giatnyfyCV/fItEy2qb93u8iw0EVo4EC/HNtUGXWbYl0o9bl+sbZ6pu+7Agrx X-Received: by 2002:a17:902:b090:: with SMTP id p16mr4063316plr.190.1547178702374; Thu, 10 Jan 2019 19:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547178702; cv=none; d=google.com; s=arc-20160816; b=UMtphCadh2LRiBFfefAyQpSDSl7h88sTMn5KhGYiUjGFVH1SNSEKGyTCZDjY8AKM1q 39KE5NGsCdKD5mOmrVnRasvdiNkg1Ll1oVZJa8lGBw26IL0pDoFPS3a8oLLkvcK7L7IM 0mh+1eq1B7WhPpYM+/whX075HhMubMuOTnPeYPLrpB5DENAOf46C4OOm3HV83SRS5av1 9MPQSE+7nRPgU8vAdL6DeiyK2xSayjtsvNEOaI9YEFEIAEs9AQdjDLa06uyr5xgPYzs7 XlXxLuUlTTXce/07GYoy6J/iwOk8MMY95ldOIFzxsOnxSQPXXJKPBKIFhlTbVCPhMknk QSjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=GxXMtkce7GxB8m6n4Wi58Eo9UwEwgUd0eVwW1MYqjW8=; b=QkUM9znxn4H8qBLD75JXtQhlBsPlV8uhuKREhypc74Pqv/JpwFYMgSyV2D5VFbhlcN kopspQnpTdfQbHtqdhL8iCTvitG5xbcBcc4RXVDPzLxtLZArm3aU3yxmUuUOzo+J1xdZ WrO4XiLaZ41WjO3gJUild3qvPp6xrps+aXGDHWRKYAfMfvRfv/HGej7jdr6m0UHlDbZM ItTR1/MkeikVv0k3btU4LjO+gydLm0iXOpIyhAHWc8LyDauMFnBSWjuJycZ9xbtPkGov IuVSYtLiQ2m3SemX1lXhkYwzSBcfbWeT3PaHCpewVuI5aqvBo+TskkqhQsjLVTJFr/7Y HeBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id 187si60762493pfv.238.2019.01.10.19.51.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 19:51:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 559DF6F517; Fri, 11 Jan 2019 03:51:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by gabe.freedesktop.org (Postfix) with ESMTPS id 366BB6F50A for ; Fri, 11 Jan 2019 03:51:28 +0000 (UTC) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B4DFBD04; Fri, 11 Jan 2019 04:51:24 +0100 (CET) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 03/49] drm/omap: dsi: Fix OF platform depopulate Date: Fri, 11 Jan 2019 05:50:34 +0200 Message-Id: <20190111035120.20668-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190111035120.20668-1-laurent.pinchart@ideasonboard.com> References: <20190111035120.20668-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Tomi Valkeinen Commit edb715dffdee ("drm/omap: dss: dsi: Move initialization code from bind to probe") moved the of_platform_populate() call from dsi_bind() to dsi_probe(), but failed to move the corresponding of_platform_depopulate() from dsi_unbind() to dsi_remove(). This results in OF child devices being potentially removed multiple times. Fix it by placing the of_platform_depopulate() call where it belongs. Fixes: edb715dffdee ("drm/omap: dss: dsi: Move initialization code from bind to probe") Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 277f9dd2ec8c..b5685018d830 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5104,8 +5104,6 @@ static void dsi_unbind(struct device *dev, struct device *master, void *data) dss_debugfs_remove_file(dsi->debugfs.irqs); dss_debugfs_remove_file(dsi->debugfs.regs); - of_platform_depopulate(dev); - WARN_ON(dsi->scp_clk_refcount > 0); dss_pll_unregister(&dsi->pll); @@ -5457,6 +5455,8 @@ static int dsi_remove(struct platform_device *pdev) dsi_uninit_output(dsi); + of_platform_depopulate(&pdev->dev); + pm_runtime_disable(&pdev->dev); if (dsi->vdds_dsi_reg != NULL && dsi->vdds_dsi_enabled) {