diff options
| author | Manoj Prabhu B <bmanoj@codeaurora.org> | 2017-08-24 09:56:03 +0530 |
|---|---|---|
| committer | Manoj Prabhu B <bmanoj@codeaurora.org> | 2017-08-31 11:12:44 +0530 |
| commit | 47fe494283f4d7cb01f4c48451dba73a0eb97567 (patch) | |
| tree | 23914069317c875111de62a6287e03df27e217c3 | |
| parent | c9acad727898f615d8a830a9995381e50e57f2d0 (diff) | |
diag: Proper feature mask update to Glink supported peripherals
The patch re-enables updating APPS feature mask to GLINK
supported peripheral after peripheral's feature mask has been
processed and the proper transport has been updated. The patch
also corrects code indentation in buffers initialization.
CRs-Fixed: 2092758
Change-Id: Iaff5346dae833d6dbb576ca3a4a9dbdcf789a3c4
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
| -rw-r--r-- | drivers/char/diag/diagfwd_peripheral.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/char/diag/diagfwd_peripheral.c b/drivers/char/diag/diagfwd_peripheral.c index 78b8452b19b3..c70115a8c4d7 100644 --- a/drivers/char/diag/diagfwd_peripheral.c +++ b/drivers/char/diag/diagfwd_peripheral.c @@ -1049,16 +1049,7 @@ void diagfwd_close_transport(uint8_t transport, uint8_t peripheral) dest_info->buf_ptr[i] = fwd_info->buf_ptr[i]; if (!check_channel_state(dest_info->ctxt)) diagfwd_late_open(dest_info); - - /* - * Open control channel to update masks after buffers are - * initialized for peripherals that have transport other than - * GLINK. GLINK supported peripheral mask update will - * happen after glink buffers are initialized. - */ - - if (dest_info->transport != TRANSPORT_GLINK) - diagfwd_cntl_open(dest_info); + diagfwd_cntl_open(dest_info); init_fn(peripheral); mutex_unlock(&driver->diagfwd_channel_mutex[peripheral]); diagfwd_queue_read(&peripheral_info[TYPE_DATA][peripheral]); @@ -1251,15 +1242,11 @@ int diagfwd_channel_open(struct diagfwd_info *fwd_info) diagfwd_buffers_init(fwd_info); /* - * Initialize buffers for glink supported - * peripherals only. Open control channel to update - * masks after buffers are initialized. + * Initialize buffers for glink supported + * peripherals only. */ - if (fwd_info->transport == TRANSPORT_GLINK) { + if (fwd_info->transport == TRANSPORT_GLINK) diagfwd_write_buffers_init(fwd_info); - if (fwd_info->type == TYPE_CNTL) - diagfwd_cntl_open(fwd_info); - } if (fwd_info && fwd_info->c_ops && fwd_info->c_ops->open) fwd_info->c_ops->open(fwd_info); |
