Commit bfba9416 authored by Thomas Zimmermann's avatar Thomas Zimmermann

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: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Fixes: b347e044 ("drm: Remove pdev field from struct drm_device")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20210512185527.26050-1-tzimmermann@suse.de
parent 68b433fe
...@@ -460,7 +460,8 @@ nouveau_connector_of_detect(struct drm_connector *connector) ...@@ -460,7 +460,8 @@ nouveau_connector_of_detect(struct drm_connector *connector)
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
struct nouveau_connector *nv_connector = nouveau_connector(connector); struct nouveau_connector *nv_connector = nouveau_connector(connector);
struct nouveau_encoder *nv_encoder; 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 || if (!dn ||
!((nv_encoder = find_encoder(connector, DCB_OUTPUT_TMDS)) || !((nv_encoder = find_encoder(connector, DCB_OUTPUT_TMDS)) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment