summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_irq.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-06-02 16:50:35 +1000
committerDave Airlie <airlied@redhat.com>2009-06-04 09:14:07 +1000
commitb8da7de56ca0ad34726478a50d138a29a9ff76cb (patch)
tree397f6de53bd166e022422658f5bb841577beff34 /drivers/gpu/drm/drm_irq.c
parent9fa7eb283c5cdc2b0f4a8cfe6387ed82e5e9a3d3 (diff)
downloadblackbird-op-linux-b8da7de56ca0ad34726478a50d138a29a9ff76cb.tar.gz
blackbird-op-linux-b8da7de56ca0ad34726478a50d138a29a9ff76cb.zip
drm: fix irq naming for kms drivers.
allocating devname in the i915 driver was a hack originally and I forgot to figure out how to do this properly back then. So this is the cleaner version that just picks devname or driver name in the irq code. It removes the devname allocs from the i915 driver. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r--drivers/gpu/drm/drm_irq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 93e677a481f5..fc8e5acd9d9a 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -196,6 +196,7 @@ int drm_irq_install(struct drm_device *dev)
{
int ret = 0;
unsigned long sh_flags = 0;
+ char *irqname;
if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
return -EINVAL;
@@ -227,8 +228,13 @@ int drm_irq_install(struct drm_device *dev)
if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
sh_flags = IRQF_SHARED;
+ if (dev->devname)
+ irqname = dev->devname;
+ else
+ irqname = dev->driver->name;
+
ret = request_irq(drm_dev_to_irq(dev), dev->driver->irq_handler,
- sh_flags, dev->devname, dev);
+ sh_flags, irqname, dev);
if (ret < 0) {
mutex_lock(&dev->struct_mutex);
OpenPOWER on IntegriCloud