Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp951537ybm; Wed, 27 May 2020 12:01:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4G4lwyGXd+0sdNx7Uj/xoAidL0uhJg0bB+X4vQZhSuagU55R//Nh+rwc9MzOngBbRNUDZ X-Received: by 2002:a05:6402:1242:: with SMTP id l2mr26196397edw.261.1590606081041; Wed, 27 May 2020 12:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590606081; cv=none; d=google.com; s=arc-20160816; b=e6TG3af2KrLt0jWNhCbgqf4pokiVbJsloPB4sGUxuE4dcwIQcJDTyHC74r77o+UiIn 14dQUv7dK9K2JPkGNkh3HM/NyzOGXK/wZcR80Ug6+E1YPFuOAaHwUjZZRYrxEKhUixMT Y5XdZF7VFO7q37Fc5+RmoCziht7I1jrf/WZwZORk3xIbGEJ0sNuman5Tzch6jxt2MLhi qxbUbcr2cQgbosrWnDbG8omq7WGXJ7Tt7IWtnsUwX4wsAfQ9BQ/OR7qB0jCjcnTmA50p 8IHjLZRMGvsjvKAAoFoVm5p4r9/qVit6e7Fql3E9gOb5Ua7A67eaQmwcevQUbptbTDM9 i0Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=M9qzLnK7deTu/moPvhZOkgepq1FHMqToIp67UgEwLvc=; b=YYUYuxL7kO0a5Z0c+Wf2A0c56ta6fAWtfKYvJ+Bj6PCm8EEPN2bnvBRY/KBYFSCmrg UZDXOXjfbc4QAF972ihY58uZ4Y4H2nuZdl3F+pT+zhtU8cGesxK3TYlWn5RI1m9HFM4R XzqFXcOFazmMbPwqJ1Rs6/e204Z7wpEhXKvVPAY8X+Mai2D9l83BI0mFpjfBXeFAKwsF DjOMexcYTtm2sY/R1XolDc8Bh5nSkb4dOg74gYFvvfzQbLobHMPQs2g1cB3VNOF8fzqn z0QILqzltAdxydRxhreSc/8JCvuFcWkm+m3hTe29C0ur8fQzrnlK49yt/z5iKI50f1r3 hgvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=rCeLvw62; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=gN20S6cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de11si2255711edb.246.2020.05.27.12.00.58; Wed, 27 May 2020 12:01:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=rCeLvw62; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=gN20S6cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390397AbgE0PwH (ORCPT + 98 others); Wed, 27 May 2020 11:52:07 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:34493 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390306AbgE0PvU (ORCPT ); Wed, 27 May 2020 11:51:20 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 1BC77580D6B; Wed, 27 May 2020 11:51:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 27 May 2020 11:51:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=M9qzLnK7deTu/ moPvhZOkgepq1FHMqToIp67UgEwLvc=; b=rCeLvw623CaovtKdeyk4wfIUIu/3M AFHQQAJfEKeSoFKlHiCbVmwy3iDxW12+pVSgUK2FnchYHg2AmirAHue4K/ZP9Twq 1P5cfC6XsF0BtJwQ65XVjBXpXsSnXqQEQS/kjDgM2isVXT6DC8gQepMneWohLrq9 co5zzrNPh76jt0hO1xBVe2qYV5ogQttffTDRSXrv+OFxHSPMJQr5msnhnaBORFk3 QV9upNE4c3rMwZ8wR6V+g9E0xw0C1en766u+6DB4sfI8+Q/bsevltXkHaSe0JdSm hSN5pdtlEEcvhMBm92yABkLqocdyGHvhUI3cOfp9dHq229ZK1LTlUZCVA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=M9qzLnK7deTu/moPvhZOkgepq1FHMqToIp67UgEwLvc=; b=gN20S6cz RwiTvSMhZRfcbtnuaHtSFZaNxEGhhdlYh4yvk+h5e+7YKs2ofchK8bxVfHzUHNB3 K+tEsSkm9UGV0+h/eEKYlm2nYtk+5NdAmico/hYWwCLJCQvYibHrp0QfipR4cdiF PXxRHGtQz2eX8IANSE/aHTE8OTRQe6Q9J7ERNObJhpcfqfDcdQ5Zfwku0hN/f3+O tNeFb4F262akV0w0wYV7le4h8qwefHCc3d6C3qzMoe6z1cz8u5KU4wWCCrTPob2t 4oUcUF87p7/It1e3UChsWb5g9V6EVD540FP+sLBsNq/zSzIVIamQGJdbmBxRpI0e 1hU8weQAui4lCg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvgedgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepheefne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id B10C930614FA; Wed, 27 May 2020 11:51:18 -0400 (EDT) From: Maxime Ripard To: Nicolas Saenz Julienne , Eric Anholt Cc: dri-devel@lists.freedesktop.org, linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Stevenson , Tim Gover , Phil Elwell , Maxime Ripard Subject: [PATCH v3 077/105] drm/vc4: hdmi: Remove vc4_dev hdmi pointer Date: Wed, 27 May 2020 17:48:47 +0200 Message-Id: <3fd0a9dc3b2f9f5914a6dab4c003a13b0cf6f09f.1590594512.git-series.maxime@cerno.tech> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that we don't have any users anymore, we can kill that pointer. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_drv.h | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h index e14ed9799ecc..52ba5d7323c8 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -73,7 +73,6 @@ struct vc4_perfmon { struct vc4_dev { struct drm_device *dev; - struct vc4_hdmi *hdmi; struct vc4_hvs *hvs; struct vc4_v3d *v3d; struct vc4_dpi *dpi; diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 892108f16802..850111665839 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1188,7 +1188,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) #endif struct platform_device *pdev = to_platform_device(dev); struct drm_device *drm = dev_get_drvdata(master); - struct vc4_dev *vc4 = drm->dev_private; struct vc4_hdmi *vc4_hdmi; struct drm_encoder *encoder; struct device_node *ddc_node; @@ -1276,8 +1275,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) vc4_hdmi->hpd_active_low = hpd_gpio_flags & OF_GPIO_ACTIVE_LOW; } - vc4->hdmi = vc4_hdmi; - /* HDMI core must be enabled. */ if (!(HD_READ(VC4_HD_M_CTL) & VC4_HD_M_ENABLE)) { HD_WRITE(VC4_HD_M_CTL, VC4_HD_M_SW_RST); @@ -1357,9 +1354,12 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) static void vc4_hdmi_unbind(struct device *dev, struct device *master, void *data) { - struct drm_device *drm = dev_get_drvdata(master); - struct vc4_dev *vc4 = drm->dev_private; - struct vc4_hdmi *vc4_hdmi = vc4->hdmi; + /* + * snd_soc_register_card will set the device drvdata pointer + * to the card being registered. + */ + struct snd_soc_card *card = dev_get_drvdata(dev); + struct vc4_hdmi *vc4_hdmi = snd_soc_card_get_drvdata(card); cec_unregister_adapter(vc4_hdmi->cec_adap); vc4_hdmi_connector_destroy(&vc4_hdmi->connector.base); @@ -1369,8 +1369,6 @@ static void vc4_hdmi_unbind(struct device *dev, struct device *master, pm_runtime_disable(dev); put_device(&vc4_hdmi->ddc->dev); - - vc4->hdmi = NULL; } static const struct component_ops vc4_hdmi_ops = { -- git-series 0.9.1