diff options
author | Ying Xue <ying.xue@windriver.com> | 2013-06-17 10:54:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-17 18:53:01 -0400 |
commit | c0fee8aca7206264d5e3dcc4e60aaf86501f4ea1 (patch) | |
tree | 2e58d96d9afd483a5aaf9711360bd5d82fa3cd76 /net/tipc/port.h | |
parent | 28e5297281ab85d636aa814a9b65cfb99375d092 (diff) |
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.h')
-rw-r--r-- | net/tipc/port.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tipc/port.h b/net/tipc/port.h index 45838826f2f8..241f529db942 100644 --- a/net/tipc/port.h +++ b/net/tipc/port.h | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | /** | 49 | /** |
50 | * struct tipc_port - TIPC port structure | 50 | * struct tipc_port - TIPC port structure |
51 | * @usr_handle: pointer to additional user-defined information about port | 51 | * @sk: pointer to socket handle |
52 | * @lock: pointer to spinlock for controlling access to port | 52 | * @lock: pointer to spinlock for controlling access to port |
53 | * @connected: non-zero if port is currently connected to a peer port | 53 | * @connected: non-zero if port is currently connected to a peer port |
54 | * @conn_type: TIPC type used when connection was established | 54 | * @conn_type: TIPC type used when connection was established |
@@ -74,7 +74,7 @@ | |||
74 | * @subscription: "node down" subscription used to terminate failed connections | 74 | * @subscription: "node down" subscription used to terminate failed connections |
75 | */ | 75 | */ |
76 | struct tipc_port { | 76 | struct tipc_port { |
77 | void *usr_handle; | 77 | struct sock *sk; |
78 | spinlock_t *lock; | 78 | spinlock_t *lock; |
79 | int connected; | 79 | int connected; |
80 | u32 conn_type; | 80 | u32 conn_type; |
@@ -106,7 +106,7 @@ struct tipc_port_list; | |||
106 | /* | 106 | /* |
107 | * TIPC port manipulation routines | 107 | * TIPC port manipulation routines |
108 | */ | 108 | */ |
109 | struct tipc_port *tipc_createport(void *usr_handle, | 109 | struct tipc_port *tipc_createport(struct sock *sk, |
110 | u32 (*dispatcher)(struct tipc_port *, struct sk_buff *), | 110 | u32 (*dispatcher)(struct tipc_port *, struct sk_buff *), |
111 | void (*wakeup)(struct tipc_port *), const u32 importance); | 111 | void (*wakeup)(struct tipc_port *), const u32 importance); |
112 | 112 | ||