From cfa5bf31290edad723e1ce388d3840f495f3ccff Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 7 Jun 2004 01:42:35 +0000 Subject: [PATCH] The dev->devname being passed to request_irq in drm_irq.h is null. With the old DRM interface, the devname was set in DRM(setunique), but with the current DRM interface >=1.1 the devname is not being set in DRM(set_busid). From: Alan Swanson Approved-by: Dave Airlie --- linux-core/drm_ioctl.c | 7 +++++++ linux/drm_ioctl.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/linux-core/drm_ioctl.c b/linux-core/drm_ioctl.c index f6dea33..5fa7694 100644 --- a/linux-core/drm_ioctl.c +++ b/linux-core/drm_ioctl.c @@ -143,6 +143,13 @@ DRM(set_busid)(drm_device_t *dev) snprintf(dev->unique, dev->unique_len, "pci:%04x:%02x:%02x.%d", dev->pci_domain, dev->pci_bus, dev->pci_slot, dev->pci_func); + dev->devname = DRM(alloc)(strlen(dev->name) + dev->unique_len + 2, + DRM_MEM_DRIVER); + if (dev->devname == NULL) + return ENOMEM; + + sprintf(dev->devname, "%s@%s", dev->name, dev->unique); + return 0; } diff --git a/linux/drm_ioctl.h b/linux/drm_ioctl.h index f6dea33..5fa7694 100644 --- a/linux/drm_ioctl.h +++ b/linux/drm_ioctl.h @@ -143,6 +143,13 @@ DRM(set_busid)(drm_device_t *dev) snprintf(dev->unique, dev->unique_len, "pci:%04x:%02x:%02x.%d", dev->pci_domain, dev->pci_bus, dev->pci_slot, dev->pci_func); + dev->devname = DRM(alloc)(strlen(dev->name) + dev->unique_len + 2, + DRM_MEM_DRIVER); + if (dev->devname == NULL) + return ENOMEM; + + sprintf(dev->devname, "%s@%s", dev->name, dev->unique); + return 0; } -- 2.7.4