Skip to content

Commit

Permalink
net/caif: convert to ->poll_mask
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
Christoph Hellwig committed May 26, 2018
1 parent 17112d8 commit 9490e40
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions net/caif/caif_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -934,15 +934,11 @@ static int caif_release(struct socket *sock)
}

/* Copied from af_unix.c:unix_poll(), added CAIF tx_flow handling */
static __poll_t caif_poll(struct file *file,
struct socket *sock, poll_table *wait)
static __poll_t caif_poll_mask(struct socket *sock, __poll_t events)
{
struct sock *sk = sock->sk;
__poll_t mask;
struct caifsock *cf_sk = container_of(sk, struct caifsock, sk);

sock_poll_wait(file, sk_sleep(sk), wait);
mask = 0;
__poll_t mask = 0;

/* exceptional events? */
if (sk->sk_err)
Expand Down Expand Up @@ -976,7 +972,7 @@ static const struct proto_ops caif_seqpacket_ops = {
.socketpair = sock_no_socketpair,
.accept = sock_no_accept,
.getname = sock_no_getname,
.poll = caif_poll,
.poll_mask = caif_poll_mask,
.ioctl = sock_no_ioctl,
.listen = sock_no_listen,
.shutdown = sock_no_shutdown,
Expand All @@ -997,7 +993,7 @@ static const struct proto_ops caif_stream_ops = {
.socketpair = sock_no_socketpair,
.accept = sock_no_accept,
.getname = sock_no_getname,
.poll = caif_poll,
.poll_mask = caif_poll_mask,
.ioctl = sock_no_ioctl,
.listen = sock_no_listen,
.shutdown = sock_no_shutdown,
Expand Down

0 comments on commit 9490e40

Please sign in to comment.