]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/params.c
[SCSI] fix pcmcia compile problem
[linux-2.6-omap-h63xx.git] / kernel / params.c
index 2a4c51487e7257e1865ae33d805a22e3dbb7f9ae..dfef46474e55b70f380568ac5592ae35b2f3baa2 100644 (file)
@@ -472,7 +472,7 @@ param_sysfs_setup(struct module_kobject *mk,
                        sizeof(mp->grp.attrs[0]));
        size[1] = (valid_attrs + 1) * sizeof(mp->grp.attrs[0]);
 
-       mp = kmalloc(size[0] + size[1], GFP_KERNEL);
+       mp = kzalloc(size[0] + size[1], GFP_KERNEL);
        if (!mp)
                return ERR_PTR(-ENOMEM);
 
@@ -697,8 +697,18 @@ static struct kset_uevent_ops module_uevent_ops = {
 decl_subsys(module, &module_ktype, &module_uevent_ops);
 int module_sysfs_initialized;
 
+static void module_release(struct kobject *kobj)
+{
+       /*
+        * Stupid empty release function to allow the memory for the kobject to
+        * be properly cleaned up.  This will not need to be present for 2.6.25
+        * with the upcoming kobject core rework.
+        */
+}
+
 static struct kobj_type module_ktype = {
        .sysfs_ops =    &module_sysfs_ops,
+       .release =      module_release,
 };
 
 /*