aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <[email protected]>2021-05-12 20:55:27 +0200
committerThomas Zimmermann <[email protected]>2021-05-13 14:57:54 +0200
commitbfba94162ba7b1ab28bf78ccab8808c4a000fd8f (patch)
treecf724b0408d122fbe7dd7cb9f4fc21ba6c622791
parent68b433fe6937cfa3f8975d18643d5956254edd6a (diff)
drm/nouveau: Remove invalid reference to struct drm_device.pdev
The pdev field got removed from struct drm_device recently. Replace the invalid reference with an upcast from the struct's dev field. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Fixes: b347e04452ff ("drm: Remove pdev field from struct drm_device") Cc: Thomas Zimmermann <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_connector.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 7f38788a6c2b..2a298c171d4d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -460,7 +460,8 @@ nouveau_connector_of_detect(struct drm_connector *connector)
struct drm_device *dev = connector->dev;
struct nouveau_connector *nv_connector = nouveau_connector(connector);
struct nouveau_encoder *nv_encoder;
- struct device_node *cn, *dn = pci_device_to_OF_node(dev->pdev);
+ struct pci_dev *pdev = to_pci_dev(dev->dev);
+ struct device_node *cn, *dn = pci_device_to_OF_node(pdev);
if (!dn ||
!((nv_encoder = find_encoder(connector, DCB_OUTPUT_TMDS)) ||