[adm5120] fix initcall level in i2c-gpio-custom driver if not built as a module
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.23 / 213-kobject_uevent.patch
1 Index: linux-2.6.23-rc6/lib/kobject_uevent.c
2 ===================================================================
3 --- linux-2.6.23-rc6.orig/lib/kobject_uevent.c 2007-09-21 16:23:52.000000000 +0800
4 +++ linux-2.6.23-rc6/lib/kobject_uevent.c 2007-09-21 16:24:07.000000000 +0800
5 @@ -40,9 +40,22 @@
6 char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug";
7 static DEFINE_SPINLOCK(sequence_lock);
8 #if defined(CONFIG_NET)
9 -static struct sock *uevent_sock;
10 +struct sock *uevent_sock = NULL;
11 +EXPORT_SYMBOL_GPL(uevent_sock);
12 #endif
13
14 +u64 uevent_next_seqnum(void)
15 +{
16 + u64 seq;
17 +
18 + spin_lock(&sequence_lock);
19 + seq = ++uevent_seqnum;
20 + spin_unlock(&sequence_lock);
21 +
22 + return seq;
23 +}
24 +EXPORT_SYMBOL_GPL(uevent_next_seqnum);
25 +
26 /**
27 * kobject_uevent_env - send an uevent with environmental data
28 *
29 @@ -159,9 +172,7 @@
30 }
31
32 /* we will send an event, request a new sequence number */
33 - spin_lock(&sequence_lock);
34 - seq = ++uevent_seqnum;
35 - spin_unlock(&sequence_lock);
36 + seq = uevent_next_seqnum();
37 sprintf(seq_buff, "SEQNUM=%llu", (unsigned long long)seq);
38
39 #if defined(CONFIG_NET)
This page took 0.04945 seconds and 5 git commands to generate.