Loading drivers/char/diag/diagchar_core.c +4 −3 Original line number Diff line number Diff line Loading @@ -3429,9 +3429,6 @@ static int __init diagchar_init(void) if (ret) goto fail; ret = diagfwd_init(); if (ret) goto fail; ret = diagfwd_bridge_init(); if (ret) goto fail; ret = diagfwd_cntl_init(); Loading Loading @@ -3464,6 +3461,9 @@ static int __init diagchar_init(void) goto fail; pr_debug("diagchar initialized now"); ret = diagfwd_bridge_init(); if (ret) diagfwd_bridge_exit(); return 0; fail: Loading @@ -3479,6 +3479,7 @@ fail: diag_masks_exit(); diag_remote_exit(); return -1; } static void diagchar_exit(void) Loading drivers/char/diag/diagfwd_mhi.c +5 −1 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ struct diag_mhi_info diag_mhi[NUM_MHI_DEV] = { .enabled = 0, .num_read = 0, .mempool = POOL_TYPE_MDM, .mempool_init = 0, .mhi_wq = NULL, .read_ch = { .chan = MHI_CLIENT_DIAG_IN, Loading @@ -68,6 +69,7 @@ struct diag_mhi_info diag_mhi[NUM_MHI_DEV] = { .enabled = 0, .num_read = 0, .mempool = POOL_TYPE_MDM_DCI, .mempool_init = 0, .mhi_wq = NULL, .read_ch = { .chan = MHI_CLIENT_DCI_IN, Loading Loading @@ -684,6 +686,7 @@ int diag_mhi_init() strlcpy(wq_name, "diag_mhi_", DIAG_MHI_STRING_SZ); strlcat(wq_name, mhi_info->name, sizeof(mhi_info->name)); diagmem_init(driver, mhi_info->mempool); mhi_info->mempool_init = 1; mhi_info->mhi_wq = create_singlethread_workqueue(wq_name); if (!mhi_info->mhi_wq) goto fail; Loading Loading @@ -725,6 +728,7 @@ void diag_mhi_exit() if (mhi_info->mhi_wq) destroy_workqueue(mhi_info->mhi_wq); mhi_close(mhi_info->id); if (mhi_info->mempool_init) diagmem_exit(driver, mhi_info->mempool); } } Loading drivers/char/diag/diagfwd_mhi.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -65,6 +65,7 @@ struct diag_mhi_info { int id; int dev_id; int mempool; int mempool_init; int num_read; uint8_t enabled; char name[DIAG_MHI_NAME_SZ]; Loading Loading
drivers/char/diag/diagchar_core.c +4 −3 Original line number Diff line number Diff line Loading @@ -3429,9 +3429,6 @@ static int __init diagchar_init(void) if (ret) goto fail; ret = diagfwd_init(); if (ret) goto fail; ret = diagfwd_bridge_init(); if (ret) goto fail; ret = diagfwd_cntl_init(); Loading Loading @@ -3464,6 +3461,9 @@ static int __init diagchar_init(void) goto fail; pr_debug("diagchar initialized now"); ret = diagfwd_bridge_init(); if (ret) diagfwd_bridge_exit(); return 0; fail: Loading @@ -3479,6 +3479,7 @@ fail: diag_masks_exit(); diag_remote_exit(); return -1; } static void diagchar_exit(void) Loading
drivers/char/diag/diagfwd_mhi.c +5 −1 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ struct diag_mhi_info diag_mhi[NUM_MHI_DEV] = { .enabled = 0, .num_read = 0, .mempool = POOL_TYPE_MDM, .mempool_init = 0, .mhi_wq = NULL, .read_ch = { .chan = MHI_CLIENT_DIAG_IN, Loading @@ -68,6 +69,7 @@ struct diag_mhi_info diag_mhi[NUM_MHI_DEV] = { .enabled = 0, .num_read = 0, .mempool = POOL_TYPE_MDM_DCI, .mempool_init = 0, .mhi_wq = NULL, .read_ch = { .chan = MHI_CLIENT_DCI_IN, Loading Loading @@ -684,6 +686,7 @@ int diag_mhi_init() strlcpy(wq_name, "diag_mhi_", DIAG_MHI_STRING_SZ); strlcat(wq_name, mhi_info->name, sizeof(mhi_info->name)); diagmem_init(driver, mhi_info->mempool); mhi_info->mempool_init = 1; mhi_info->mhi_wq = create_singlethread_workqueue(wq_name); if (!mhi_info->mhi_wq) goto fail; Loading Loading @@ -725,6 +728,7 @@ void diag_mhi_exit() if (mhi_info->mhi_wq) destroy_workqueue(mhi_info->mhi_wq); mhi_close(mhi_info->id); if (mhi_info->mempool_init) diagmem_exit(driver, mhi_info->mempool); } } Loading
drivers/char/diag/diagfwd_mhi.h +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -65,6 +65,7 @@ struct diag_mhi_info { int id; int dev_id; int mempool; int mempool_init; int num_read; uint8_t enabled; char name[DIAG_MHI_NAME_SZ]; Loading