diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-25 12:40:01 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-25 12:40:01 -0700 |
commit | 706ddc032f54f763a03510d41c9bfcaa494560c7 (patch) | |
tree | 766efac172ef55196ace9554a5ce4a6df9e9163d /driver | |
parent | e5cb7bc8503e718f6bfb0929fae876229e0067ac (diff) | |
download | patches-706ddc032f54f763a03510d41c9bfcaa494560c7.tar.gz |
build error fix
Diffstat (limited to 'driver')
-rw-r--r-- | driver/kobject-fix-build-error.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/driver/kobject-fix-build-error.patch b/driver/kobject-fix-build-error.patch new file mode 100644 index 0000000000000..3ad0ebd4536d1 --- /dev/null +++ b/driver/kobject-fix-build-error.patch @@ -0,0 +1,79 @@ +From foo@baz Tue Apr 9 12:12:43 2002 +Date: Tue, 25 Apr 2006 15:37:26 +0200 +From: Kay Sievers <kay.sievers@vrfy.org> +To: Greg KH <greg@kroah.com> +Subject: Kobject: fix build error + +This fixes a build error for various odd combinations of CONFIG_HOTPLUG +and CONFIG_NET. + +Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> +Cc: Nigel Cunningham <ncunningham@cyclades.com> +Cc: Andrew Morton <akpm@osdl.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + include/linux/kobject.h | 2 +- + lib/kobject_uevent.c | 8 +++++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/include/linux/kobject.h ++++ gregkh-2.6/include/linux/kobject.h +@@ -259,7 +259,7 @@ struct subsys_attribute { + extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); + extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *); + +-#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) ++#if defined(CONFIG_HOTPLUG) + void kobject_uevent(struct kobject *kobj, enum kobject_action action); + + int add_uevent_var(char **envp, int num_envp, int *cur_index, +--- gregkh-2.6.orig/lib/kobject_uevent.c ++++ gregkh-2.6/lib/kobject_uevent.c +@@ -25,11 +25,13 @@ + #define BUFFER_SIZE 2048 /* buffer for the variables */ + #define NUM_ENVP 32 /* number of env pointers */ + +-#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) ++#if defined(CONFIG_HOTPLUG) + u64 uevent_seqnum; + char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug"; + static DEFINE_SPINLOCK(sequence_lock); ++#if defined(CONFIG_NET) + static struct sock *uevent_sock; ++#endif + + static char *action_to_string(enum kobject_action action) + { +@@ -155,6 +157,7 @@ void kobject_uevent(struct kobject *kobj + spin_unlock(&sequence_lock); + sprintf(seq_buff, "SEQNUM=%llu", (unsigned long long)seq); + ++#if defined(CONFIG_NET) + /* send netlink message */ + if (uevent_sock) { + struct sk_buff *skb; +@@ -179,6 +182,7 @@ void kobject_uevent(struct kobject *kobj + netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL); + } + } ++#endif + + /* call uevent_helper, usually only enabled during early boot */ + if (uevent_helper[0]) { +@@ -249,6 +253,7 @@ int add_uevent_var(char **envp, int num_ + } + EXPORT_SYMBOL_GPL(add_uevent_var); + ++#if defined(CONFIG_NET) + static int __init kobject_uevent_init(void) + { + uevent_sock = netlink_kernel_create(NETLINK_KOBJECT_UEVENT, 1, NULL, +@@ -264,5 +269,6 @@ static int __init kobject_uevent_init(vo + } + + postcore_initcall(kobject_uevent_init); ++#endif + + #endif /* CONFIG_HOTPLUG */ |