Loading drivers/char/diag/diag_memorydevice.c +4 −2 Original line number Diff line number Diff line Loading @@ -97,6 +97,10 @@ void diag_md_close_all() for (i = 0; i < NUM_DIAG_MD_DEV; i++) { ch = &diag_md[i]; if (ch->ops && ch->ops->close) ch->ops->close(ch->ctx, DIAG_MEMORY_DEVICE_MODE); /* * When we close the Memory device mode, make sure we flush the * internal buffers in the table so that there are no stale Loading @@ -115,8 +119,6 @@ void diag_md_close_all() entry->ctx = 0; spin_unlock_irqrestore(&entry->lock, flags); } if (ch->ops && ch->ops->close) ch->ops->close(ch->ctx, DIAG_MEMORY_DEVICE_MODE); } diag_ws_reset(DIAG_WS_MUX); Loading drivers/char/diag/diagchar_core.c +13 −3 Original line number Diff line number Diff line Loading @@ -375,7 +375,6 @@ static void diag_close_logging_process(int pid) logging_proc->socket_process = NULL; if (logging_proc->callback_process) logging_proc->callback_process = NULL; logging_proc->pid = 0; if (driver->md_client_info.client_process) driver->md_client_info.client_process = NULL; diag_update_proc_vote(DIAG_PROC_MEMORY_DEVICE, VOTE_DOWN, i); Loading Loading @@ -408,14 +407,25 @@ static void diag_close_logging_process(int pid) */ for (i = 0; i < DIAG_NUM_PROC; i++) { logging_proc = &driver->md_proc[i]; if (logging_proc->pid != 0) { if ((logging_proc->callback_process) && (logging_proc->pid != pid)) { switch_flag = 0; break; } } if (switch_flag) if (switch_flag) { diag_switch_logging(USB_MODE); mutex_lock(&driver->diagchar_mutex); for (i = 0; i < DIAG_NUM_PROC; i++) { logging_proc = &driver->md_proc[i]; if (logging_proc->pid != pid) continue; logging_proc->pid = 0; } mutex_unlock(&driver->diagchar_mutex); } } static int diagchar_close(struct inode *inode, struct file *file) Loading Loading
drivers/char/diag/diag_memorydevice.c +4 −2 Original line number Diff line number Diff line Loading @@ -97,6 +97,10 @@ void diag_md_close_all() for (i = 0; i < NUM_DIAG_MD_DEV; i++) { ch = &diag_md[i]; if (ch->ops && ch->ops->close) ch->ops->close(ch->ctx, DIAG_MEMORY_DEVICE_MODE); /* * When we close the Memory device mode, make sure we flush the * internal buffers in the table so that there are no stale Loading @@ -115,8 +119,6 @@ void diag_md_close_all() entry->ctx = 0; spin_unlock_irqrestore(&entry->lock, flags); } if (ch->ops && ch->ops->close) ch->ops->close(ch->ctx, DIAG_MEMORY_DEVICE_MODE); } diag_ws_reset(DIAG_WS_MUX); Loading
drivers/char/diag/diagchar_core.c +13 −3 Original line number Diff line number Diff line Loading @@ -375,7 +375,6 @@ static void diag_close_logging_process(int pid) logging_proc->socket_process = NULL; if (logging_proc->callback_process) logging_proc->callback_process = NULL; logging_proc->pid = 0; if (driver->md_client_info.client_process) driver->md_client_info.client_process = NULL; diag_update_proc_vote(DIAG_PROC_MEMORY_DEVICE, VOTE_DOWN, i); Loading Loading @@ -408,14 +407,25 @@ static void diag_close_logging_process(int pid) */ for (i = 0; i < DIAG_NUM_PROC; i++) { logging_proc = &driver->md_proc[i]; if (logging_proc->pid != 0) { if ((logging_proc->callback_process) && (logging_proc->pid != pid)) { switch_flag = 0; break; } } if (switch_flag) if (switch_flag) { diag_switch_logging(USB_MODE); mutex_lock(&driver->diagchar_mutex); for (i = 0; i < DIAG_NUM_PROC; i++) { logging_proc = &driver->md_proc[i]; if (logging_proc->pid != pid) continue; logging_proc->pid = 0; } mutex_unlock(&driver->diagchar_mutex); } } static int diagchar_close(struct inode *inode, struct file *file) Loading