diff options
-rw-r--r-- | linux-core/drm_ioctl.c | 7 | ||||
-rw-r--r-- | linux/drm_ioctl.h | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/linux-core/drm_ioctl.c b/linux-core/drm_ioctl.c index f6dea331..5fa7694c 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 f6dea331..5fa7694c 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; } |