diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-04-25 18:20:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-26 14:18:45 -0400 |
commit | 4a4771a58e13b46bfdc999fe481e550f8c6937ff (patch) | |
tree | 42bb025b051ba79efda403e1b843c2a9a1243946 /net/caif | |
parent | be9e969d79e40c59142fa9e931aa6f085581b379 (diff) |
net: use sk_sleep()
Commit aa395145 (net: sk_sleep() helper) missed three files in the
conversion.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif')
-rw-r--r-- | net/caif/caif_socket.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index 90317e7d10b4..d455375789fb 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c | |||
@@ -169,7 +169,7 @@ static int caif_sktrecv_cb(struct cflayer *layr, struct cfpkt *pkt) | |||
169 | 169 | ||
170 | /* Signal reader that data is available. */ | 170 | /* Signal reader that data is available. */ |
171 | 171 | ||
172 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 172 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
173 | 173 | ||
174 | return 0; | 174 | return 0; |
175 | } | 175 | } |
@@ -203,7 +203,7 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
203 | dbfs_atomic_inc(&cnt.num_tx_flow_on_ind); | 203 | dbfs_atomic_inc(&cnt.num_tx_flow_on_ind); |
204 | /* Signal reader that data is available. */ | 204 | /* Signal reader that data is available. */ |
205 | SET_TX_FLOW_ON(cf_sk); | 205 | SET_TX_FLOW_ON(cf_sk); |
206 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 206 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
207 | break; | 207 | break; |
208 | 208 | ||
209 | case CAIF_CTRLCMD_FLOW_OFF_IND: | 209 | case CAIF_CTRLCMD_FLOW_OFF_IND: |
@@ -217,7 +217,7 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
217 | caif_assert(STATE_IS_OPEN(cf_sk)); | 217 | caif_assert(STATE_IS_OPEN(cf_sk)); |
218 | SET_PENDING_OFF(cf_sk); | 218 | SET_PENDING_OFF(cf_sk); |
219 | SET_TX_FLOW_ON(cf_sk); | 219 | SET_TX_FLOW_ON(cf_sk); |
220 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 220 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
221 | break; | 221 | break; |
222 | 222 | ||
223 | case CAIF_CTRLCMD_DEINIT_RSP: | 223 | case CAIF_CTRLCMD_DEINIT_RSP: |
@@ -225,8 +225,8 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
225 | caif_assert(!STATE_IS_OPEN(cf_sk)); | 225 | caif_assert(!STATE_IS_OPEN(cf_sk)); |
226 | SET_PENDING_OFF(cf_sk); | 226 | SET_PENDING_OFF(cf_sk); |
227 | if (!STATE_IS_PENDING_DESTROY(cf_sk)) { | 227 | if (!STATE_IS_PENDING_DESTROY(cf_sk)) { |
228 | if (cf_sk->sk.sk_sleep != NULL) | 228 | if (sk_sleep(&cf_sk->sk) != NULL) |
229 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 229 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
230 | } | 230 | } |
231 | dbfs_atomic_inc(&cnt.num_deinit); | 231 | dbfs_atomic_inc(&cnt.num_deinit); |
232 | sock_put(&cf_sk->sk); | 232 | sock_put(&cf_sk->sk); |
@@ -238,7 +238,7 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
238 | SET_STATE_CLOSED(cf_sk); | 238 | SET_STATE_CLOSED(cf_sk); |
239 | SET_PENDING_OFF(cf_sk); | 239 | SET_PENDING_OFF(cf_sk); |
240 | SET_TX_FLOW_OFF(cf_sk); | 240 | SET_TX_FLOW_OFF(cf_sk); |
241 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 241 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
242 | break; | 242 | break; |
243 | 243 | ||
244 | case CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND: | 244 | case CAIF_CTRLCMD_REMOTE_SHUTDOWN_IND: |
@@ -247,7 +247,7 @@ static void caif_sktflowctrl_cb(struct cflayer *layr, | |||
247 | /* Use sk_shutdown to indicate remote shutdown indication */ | 247 | /* Use sk_shutdown to indicate remote shutdown indication */ |
248 | cf_sk->sk.sk_shutdown |= RCV_SHUTDOWN; | 248 | cf_sk->sk.sk_shutdown |= RCV_SHUTDOWN; |
249 | cf_sk->file_mode = 0; | 249 | cf_sk->file_mode = 0; |
250 | wake_up_interruptible(cf_sk->sk.sk_sleep); | 250 | wake_up_interruptible(sk_sleep(&cf_sk->sk)); |
251 | break; | 251 | break; |
252 | 252 | ||
253 | default: | 253 | default: |
@@ -325,7 +325,7 @@ static int caif_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
325 | release_sock(&cf_sk->sk); | 325 | release_sock(&cf_sk->sk); |
326 | 326 | ||
327 | result = | 327 | result = |
328 | wait_event_interruptible(*cf_sk->sk.sk_sleep, | 328 | wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
329 | !STATE_IS_PENDING(cf_sk)); | 329 | !STATE_IS_PENDING(cf_sk)); |
330 | 330 | ||
331 | lock_sock(&(cf_sk->sk)); | 331 | lock_sock(&(cf_sk->sk)); |
@@ -365,7 +365,7 @@ static int caif_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
365 | release_sock(&cf_sk->sk); | 365 | release_sock(&cf_sk->sk); |
366 | 366 | ||
367 | /* Block reader until data arrives or socket is closed. */ | 367 | /* Block reader until data arrives or socket is closed. */ |
368 | if (wait_event_interruptible(*cf_sk->sk.sk_sleep, | 368 | if (wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
369 | cfpkt_qpeek(cf_sk->pktq) | 369 | cfpkt_qpeek(cf_sk->pktq) |
370 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) | 370 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) |
371 | || !STATE_IS_OPEN(cf_sk)) == | 371 | || !STATE_IS_OPEN(cf_sk)) == |
@@ -537,7 +537,7 @@ static int caif_sendmsg(struct kiocb *kiocb, struct socket *sock, | |||
537 | * for its conclusion. | 537 | * for its conclusion. |
538 | */ | 538 | */ |
539 | result = | 539 | result = |
540 | wait_event_interruptible(*cf_sk->sk.sk_sleep, | 540 | wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
541 | !STATE_IS_PENDING(cf_sk)); | 541 | !STATE_IS_PENDING(cf_sk)); |
542 | /* I want to be alone on cf_sk (except status and queue) */ | 542 | /* I want to be alone on cf_sk (except status and queue) */ |
543 | lock_sock(&(cf_sk->sk)); | 543 | lock_sock(&(cf_sk->sk)); |
@@ -573,7 +573,7 @@ static int caif_sendmsg(struct kiocb *kiocb, struct socket *sock, | |||
573 | release_sock(&cf_sk->sk); | 573 | release_sock(&cf_sk->sk); |
574 | 574 | ||
575 | /* Wait until flow is on or socket is closed */ | 575 | /* Wait until flow is on or socket is closed */ |
576 | if (wait_event_interruptible(*cf_sk->sk.sk_sleep, | 576 | if (wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
577 | TX_FLOW_IS_ON(cf_sk) | 577 | TX_FLOW_IS_ON(cf_sk) |
578 | || !STATE_IS_OPEN(cf_sk) | 578 | || !STATE_IS_OPEN(cf_sk) |
579 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) | 579 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) |
@@ -650,7 +650,7 @@ static int caif_sendmsg(struct kiocb *kiocb, struct socket *sock, | |||
650 | release_sock(&cf_sk->sk); | 650 | release_sock(&cf_sk->sk); |
651 | 651 | ||
652 | /* Wait until flow is on or socket is closed */ | 652 | /* Wait until flow is on or socket is closed */ |
653 | if (wait_event_interruptible(*cf_sk->sk.sk_sleep, | 653 | if (wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
654 | TX_FLOW_IS_ON(cf_sk) | 654 | TX_FLOW_IS_ON(cf_sk) |
655 | || !STATE_IS_OPEN(cf_sk) | 655 | || !STATE_IS_OPEN(cf_sk) |
656 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) | 656 | || STATE_IS_REMOTE_SHUTDOWN(cf_sk) |
@@ -898,7 +898,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uservaddr, | |||
898 | * for its conclusion. | 898 | * for its conclusion. |
899 | */ | 899 | */ |
900 | result = | 900 | result = |
901 | wait_event_interruptible(*cf_sk->sk.sk_sleep, | 901 | wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
902 | !STATE_IS_PENDING(cf_sk)); | 902 | !STATE_IS_PENDING(cf_sk)); |
903 | 903 | ||
904 | lock_sock(&(cf_sk->sk)); | 904 | lock_sock(&(cf_sk->sk)); |
@@ -965,7 +965,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uservaddr, | |||
965 | release_sock(&cf_sk->sk); | 965 | release_sock(&cf_sk->sk); |
966 | 966 | ||
967 | result = | 967 | result = |
968 | wait_event_interruptible(*cf_sk->sk.sk_sleep, | 968 | wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
969 | !STATE_IS_PENDING(cf_sk)); | 969 | !STATE_IS_PENDING(cf_sk)); |
970 | 970 | ||
971 | lock_sock(&(cf_sk->sk)); | 971 | lock_sock(&(cf_sk->sk)); |
@@ -1107,7 +1107,7 @@ static int caif_release(struct socket *sock) | |||
1107 | * CAIF stack. | 1107 | * CAIF stack. |
1108 | */ | 1108 | */ |
1109 | if (!(sock->file->f_flags & O_NONBLOCK)) { | 1109 | if (!(sock->file->f_flags & O_NONBLOCK)) { |
1110 | res = wait_event_interruptible(*cf_sk->sk.sk_sleep, | 1110 | res = wait_event_interruptible(*sk_sleep(&cf_sk->sk), |
1111 | !STATE_IS_PENDING(cf_sk)); | 1111 | !STATE_IS_PENDING(cf_sk)); |
1112 | 1112 | ||
1113 | if (res == -ERESTARTSYS) { | 1113 | if (res == -ERESTARTSYS) { |