From 8dc4d4fa1f1394c2faed89760e1183287577fed3 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Tue, 22 Apr 2008 18:41:28 -0700 Subject: 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. --- shared-core/i915_init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.3