bcm47xx: Apply bcm5354 USB fix
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.21 / 213-kobject_uevent.patch
1 --- a/lib/kobject_uevent.c
2 +++ b/lib/kobject_uevent.c
3 @@ -30,9 +30,22 @@ u64 uevent_seqnum;
4 char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug";
5 static DEFINE_SPINLOCK(sequence_lock);
6 #if defined(CONFIG_NET)
7 -static struct sock *uevent_sock;
8 +struct sock *uevent_sock = NULL;
9 +EXPORT_SYMBOL_GPL(uevent_sock);
10 #endif
11
12 +u64 uevent_next_seqnum(void)
13 +{
14 + u64 seq;
15 +
16 + spin_lock(&sequence_lock);
17 + seq = ++uevent_seqnum;
18 + spin_unlock(&sequence_lock);
19 +
20 + return seq;
21 +}
22 +EXPORT_SYMBOL_GPL(uevent_next_seqnum);
23 +
24 static char *action_to_string(enum kobject_action action)
25 {
26 switch (action) {
27 @@ -171,9 +184,7 @@ int kobject_uevent_env(struct kobject *k
28 }
29
30 /* we will send an event, request a new sequence number */
31 - spin_lock(&sequence_lock);
32 - seq = ++uevent_seqnum;
33 - spin_unlock(&sequence_lock);
34 + seq = uevent_next_seqnum();
35 sprintf(seq_buff, "SEQNUM=%llu", (unsigned long long)seq);
36
37 #if defined(CONFIG_NET)
This page took 0.04085 seconds and 5 git commands to generate.