diff options
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 12 |
2 files changed, 9 insertions, 11 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) | |||
196 | { | 196 | { |
197 | int ret = 0; | 197 | int ret = 0; |
198 | unsigned long sh_flags = 0; | 198 | unsigned long sh_flags = 0; |
199 | char *irqname; | ||
199 | 200 | ||
200 | if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) | 201 | if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) |
201 | return -EINVAL; | 202 | return -EINVAL; |
@@ -227,8 +228,13 @@ int drm_irq_install(struct drm_device *dev) | |||
227 | if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED)) | 228 | if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED)) |
228 | sh_flags = IRQF_SHARED; | 229 | sh_flags = IRQF_SHARED; |
229 | 230 | ||
231 | if (dev->devname) | ||
232 | irqname = dev->devname; | ||
233 | else | ||
234 | irqname = dev->driver->name; | ||
235 | |||
230 | ret = request_irq(drm_dev_to_irq(dev), dev->driver->irq_handler, | 236 | ret = request_irq(drm_dev_to_irq(dev), dev->driver->irq_handler, |
231 | sh_flags, dev->devname, dev); | 237 | sh_flags, irqname, dev); |
232 | 238 | ||
233 | if (ret < 0) { | 239 | if (ret < 0) { |
234 | mutex_lock(&dev->struct_mutex); | 240 | mutex_lock(&dev->struct_mutex); |
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 53d544552625..0ccb63ee50ee 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -987,12 +987,6 @@ static int i915_load_modeset_init(struct drm_device *dev) | |||
987 | int fb_bar = IS_I9XX(dev) ? 2 : 0; | 987 | int fb_bar = IS_I9XX(dev) ? 2 : 0; |
988 | int ret = 0; | 988 | int ret = 0; |
989 | 989 | ||
990 | dev->devname = kstrdup(DRIVER_NAME, GFP_KERNEL); | ||
991 | if (!dev->devname) { | ||
992 | ret = -ENOMEM; | ||
993 | goto out; | ||
994 | } | ||
995 | |||
996 | dev->mode_config.fb_base = drm_get_resource_start(dev, fb_bar) & | 990 | dev->mode_config.fb_base = drm_get_resource_start(dev, fb_bar) & |
997 | 0xff000000; | 991 | 0xff000000; |
998 | 992 | ||
@@ -1006,7 +1000,7 @@ static int i915_load_modeset_init(struct drm_device *dev) | |||
1006 | 1000 | ||
1007 | ret = i915_probe_agp(dev, &agp_size, &prealloc_size); | 1001 | ret = i915_probe_agp(dev, &agp_size, &prealloc_size); |
1008 | if (ret) | 1002 | if (ret) |
1009 | goto kfree_devname; | 1003 | goto out; |
1010 | 1004 | ||
1011 | /* Basic memrange allocator for stolen space (aka vram) */ | 1005 | /* Basic memrange allocator for stolen space (aka vram) */ |
1012 | drm_mm_init(&dev_priv->vram, 0, prealloc_size); | 1006 | drm_mm_init(&dev_priv->vram, 0, prealloc_size); |
@@ -1024,7 +1018,7 @@ static int i915_load_modeset_init(struct drm_device *dev) | |||
1024 | 1018 | ||
1025 | ret = i915_gem_init_ringbuffer(dev); | 1019 | ret = i915_gem_init_ringbuffer(dev); |
1026 | if (ret) | 1020 | if (ret) |
1027 | goto kfree_devname; | 1021 | goto out; |
1028 | 1022 | ||
1029 | /* Allow hardware batchbuffers unless told otherwise. | 1023 | /* Allow hardware batchbuffers unless told otherwise. |
1030 | */ | 1024 | */ |
@@ -1056,8 +1050,6 @@ static int i915_load_modeset_init(struct drm_device *dev) | |||
1056 | 1050 | ||
1057 | destroy_ringbuffer: | 1051 | destroy_ringbuffer: |
1058 | i915_gem_cleanup_ringbuffer(dev); | 1052 | i915_gem_cleanup_ringbuffer(dev); |
1059 | kfree_devname: | ||
1060 | kfree(dev->devname); | ||
1061 | out: | 1053 | out: |
1062 | return ret; | 1054 | return ret; |
1063 | } | 1055 | } |