summaryrefslogtreecommitdiff
path: root/net/tipc/port.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2013-06-17 10:54:46 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-17 15:53:01 -0700
commitc0fee8aca7206264d5e3dcc4e60aaf86501f4ea1 (patch)
tree2e58d96d9afd483a5aaf9711360bd5d82fa3cd76 /net/tipc/port.c
parent28e5297281ab85d636aa814a9b65cfb99375d092 (diff)
downloadlinux-stable-c0fee8aca7206264d5e3dcc4e60aaf86501f4ea1.tar.gz
linux-stable-c0fee8aca7206264d5e3dcc4e60aaf86501f4ea1.tar.bz2
linux-stable-c0fee8aca7206264d5e3dcc4e60aaf86501f4ea1.zip
tipc: save sock structure pointer instead of void pointer to tipc_port
Directly save sock structure pointer instead of void pointer to avoid unnecessary cast conversions. Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r--net/tipc/port.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 84b2a574f161..0bb185a3ed4a 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -206,7 +206,7 @@ exit:
*
* Returns pointer to (locked) TIPC port, or NULL if unable to create it
*/
-struct tipc_port *tipc_createport(void *usr_handle,
+struct tipc_port *tipc_createport(struct sock *sk,
u32 (*dispatcher)(struct tipc_port *, struct sk_buff *),
void (*wakeup)(struct tipc_port *),
const u32 importance)
@@ -227,7 +227,7 @@ struct tipc_port *tipc_createport(void *usr_handle,
return NULL;
}
- p_ptr->usr_handle = usr_handle;
+ p_ptr->sk = sk;
p_ptr->max_pkt = MAX_PKT_DEFAULT;
p_ptr->ref = ref;
INIT_LIST_HEAD(&p_ptr->wait_list);