Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753630AbcCGWBk (ORCPT ); Mon, 7 Mar 2016 17:01:40 -0500 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34863 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753530AbcCGWBZ (ORCPT ); Mon, 7 Mar 2016 17:01:25 -0500 From: Douglas Anderson To: Mark Yao , David Airlie , linux@arm.linux.org.uk, Heiko Stuebner Cc: Daniel Kurtz , linux-rockchip@lists.infradead.org, john@keeping.me.uk, Douglas Anderson , p.zabel@pengutronix.de, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/5] drm/imx: dw_hdmi: Don't call platform_set_drvdata() Date: Mon, 7 Mar 2016 14:00:54 -0800 Message-Id: <1457388054-23077-5-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1457388054-23077-1-git-send-email-dianders@chromium.org> References: <1457388054-23077-1-git-send-email-dianders@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1109 Lines: 32 The IMX dw_hdmi driver just called platform_set_drvdata() to get your hopes up that maybe, somehow, you'd be able to retrieve the 'struct imx_hdmi' from a pointer to the 'struct device'. You can't. When we call dw_hdmi_bind() the main driver calls dev_set_drvdata(), which clobbers our setting. Let's just remove the platform_set_drvdata() to avoid dashing people's hopes. Signed-off-by: Douglas Anderson --- Changes in v2: - Don't call platform_set_drvdata() new for v2. drivers/gpu/drm/imx/dw_hdmi-imx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c index c69c3142819c..a24631fdf4ad 100644 --- a/drivers/gpu/drm/imx/dw_hdmi-imx.c +++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c @@ -225,8 +225,6 @@ static int dw_hdmi_imx_bind(struct device *dev, struct device *master, if (!iores) return -ENXIO; - platform_set_drvdata(pdev, hdmi); - encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node); /* * If we failed to find the CRTC(s) which this encoder is -- 2.7.0.rc3.207.g0ac5344