From patchwork Fri Oct 13 14:59:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10004965 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 587EB602B3 for ; Fri, 13 Oct 2017 14:59:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49C992909E for ; Fri, 13 Oct 2017 14:59:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EB85290A0; Fri, 13 Oct 2017 14:59:51 +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 0DA3B2909E for ; Fri, 13 Oct 2017 14:59:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4523F6EB8C; Fri, 13 Oct 2017 14:59:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from galahad.ideasonboard.com (galahad.ideasonboard.com [185.26.127.97]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0B2976EB8B for ; Fri, 13 Oct 2017 14:59:44 +0000 (UTC) Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id CB35521433; Fri, 13 Oct 2017 16:59:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1507906748; bh=sA1YO71jl2AYZSIY1B6by+tEDE08nNidQYTawTgfvDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g9DxcoN3CylazmrUSgFJuUZvbXcN9nCS6ZzZgpNRDsgvz6jhPz19p7ArZkoKwCMZw bMUOM66Mhenw4u59tXpvaernr7HLJEpWiZjV80/INEjipN5W6mpJ3aqFtdi0YxVaY6 NDb60Vn0fCRvnD9E6bH7tYNKj8rogkDstpoCXwyk= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH 07/48] drm: omapdrm: dpi: Remove dpi_data port_initialized field Date: Fri, 13 Oct 2017 17:59:03 +0300 Message-Id: <20171013145944.26557-8-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171013145944.26557-1-laurent.pinchart@ideasonboard.com> References: <20171013145944.26557-1-laurent.pinchart@ideasonboard.com> Cc: Tomi Valkeinen 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 The dpi_data structure port_initialized field is used to check in the cleanup path whether the DPI has been initialized. This can be performed through the associated device_node data field instead. Remove the port_initialized field. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dpi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index daf286fc8a40..ce9b27978f48 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -52,8 +52,6 @@ struct dpi_data { int data_lines; struct omap_dss_device output; - - bool port_initialized; }; static struct dpi_data *dpi_get_data_from_dssdev(struct omap_dss_device *dssdev) @@ -786,8 +784,6 @@ int dpi_init_port(struct platform_device *pdev, struct device_node *port, dpi_init_output_port(dpi, port); - dpi->port_initialized = true; - return 0; err_datalines: @@ -800,7 +796,7 @@ void dpi_uninit_port(struct device_node *port) { struct dpi_data *dpi = port->data; - if (!dpi->port_initialized) + if (!dpi) return; dpi_uninit_output_port(port);