Loading drivers/char/diag/diagfwd_smd.c +4 −2 Original line number Diff line number Diff line Loading @@ -723,8 +723,10 @@ static int diag_smd_read(void *ctxt, unsigned char *buf, int buf_len) (atomic_read(&smd_info->opened) == 0) || (smd_cur_packet_size(smd_info->hdl)) || (!atomic_read(&smd_info->diag_state))); if (err) if (err) { diagfwd_channel_read_done(smd_info->fwd_ctxt, buf, 0); return -ERESTARTSYS; } /* * In this case don't reset the buffers as there is no need to further Loading Loading @@ -761,7 +763,7 @@ static int diag_smd_read(void *ctxt, unsigned char *buf, int buf_len) while (total_recd_partial < pkt_len) { read_len = smd_read_avail(smd_info->hdl); if (!read_len) { wait_event(smd_info->read_wait_q, wait_event_interruptible(smd_info->read_wait_q, ((atomic_read(&smd_info->opened)) && smd_read_avail(smd_info->hdl))); Loading drivers/char/diag/diagfwd_socket.c +3 −1 Original line number Diff line number Diff line Loading @@ -917,8 +917,10 @@ static int diag_socket_read(void *ctxt, unsigned char *buf, int buf_len) err = wait_event_interruptible(info->read_wait_q, (info->data_ready > 0) || (!info->hdl) || (atomic_read(&info->diag_state) == 0)); if (err) if (err) { diagfwd_channel_read_done(info->fwd_ctxt, buf, 0); return -ERESTARTSYS; } /* * There is no need to continue reading over peripheral in this case. Loading Loading
drivers/char/diag/diagfwd_smd.c +4 −2 Original line number Diff line number Diff line Loading @@ -723,8 +723,10 @@ static int diag_smd_read(void *ctxt, unsigned char *buf, int buf_len) (atomic_read(&smd_info->opened) == 0) || (smd_cur_packet_size(smd_info->hdl)) || (!atomic_read(&smd_info->diag_state))); if (err) if (err) { diagfwd_channel_read_done(smd_info->fwd_ctxt, buf, 0); return -ERESTARTSYS; } /* * In this case don't reset the buffers as there is no need to further Loading Loading @@ -761,7 +763,7 @@ static int diag_smd_read(void *ctxt, unsigned char *buf, int buf_len) while (total_recd_partial < pkt_len) { read_len = smd_read_avail(smd_info->hdl); if (!read_len) { wait_event(smd_info->read_wait_q, wait_event_interruptible(smd_info->read_wait_q, ((atomic_read(&smd_info->opened)) && smd_read_avail(smd_info->hdl))); Loading
drivers/char/diag/diagfwd_socket.c +3 −1 Original line number Diff line number Diff line Loading @@ -917,8 +917,10 @@ static int diag_socket_read(void *ctxt, unsigned char *buf, int buf_len) err = wait_event_interruptible(info->read_wait_q, (info->data_ready > 0) || (!info->hdl) || (atomic_read(&info->diag_state) == 0)); if (err) if (err) { diagfwd_channel_read_done(info->fwd_ctxt, buf, 0); return -ERESTARTSYS; } /* * There is no need to continue reading over peripheral in this case. Loading