Merge tag 'sound-fix-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[firefly-linux-kernel-4.4.55.git] / lib / kobject_uevent.c
index 4e3bd71bd9495cfbf95fd9a28adf5e18a71f4592..f6c2c1e7779c9c93a11133a27c57081746f5fd2c 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/export.h>
 #include <linux/kmod.h>
 #include <linux/slab.h>
-#include <linux/user_namespace.h>
 #include <linux/socket.h>
 #include <linux/skbuff.h>
 #include <linux/netlink.h>
@@ -29,7 +28,9 @@
 
 
 u64 uevent_seqnum;
+#ifdef CONFIG_UEVENT_HELPER
 char uevent_helper[UEVENT_HELPER_PATH_LEN] = CONFIG_UEVENT_HELPER_PATH;
+#endif
 #ifdef CONFIG_NET
 struct uevent_sock {
        struct list_head list;
@@ -109,6 +110,7 @@ static int kobj_bcast_filter(struct sock *dsk, struct sk_buff *skb, void *data)
 }
 #endif
 
+#ifdef CONFIG_UEVENT_HELPER
 static int kobj_usermode_filter(struct kobject *kobj)
 {
        const struct kobj_ns_type_operations *ops;
@@ -147,6 +149,7 @@ static void cleanup_uevent_env(struct subprocess_info *info)
 {
        kfree(info->data);
 }
+#endif
 
 /**
  * kobject_uevent_env - send an uevent with environmental data
@@ -323,6 +326,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
 #endif
        mutex_unlock(&uevent_sock_mutex);
 
+#ifdef CONFIG_UEVENT_HELPER
        /* call uevent_helper, usually only enabled during early boot */
        if (uevent_helper[0] && !kobj_usermode_filter(kobj)) {
                struct subprocess_info *info;
@@ -347,6 +351,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
                        env = NULL;     /* freed by cleanup_uevent_env */
                }
        }
+#endif
 
 exit:
        kfree(devpath);