From patchwork Mon Oct 2 09:34:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 9980555 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F225B602A0 for ; Mon, 2 Oct 2017 09:35:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E459027F8F for ; Mon, 2 Oct 2017 09:35:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9494288F7; Mon, 2 Oct 2017 09:35:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 721EC27F8F for ; Mon, 2 Oct 2017 09:35:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CAAF46E2F3; Mon, 2 Oct 2017 09:35:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4593A6E2EB for ; Mon, 2 Oct 2017 09:35:29 +0000 (UTC) Received: by mail-wm0-x22e.google.com with SMTP id i82so7178964wmd.3 for ; Mon, 02 Oct 2017 02:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VcvizztyB3l0HfCGlPQ15vxBGD8cG1YHubi1VJZQLaM=; b=eY8xymJEWdikkBRk8aoyShopYi+UqSqQrHA8sHD2HyboXbEVwmHLtlPDKWnfL5nGQb ffQjmkDpsNe5qLYJ77VNyFnexQK/+1NhYD1W2y7LW1uSWBXvK/DA4oQlkIgg8PJmcy0P 1K7HKVrMQj09aV/KLeceMPsKx7kFfp2Q8Oa34= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VcvizztyB3l0HfCGlPQ15vxBGD8cG1YHubi1VJZQLaM=; b=ETmE5uRwBqUqwu0d/doFLb1SXSACM4vD4f4vxPM6xFGj7Xob0loPk9CkO19Mz5lQY2 fezFsslNylt9M4HgA42Cj7pSO3eazcBB4r1kCuVDn4IMSChE6Xq8y7qtWu8exHFrdjd1 D4bEV493OzrS8RZ357NmULxuLIkXt4uRjN7o6YaMMxzcwfm22rdbSTXUgoChWc0hzCFg E59UyBMW9W9OICS2xsFeJ1uaZWaZfOI8cpB39hjNE4vKPXmhVDsmoUqWynguWhg7aQWp +vBM/hD2Q8IoIgm+pKWiCdT5OZBEVZTcrNPXV98JawhyvLIDzw7wIWLxiokv+l96mSeJ 0COQ== X-Gm-Message-State: AMCzsaVzqwylwRxzyDAdEyxTdVjm+eSbpr0t5DUH6h6m1xUlPwVxIxBz DbGN7S0uQvpaNstBiNyYNEfqdw== X-Google-Smtp-Source: AOwi7QBLyWgExh071CgB3rt1BHfwytSG233Wo/BYuCFuQv+5/u4EniJRfmBQdpv8EhRyGIR3U7Pq0g== X-Received: by 10.28.35.9 with SMTP id j9mr1891645wmj.109.1506936927753; Mon, 02 Oct 2017 02:35:27 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.215.199.139]) by smtp.gmail.com with ESMTPSA id l4sm6516856wrb.74.2017.10.02.02.35.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Oct 2017 02:35:27 -0700 (PDT) From: Benjamin Gaignard To: architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, airlied@linux.ie, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, yannick.fertre@st.com, philippe.cornu@st.com Subject: [PATCH v2 5/5] drm/bridge/synopsys: dsi :remove is_panel_bridge Date: Mon, 2 Oct 2017 11:34:48 +0200 Message-Id: <1506936888-23844-6-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506936888-23844-3-git-send-email-benjamin.gaignard@linaro.org> References: <1506936888-23844-3-git-send-email-benjamin.gaignard@linaro.org> Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org 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-Virus-Scanned: ClamAV using ClamSMTP When using drm_of_panel_bridge_remove() we can simplify the code and remove is_panel_bridge from dw_mipi_dsi structure. Signed-off-by: Benjamin Gaignard Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index f4f633a..d9cca4f 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -221,7 +221,6 @@ struct dw_mipi_dsi { struct drm_bridge bridge; struct mipi_dsi_host dsi_host; struct drm_bridge *panel_bridge; - bool is_panel_bridge; struct device *dev; void __iomem *base; @@ -297,7 +296,6 @@ static int dw_mipi_dsi_host_attach(struct mipi_dsi_host *host, bridge = drm_panel_bridge_add(panel, DRM_MODE_CONNECTOR_DSI); if (IS_ERR(bridge)) return PTR_ERR(bridge); - dsi->is_panel_bridge = true; } dsi->panel_bridge = bridge; @@ -312,8 +310,7 @@ static int dw_mipi_dsi_host_detach(struct mipi_dsi_host *host, { struct dw_mipi_dsi *dsi = host_to_dsi(host); - if (dsi->is_panel_bridge) - drm_panel_bridge_remove(dsi->panel_bridge); + drm_of_panel_bridge_remove(host->dev->of_node, 1, 0); drm_bridge_remove(&dsi->bridge);