Merge master.kernel.org:/home/rmk/linux-2.6-serial
[powerpc.git] / net / netlink / af_netlink.c
index 8c38ee6..a67f1b4 100644 (file)
@@ -293,7 +293,7 @@ static inline int nl_pid_hash_dilute(struct nl_pid_hash *hash, int len)
        return 0;
 }
 
-static struct proto_ops netlink_ops;
+static const struct proto_ops netlink_ops;
 
 static int netlink_insert(struct sock *sk, u32 pid)
 {
@@ -402,7 +402,7 @@ static int netlink_create(struct socket *sock, int protocol)
        groups = nl_table[protocol].groups;
        netlink_unlock_table();
 
-       if ((err = __netlink_create(sock, protocol) < 0))
+       if ((err = __netlink_create(sock, protocol)) < 0)
                goto out_module;
 
        nlk = nlk_sk(sock->sk);
@@ -476,7 +476,7 @@ static int netlink_autobind(struct socket *sock)
        struct hlist_head *head;
        struct sock *osk;
        struct hlist_node *node;
-       s32 pid = current->pid;
+       s32 pid = current->tgid;
        int err;
        static s32 rover = -4097;
 
@@ -1656,7 +1656,7 @@ int netlink_unregister_notifier(struct notifier_block *nb)
        return notifier_chain_unregister(&netlink_chain, nb);
 }
                 
-static struct proto_ops netlink_ops = {
+static const struct proto_ops netlink_ops = {
        .family =       PF_NETLINK,
        .owner =        THIS_MODULE,
        .release =      netlink_release,