Merge branch 'master' into 85xx
[linux-drm-fsl-dcu.git] / kernel / params.c
index cbaac85942d5a3fba3856db6908804a12baaf4eb..553cf7d6a4be113f0dcb89f1be51aa9989d51453 100644 (file)
@@ -30,6 +30,8 @@
 #define DEBUGP(fmt, a...)
 #endif
 
+static struct kobj_type module_ktype;
+
 static inline char dash2underscore(char c)
 {
        if (c == '-')
@@ -671,6 +673,19 @@ static struct sysfs_ops module_sysfs_ops = {
        .store = module_attr_store,
 };
 
+static int uevent_filter(struct kset *kset, struct kobject *kobj)
+{
+       struct kobj_type *ktype = get_ktype(kobj);
+
+       if (ktype == &module_ktype)
+               return 1;
+       return 0;
+}
+
+static struct kset_uevent_ops module_uevent_ops = {
+       .filter = uevent_filter,
+};
+
 #else
 static struct sysfs_ops module_sysfs_ops = {
        .show = NULL,
@@ -682,7 +697,7 @@ static struct kobj_type module_ktype = {
        .sysfs_ops =    &module_sysfs_ops,
 };
 
-decl_subsys(module, &module_ktype, NULL);
+decl_subsys(module, &module_ktype, &module_uevent_ops);
 
 /*
  * param_sysfs_init - wrapper for built-in params support