]> err.no Git - linux-2.6/blobdiff - net/tipc/user_reg.c
Merge master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / net / tipc / user_reg.c
index e4da5becc342597acea2ed10bdfd64b3b43a3f76..3f3f933976e9dc27603cff2deec0b74150faebc4 100644 (file)
@@ -1,22 +1,25 @@
 /*
  * net/tipc/user_reg.c: TIPC user registry code
  * 
- * Copyright (c) 2003-2005, Ericsson Research Canada
+ * Copyright (c) 2000-2006, Ericsson AB
  * Copyright (c) 2004-2005, Wind River Systems
- * Copyright (c) 2005-2006, Ericsson AB
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
- * 
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the names of the copyright holders nor the names of its 
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ *    contributors may be used to endorse or promote products derived from
+ *    this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -62,7 +65,7 @@ struct tipc_user {
 #define MAX_USERID 64
 #define USER_LIST_SIZE ((MAX_USERID + 1) * sizeof(struct tipc_user))
 
-static struct tipc_user *users = 0;
+static struct tipc_user *users = NULL;
 static u32 next_free_user = MAX_USERID + 1;
 static spinlock_t reg_lock = SPIN_LOCK_UNLOCKED;
 
@@ -111,10 +114,10 @@ static void reg_callback(struct tipc_user *user_ptr)
 }
 
 /**
- * reg_start - activate TIPC user registry
+ * tipc_reg_start - activate TIPC user registry
  */
 
-int reg_start(void)
+int tipc_reg_start(void)
 {
        u32 u;
        int res;
@@ -124,17 +127,17 @@ int reg_start(void)
 
        for (u = 1; u <= MAX_USERID; u++) {
                if (users[u].callback)
-                       k_signal((Handler)reg_callback,
-                                (unsigned long)&users[u]);
+                       tipc_k_signal((Handler)reg_callback,
+                                     (unsigned long)&users[u]);
        }
        return TIPC_OK;
 }
 
 /**
- * reg_stop - shut down & delete TIPC user registry
+ * tipc_reg_stop - shut down & delete TIPC user registry
  */
 
-void reg_stop(void)
+void tipc_reg_stop(void)
 {               
        int id;
 
@@ -146,7 +149,7 @@ void reg_stop(void)
                        reg_callback(&users[id]);
        }
        kfree(users);
-       users = 0;
+       users = NULL;
 }
 
 /**
@@ -181,7 +184,7 @@ int tipc_attach(u32 *userid, tipc_mode_event cb, void *usr_handle)
        atomic_inc(&tipc_user_count);
        
        if (cb && (tipc_mode != TIPC_NOT_RUNNING))
-               k_signal((Handler)reg_callback, (unsigned long)user_ptr);
+               tipc_k_signal((Handler)reg_callback, (unsigned long)user_ptr);
        return TIPC_OK;
 }
 
@@ -220,10 +223,10 @@ void tipc_detach(u32 userid)
 }
 
 /**
- * reg_add_port - register a user's driver port
+ * tipc_reg_add_port - register a user's driver port
  */
 
-int reg_add_port(struct user_port *up_ptr)
+int tipc_reg_add_port(struct user_port *up_ptr)
 {
        struct tipc_user *user_ptr;
 
@@ -242,10 +245,10 @@ int reg_add_port(struct user_port *up_ptr)
 }
 
 /**
- * reg_remove_port - deregister a user's driver port
+ * tipc_reg_remove_port - deregister a user's driver port
  */
 
-int reg_remove_port(struct user_port *up_ptr)
+int tipc_reg_remove_port(struct user_port *up_ptr)
 {
        if (up_ptr->user_ref == 0)
                return TIPC_OK;