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 <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210516195135.3755-1-tzimmermann@suse.de
This commit is contained in:
Thomas Zimmermann
2021-05-16 21:51:35 +02:00
parent 614b274022
commit 644adc3d0f
4 changed files with 14 additions and 13 deletions

View File

@@ -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) {