diff options
| author | Thomas Zimmermann <[email protected]> | 2021-05-16 19:51:35 +0000 |
|---|---|---|
| committer | Thomas Zimmermann <[email protected]> | 2021-05-17 19:19:48 +0000 |
| commit | 644adc3d0ff05f49fae9a7549e27dfd7e9a5afe5 (patch) | |
| tree | 17805c46840c44a7fe1bbd7ab201f70c2f7623c1 /drivers/gpu/drm/drm_pci.c | |
| parent | drm: Remove unused branch in legacy PCI initialization (diff) | |
| download | kernel-644adc3d0ff05f49fae9a7549e27dfd7e9a5afe5.tar.gz kernel-644adc3d0ff05f49fae9a7549e27dfd7e9a5afe5.zip | |
drm: Mark IRQ_BUSID ioctl as legacy
The functionality is only implemented for legacy drivers. Mark the ioctl
as legacy and move the code behind CONFIG_DRM_LEGACY. If legacy drivers
are disabled, the ioctl call now returns -EINVAL instead of -EOPNOTSUPP.
Signed-off-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/drm_pci.c')
| -rw-r--r-- | drivers/gpu/drm/drm_pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index f508f70e7a3f..39d35fc3a43b 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -72,7 +72,9 @@ int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) return 0; } -static int drm_pci_irq_by_busid(struct drm_device *dev, struct drm_irq_busid *p) +#ifdef CONFIG_DRM_LEGACY + +static int drm_legacy_pci_irq_by_busid(struct drm_device *dev, struct drm_irq_busid *p) { struct pci_dev *pdev = to_pci_dev(dev->dev); @@ -115,11 +117,9 @@ int drm_legacy_irq_by_busid(struct drm_device *dev, void *data, if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) return -EOPNOTSUPP; - return drm_pci_irq_by_busid(dev, p); + return drm_legacy_pci_irq_by_busid(dev, p); } -#ifdef CONFIG_DRM_LEGACY - void drm_legacy_pci_agp_destroy(struct drm_device *dev) { if (dev->agp) { |
