From patchwork Mon Feb 11 09:46:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10805431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9EB5F1515 for ; Mon, 11 Feb 2019 09:48:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EC1629DEA for ; Mon, 11 Feb 2019 09:48:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8359129E0C; Mon, 11 Feb 2019 09:48:44 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 3FDE429DEA for ; Mon, 11 Feb 2019 09:48:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 251156E4C4; Mon, 11 Feb 2019 09:48:01 +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 9B2AF6E454 for ; Mon, 11 Feb 2019 09:47:33 +0000 (UTC) Received: from pendragon.brusselsairlines.com (233.56-78-194.adsl-static.isp.belgacom.be [194.78.56.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CF82621F5; Mon, 11 Feb 2019 10:47:16 +0100 (CET) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 25/50] drm/omap: Remove src field from omap_dss_device structure Date: Mon, 11 Feb 2019 11:46:40 +0200 Message-Id: <20190211094705.2845-26-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190211094705.2845-1-laurent.pinchart@ideasonboard.com> References: <20190211094705.2845-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" X-Virus-Scanned: ClamAV using ClamSMTP The field is only used to check whether the device is connected, and we can do so by checking the dss field instead. Remove the src field. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/base.c | 14 +------------- drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 - 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/base.c b/drivers/gpu/drm/omapdrm/dss/base.c index 76470ba45660..62ccbeb99a84 100644 --- a/drivers/gpu/drm/omapdrm/dss/base.c +++ b/drivers/gpu/drm/omapdrm/dss/base.c @@ -176,7 +176,7 @@ EXPORT_SYMBOL(omapdss_device_next_output); static bool omapdss_device_is_connected(struct omap_dss_device *dssdev) { - return dssdev->src; + return dssdev->dss; } int omapdss_device_connect(struct dss_device *dss, @@ -198,11 +198,6 @@ int omapdss_device_connect(struct dss_device *dss, return ret; } - if (src) { - WARN_ON(dst->src); - dst->src = src; - } - return 0; } EXPORT_SYMBOL_GPL(omapdss_device_connect); @@ -217,13 +212,6 @@ void omapdss_device_disconnect(struct omap_dss_device *src, return; } - if (src) { - if (WARN_ON(dst->src != src)) - return; - - dst->src = NULL; - } - WARN_ON(dst->state != OMAP_DSS_DISPLAY_DISABLED); dst->ops->disconnect(src, dst); diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index dd93c2121a35..015b2dd9fb99 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -409,7 +409,6 @@ struct omap_dss_device { struct module *owner; struct dss_device *dss; - struct omap_dss_device *src; struct omap_dss_device *next; struct list_head list;