menu "Generic Driver Options"
 
-config UEVENT_HELPER_PATH
-       string "path to uevent helper"
-       default ""
+config UEVENT_HELPER
+       bool "Support for uevent helper"
+       default y
        help
-         Path to uevent helper program forked by the kernel for
+         The uevent helper program is forked by the kernel for
          every uevent.
          Before the switch to the netlink-based uevent source, this was
          used to hook hotplug scripts into kernel device events. It
          that it creates a high system load, or on smaller systems
          it is known to create out-of-memory situations during bootup.
 
-         To disable user space helper program execution at early boot
-         time specify an empty string here. This setting can be altered
+config UEVENT_HELPER_PATH
+       string "path to uevent helper"
+       depends on UEVENT_HELPER
+       default ""
+       help
+         To disable user space helper program execution at by default
+         specify an empty string here. This setting can still be altered
          via /proc/sys/kernel/hotplug or via /sys/kernel/uevent_helper
          later at runtime.
 
 
 #define UEVENT_NUM_ENVP                        32      /* number of env pointers */
 #define UEVENT_BUFFER_SIZE             2048    /* buffer for the variables */
 
+#ifdef CONFIG_UEVENT_HELPER
 /* path to the userspace helper executed on an event */
 extern char uevent_helper[];
+#endif
 
 /* counter to tag the uevent, read only except for the kobject core */
 extern u64 uevent_seqnum;
 
 }
 KERNEL_ATTR_RO(uevent_seqnum);
 
+#ifdef CONFIG_UEVENT_HELPER
 /* uevent helper program, used during early boot */
 static ssize_t uevent_helper_show(struct kobject *kobj,
                                  struct kobj_attribute *attr, char *buf)
        return count;
 }
 KERNEL_ATTR_RW(uevent_helper);
-
+#endif
 
 #ifdef CONFIG_PROFILING
 static ssize_t profiling_show(struct kobject *kobj,
 static struct attribute * kernel_attrs[] = {
        &fscaps_attr.attr,
        &uevent_seqnum_attr.attr,
+#ifdef CONFIG_UEVENT_HELPER
        &uevent_helper_attr.attr,
+#endif
 #ifdef CONFIG_PROFILING
        &profiling_attr.attr,
 #endif
 
                .extra2         = &one,
        },
 #endif
-
+#ifdef CONFIG_UEVENT_HELPER
        {
                .procname       = "hotplug",
                .data           = &uevent_helper,
                .mode           = 0644,
                .proc_handler   = proc_dostring,
        },
-
+#endif
 #ifdef CONFIG_CHR_DEV_SG
        {
                .procname       = "sg-big-buff",
 
 
 
 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;
 }
 #endif
 
+#ifdef CONFIG_UEVENT_HELPER
 static int kobj_usermode_filter(struct kobject *kobj)
 {
        const struct kobj_ns_type_operations *ops;
 {
        kfree(info->data);
 }
+#endif
 
 /**
  * kobject_uevent_env - send an uevent with environmental data
 #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;
                        env = NULL;     /* freed by cleanup_uevent_env */
                }
        }
+#endif
 
 exit:
        kfree(devpath);