From 24be34b5a0c9114541891d29dff1152bb1a8df34 Mon Sep 17 00:00:00 2001 From: Jon Paul Maloy Date: Wed, 12 Mar 2014 11:31:10 -0400 Subject: tipc: eliminate upcall function pointers between port and socket MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to the original one-to-many relation between port and user API layers, upcalls to the API have been performed via function pointers, installed in struct tipc_port at creation. Since this relation now always is one-to-one, we can instead use ordinary function calls. We remove the function pointers 'dispatcher' and ´wakeup' from struct tipc_port, and replace them with calls to the renamed functions tipc_sk_rcv() and tipc_sk_wakeup(). At the same time we change the name and signature of the functions tipc_createport() and tipc_deleteport() to reflect their new role as mere initialization/destruction functions. Signed-off-by: Jon Maloy Reviewed-by: Ying Xue Reviewed-by: Erik Hugne Signed-off-by: David S. Miller --- net/tipc/socket.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'net/tipc/socket.h') diff --git a/net/tipc/socket.h b/net/tipc/socket.h index f1cd54a68817..a02d0bb0e2ab 100644 --- a/net/tipc/socket.h +++ b/net/tipc/socket.h @@ -67,4 +67,11 @@ static inline struct sock *tipc_port_to_sk(const struct tipc_port *port) return &(container_of(port, struct tipc_sock, port))->sk; } +static inline void tipc_sk_wakeup(struct sock *sk) +{ + sk->sk_write_space(sk); +} + +u32 tipc_sk_rcv(struct sock *sk, struct sk_buff *buf); + #endif -- cgit v1.2.3