Merge branch 'pstore-efi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[pandora-kernel.git] / kernel / module.c
index a4295e6..04379f9 100644 (file)
@@ -975,10 +975,27 @@ static struct module_attribute initstate = {
        .show = show_initstate,
 };
 
+static ssize_t store_uevent(struct module_attribute *mattr,
+                           struct module_kobject *mk,
+                           const char *buffer, size_t count)
+{
+       enum kobject_action action;
+
+       if (kobject_action_type(buffer, count, &action) == 0)
+               kobject_uevent(&mk->kobj, action);
+       return count;
+}
+
+struct module_attribute module_uevent = {
+       .attr = { .name = "uevent", .mode = 0200 },
+       .store = store_uevent,
+};
+
 static struct module_attribute *modinfo_attrs[] = {
        &modinfo_version,
        &modinfo_srcversion,
        &initstate,
+       &module_uevent,
 #ifdef CONFIG_MODULE_UNLOAD
        &refcnt,
 #endif