projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b57e1f7
)
i915: allocate devname at init time
author
Jesse Barnes
<jbarnes@jbarnes-t61.(none)>
Wed, 23 Apr 2008 01:41:28 +0000
(18:41 -0700)
committer
Jesse Barnes
<jbarnes@jbarnes-t61.(none)>
Wed, 23 Apr 2008 01:41:28 +0000
(18:41 -0700)
Since it'll be freed at unload time, we should alloc devname rather than
pointing to the DRIVER_NAME string.
shared-core/i915_init.c
patch
|
blob
|
history
diff --git
a/shared-core/i915_init.c
b/shared-core/i915_init.c
index ce6f1656e903da1ef987018bf4d2b01af7b500cd..53574eb7c50bc033ff5a39a5c40735eebee900d2 100644
(file)
--- 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);
}