]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/irq: Look up the pci irq directly in the drm_control ioctl
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 3 Nov 2013 20:09:15 +0000 (21:09 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 23 Apr 2014 08:32:49 +0000 (10:32 +0200)
It's only ever called for legacy drivers, which are all pci.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_irq.c

index 7cf407bbfed562cab82e53bf2301cc593a5a9253..cbf6f259bfe496640ec04f15d87573fef0798b73 100644 (file)
@@ -377,7 +377,7 @@ int drm_control(struct drm_device *dev, void *data,
                struct drm_file *file_priv)
 {
        struct drm_control *ctl = data;
-       int ret = 0;
+       int ret = 0, irq;
 
        /* if we haven't irq we fallback for compatibility reasons -
         * this used to be a separate function in drm_dma.h
@@ -393,8 +393,10 @@ int drm_control(struct drm_device *dev, void *data,
 
        switch (ctl->func) {
        case DRM_INST_HANDLER:
+               irq = dev->pdev->irq;
+
                if (dev->if_version < DRM_IF_VERSION(1, 2) &&
-                   ctl->irq != drm_dev_to_irq(dev))
+                   ctl->irq != irq)
                        return -EINVAL;
                mutex_lock(&dev->struct_mutex);
                ret = drm_irq_install(dev);