Commit e7a98d47 authored by Christoph Hellwig's avatar Christoph Hellwig

net/phonet: convert to ->poll_mask

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 4bac2bcd
...@@ -340,15 +340,12 @@ static int pn_socket_getname(struct socket *sock, struct sockaddr *addr, ...@@ -340,15 +340,12 @@ static int pn_socket_getname(struct socket *sock, struct sockaddr *addr,
return sizeof(struct sockaddr_pn); return sizeof(struct sockaddr_pn);
} }
static __poll_t pn_socket_poll(struct file *file, struct socket *sock, static __poll_t pn_socket_poll_mask(struct socket *sock, __poll_t events)
poll_table *wait)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
struct pep_sock *pn = pep_sk(sk); struct pep_sock *pn = pep_sk(sk);
__poll_t mask = 0; __poll_t mask = 0;
poll_wait(file, sk_sleep(sk), wait);
if (sk->sk_state == TCP_CLOSE) if (sk->sk_state == TCP_CLOSE)
return EPOLLERR; return EPOLLERR;
if (!skb_queue_empty(&sk->sk_receive_queue)) if (!skb_queue_empty(&sk->sk_receive_queue))
...@@ -473,7 +470,7 @@ const struct proto_ops phonet_stream_ops = { ...@@ -473,7 +470,7 @@ const struct proto_ops phonet_stream_ops = {
.socketpair = sock_no_socketpair, .socketpair = sock_no_socketpair,
.accept = pn_socket_accept, .accept = pn_socket_accept,
.getname = pn_socket_getname, .getname = pn_socket_getname,
.poll = pn_socket_poll, .poll_mask = pn_socket_poll_mask,
.ioctl = pn_socket_ioctl, .ioctl = pn_socket_ioctl,
.listen = pn_socket_listen, .listen = pn_socket_listen,
.shutdown = sock_no_shutdown, .shutdown = sock_no_shutdown,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment