summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@jbarnes-t61.(none)>2008-04-22 18:41:28 -0700
committerJesse Barnes <jbarnes@jbarnes-t61.(none)>2008-04-22 18:41:28 -0700
commit8dc4d4fa1f1394c2faed89760e1183287577fed3 (patch)
tree7ce2192ff4e165786018a43555e027174b9dbb69 /shared-core
parentb57e1f7efd6e27efbf960ab11323981e016ea86e (diff)
i915: allocate devname at init time
Since it'll be freed at unload time, we should alloc devname rather than pointing to the DRIVER_NAME string.
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_init.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c
index ce6f1656..53574eb7 100644
--- a/shared-core/i915_init.c
+++ b/shared-core/i915_init.c
@@ -265,7 +265,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
drm_mm_print(&dev->bm.man[DRM_BO_MEM_VRAM].manager, "VRAM");
drm_mm_print(&dev->bm.man[DRM_BO_MEM_TT].manager, "TT");
- dev->devname = DRIVER_NAME;
+ dev->devname = kstrdup(DRIVER_NAME, GFP_KERNEL);
+ if (!dev->devname)
+ return -ENOMEM;
+
drm_irq_install(dev);
}