Re: [PATCH] drm/nouveau: Remove invalid reference to struct drm_device.pdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 13 May 2021 at 04:55, Thomas Zimmermann <tzimmermann@xxxxxxx> wrote:
>
> 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 <tzimmermann@xxxxxxx>
> Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> Fixes: b347e04452ff ("drm: Remove pdev field from struct drm_device")
> Cc: Thomas Zimmermann <tzimmermann@xxxxxxx>
> Cc: Maxime Ripard <maxime@xxxxxxxxxx>
> Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Cc: Maxime Ripard <mripard@xxxxxxxxxx>
> Cc: David Airlie <airlied@xxxxxxxx>
> Cc: Daniel Vetter <daniel@xxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx

Reviewed-by: Dave Airlie <airlied@xxxxxxxxxx>

> ---
> This patch should be merged through drm-misc-next.

please land asap.

Thanks,
Dave.
> ---
>  drivers/gpu/drm/nouveau/nouveau_connector.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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)) ||
> --
> 2.31.1
>



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux