mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
[PATCH] remove CONFIG_KOBJECT_UEVENT option
It makes zero sense to have hotplug, but not the netlink events enabled today. Remove this option and merge the kobject_uevent.h header into the kobject.h header file. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0343821177
commit
0296b22813
8 changed files with 40 additions and 107 deletions
|
@ -19,14 +19,17 @@
|
|||
#include <linux/skbuff.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kobject_uevent.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <net/sock.h>
|
||||
|
||||
#define BUFFER_SIZE 1024 /* buffer for the hotplug env */
|
||||
#define NUM_ENVP 32 /* number of env pointers */
|
||||
|
||||
#if defined(CONFIG_KOBJECT_UEVENT) || defined(CONFIG_HOTPLUG)
|
||||
#if defined(CONFIG_HOTPLUG)
|
||||
char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
|
||||
u64 hotplug_seqnum;
|
||||
static DEFINE_SPINLOCK(sequence_lock);
|
||||
|
||||
static char *action_to_string(enum kobject_action action)
|
||||
{
|
||||
switch (action) {
|
||||
|
@ -48,9 +51,7 @@ static char *action_to_string(enum kobject_action action)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KOBJECT_UEVENT
|
||||
static struct sock *uevent_sock;
|
||||
|
||||
/**
|
||||
|
@ -168,21 +169,6 @@ static int __init kobject_uevent_init(void)
|
|||
|
||||
postcore_initcall(kobject_uevent_init);
|
||||
|
||||
#else
|
||||
static inline int send_uevent(const char *signal, const char *obj,
|
||||
char **envp, int gfp_mask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_KOBJECT_UEVENT */
|
||||
|
||||
|
||||
#ifdef CONFIG_HOTPLUG
|
||||
char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
|
||||
u64 hotplug_seqnum;
|
||||
static DEFINE_SPINLOCK(sequence_lock);
|
||||
|
||||
/**
|
||||
* kobject_hotplug - notify userspace by executing /sbin/hotplug
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue