diff options
| author | Thomas Zimmermann <[email protected]> | 2021-01-18 13:14:15 +0000 |
|---|---|---|
| committer | Thomas Zimmermann <[email protected]> | 2021-01-19 08:06:38 +0000 |
| commit | 36b73b051c41c1c1a4fd543faed1ceeca1c2bce3 (patch) | |
| tree | 864fb344a1c9d8e4d7762c5118c89a99ed08a697 /drivers/gpu/drm/drm_vm.c | |
| parent | drm/drm_agpsupport: Strip out obviously wrong descriptions and demote to stan... (diff) | |
| download | kernel-36b73b051c41c1c1a4fd543faed1ceeca1c2bce3.tar.gz kernel-36b73b051c41c1c1a4fd543faed1ceeca1c2bce3.zip | |
drm: Upcast struct drm_device.dev to struct pci_device; replace pdev
We have DRM drivers based on USB, SPI and platform devices. All of them
are fine with storing their device reference in struct drm_device.dev.
PCI devices should be no exception. Therefore struct drm_device.pdev is
deprecated.
Instead upcast from struct drm_device.dev with to_pci_dev(). PCI-specific
code can use dev_is_pci() to test for a PCI device. This patch changes
the DRM core code and documentation accordingly.
v4:
* split-off pdev deprecation into separate patch
Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Tested-by: Andy Lavr <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/drm_vm.c')
| -rw-r--r-- | drivers/gpu/drm/drm_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 6d5a03b32238..9b3b989d7cad 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -278,7 +278,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma) case _DRM_SCATTER_GATHER: break; case _DRM_CONSISTENT: - dma_free_coherent(&dev->pdev->dev, + dma_free_coherent(dev->dev, map->size, map->handle, map->offset); |
