From patchwork Fri Sep 25 12:48:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 7264221 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 348739F30C for ; Fri, 25 Sep 2015 12:49:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 410CA20B40 for ; Fri, 25 Sep 2015 12:49:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 57D42208A5 for ; Fri, 25 Sep 2015 12:49:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E3B36E42B; Fri, 25 Sep 2015 05:49:05 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id D86A56E453 for ; Fri, 25 Sep 2015 05:49:03 -0700 (PDT) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NV800KWSGXPJ770@mailout2.w1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 25 Sep 2015 13:49:01 +0100 (BST) X-AuditID: cbfec7f5-f794b6d000001495-5e-560542bd40ab Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 22.5F.05269.DB245065; Fri, 25 Sep 2015 13:49:01 +0100 (BST) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NV800A30GXIN980@eusync4.samsung.com>; Fri, 25 Sep 2015 13:49:01 +0100 (BST) From: Andrzej Hajda To: Inki Dae Subject: [PATCH 07/16] drm/exynos/hdmi: fix removal order Date: Fri, 25 Sep 2015 14:48:20 +0200 Message-id: <1443185309-13827-8-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1443185309-13827-1-git-send-email-a.hajda@samsung.com> References: <1443185309-13827-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnluLIzCtJLcpLzFFi42I5/e/4Nd29TqxhBsemc1vcWneO1WLjjPWs Fle+vmezmHR/AovFi3sXWSxmnN/HZLH2yF12B3aP+93HmTz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoErY++VtawFn9krWjbcY2lgfMnWxcjJISFgInGrdxYLhC0mceHeeqA4F4eQwFJGiRWH vzBBOE1MEp/WL2QEqWIT0JT4u/kmWLeIgLLEqn3t7CBFzAL/GCUezDkOlhAWsJQ4v+guaxcj BweLgKrEyabaLkZ2Dl4BZ4mdNhC75CROHpvMCmJzCrhILDt3mhmkWAio4sJsyQmMvAsYGVYx iqaWJhcUJ6XnGukVJ+YWl+al6yXn525ihATP1x2MS49ZHWIU4GBU4uFVaGUJE2JNLCuuzD3E KMHBrCTC+9GCNUyINyWxsiq1KD++qDQntfgQozQHi5I478xd70OEBNITS1KzU1MLUotgskwc nFINjLG+Xo73JSYGvomt6f3PH1PgbfxO6Kle9Tm+3tYrG/Z/SbI03HL114UbU+cnH3Rt5dom Et32WrfwnV2UJZNP5j61k6UWem3858+YaLDW7SpcIjfDgqP0pZLTmZ+TqnhWVZ/YabDWhHe2 /ZW02l7dpUcYPM8/Z13wa99x2Q2ffny5Lywc+mNrjhJLcUaioRZzUXEiAMRUfWAaAgAA Cc: linux-samsung-soc@vger.kernel.org, Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, Andrzej Hajda , Marek Szyprowski X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DRM device should be destroyed before releasing resources. Signed-off-by: Andrzej Hajda Reviewed-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_hdmi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 50ced709..725ddb5 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2046,15 +2046,17 @@ static int hdmi_remove(struct platform_device *pdev) cancel_delayed_work_sync(&hdata->hotplug_work); + component_del(&pdev->dev, &hdmi_component_ops); + + pm_runtime_disable(&pdev->dev); + if (hdata->res.reg_hdmi_en) regulator_disable(hdata->res.reg_hdmi_en); if (hdata->hdmiphy_port) put_device(&hdata->hdmiphy_port->dev); - put_device(&hdata->ddc_adpt->dev); - pm_runtime_disable(&pdev->dev); - component_del(&pdev->dev, &hdmi_component_ops); + put_device(&hdata->ddc_adpt->dev); return 0; }