All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Anderson <dianders@chromium.org>
To: Mark Yao <mark.yao@rock-chips.com>,
	David Airlie <airlied@linux.ie>,
	linux@arm.linux.org.uk, Heiko Stuebner <heiko@sntech.de>
Cc: Daniel Kurtz <djkurtz@chromium.org>,
	linux-rockchip@lists.infradead.org, john@keeping.me.uk,
	Douglas Anderson <dianders@chromium.org>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/5] drm/rockchip: dw_hdmi: Don't call platform_set_drvdata()
Date: Mon,  7 Mar 2016 14:00:53 -0800	[thread overview]
Message-ID: <1457388054-23077-4-git-send-email-dianders@chromium.org> (raw)
In-Reply-To: <1457388054-23077-1-git-send-email-dianders@chromium.org>

The Rockchip dw_hdmi driver just called platform_set_drvdata() to get
your hopes up that maybe, somehow, you'd be able to retrieve the 'struct
rockchip_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 <dianders@chromium.org>
---
Changes in v2:
- Don't call platform_set_drvdata() new for v2.

 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index 88776aba984e..d5cfef75fc80 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -271,8 +271,6 @@ static int dw_hdmi_rockchip_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

WARNING: multiple messages have this Message-ID (diff)
From: Douglas Anderson <dianders@chromium.org>
To: Mark Yao <mark.yao@rock-chips.com>,
	David Airlie <airlied@linux.ie>,
	linux@arm.linux.org.uk, Heiko Stuebner <heiko@sntech.de>
Cc: john@keeping.me.uk, Douglas Anderson <dianders@chromium.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/5] drm/rockchip: dw_hdmi: Don't call platform_set_drvdata()
Date: Mon,  7 Mar 2016 14:00:53 -0800	[thread overview]
Message-ID: <1457388054-23077-4-git-send-email-dianders@chromium.org> (raw)
In-Reply-To: <1457388054-23077-1-git-send-email-dianders@chromium.org>

The Rockchip dw_hdmi driver just called platform_set_drvdata() to get
your hopes up that maybe, somehow, you'd be able to retrieve the 'struct
rockchip_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 <dianders@chromium.org>
---
Changes in v2:
- Don't call platform_set_drvdata() new for v2.

 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index 88776aba984e..d5cfef75fc80 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -271,8 +271,6 @@ static int dw_hdmi_rockchip_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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: dianders@chromium.org (Douglas Anderson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/5] drm/rockchip: dw_hdmi: Don't call platform_set_drvdata()
Date: Mon,  7 Mar 2016 14:00:53 -0800	[thread overview]
Message-ID: <1457388054-23077-4-git-send-email-dianders@chromium.org> (raw)
In-Reply-To: <1457388054-23077-1-git-send-email-dianders@chromium.org>

The Rockchip dw_hdmi driver just called platform_set_drvdata() to get
your hopes up that maybe, somehow, you'd be able to retrieve the 'struct
rockchip_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 <dianders@chromium.org>
---
Changes in v2:
- Don't call platform_set_drvdata() new for v2.

 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index 88776aba984e..d5cfef75fc80 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -271,8 +271,6 @@ static int dw_hdmi_rockchip_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

  parent reply	other threads:[~2016-03-07 22:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 22:00 [PATCH v2 1/5] drm/rockchip: dw_hdmi: Call drm_encoder_cleanup() in error path Douglas Anderson
2016-03-07 22:00 ` Douglas Anderson
2016-03-07 22:00 ` Douglas Anderson
2016-03-07 22:00 ` [PATCH v2 2/5] drm/imx: " Douglas Anderson
2016-03-07 22:00   ` Douglas Anderson
2016-03-28 15:14   ` Doug Anderson
2016-03-28 15:14     ` Doug Anderson
2016-03-30 13:35     ` Philipp Zabel
2016-03-30 13:35       ` Philipp Zabel
2016-03-07 22:00 ` [PATCH v2 3/5] drm/rockchip: vop: Fix vop crtc cleanup Douglas Anderson
2016-03-07 22:00   ` Douglas Anderson
2016-03-07 22:00   ` Douglas Anderson
2016-03-07 22:00 ` Douglas Anderson [this message]
2016-03-07 22:00   ` [PATCH v2 4/5] drm/rockchip: dw_hdmi: Don't call platform_set_drvdata() Douglas Anderson
2016-03-07 22:00   ` Douglas Anderson
2016-03-07 22:00 ` [PATCH v2 5/5] drm/imx: " Douglas Anderson
2016-03-07 22:00   ` Douglas Anderson
2016-03-28  6:45 ` [PATCH v2 1/5] drm/rockchip: dw_hdmi: Call drm_encoder_cleanup() in error path Mark yao
2016-03-28  6:45   ` Mark yao
2016-03-28  6:45   ` Mark yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457388054-23077-4-git-send-email-dianders@chromium.org \
    --to=dianders@chromium.org \
    --cc=airlied@linux.ie \
    --cc=djkurtz@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=john@keeping.me.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.yao@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.