diff options
author | Sergey Ryazanov <ryazanov.s.a@gmail.com> | 2021-12-07 12:21:37 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-12-08 17:58:57 -0800 |
commit | e9877d4ef856c7e8c66e942baa94dd0dde09b787 (patch) | |
tree | 3103ade131a1143804049bd601a9115645622e02 /drivers/net/wwan/iosm/iosm_ipc_trace.c | |
parent | a43a07202160c430c8ac405756b98eb55fc07774 (diff) | |
download | linux-e9877d4ef856c7e8c66e942baa94dd0dde09b787.tar.gz linux-e9877d4ef856c7e8c66e942baa94dd0dde09b787.tar.bz2 linux-e9877d4ef856c7e8c66e942baa94dd0dde09b787.zip |
net: wwan: iosm: consolidate trace port init code
Move the channel related structures initialization from
ipc_imem_channel_init() to ipc_trace_init() and call it directly. On the
one hand, this makes the trace port initialization symmetric to the
deitialization, that is, it removes the additional wrapper.
On the other hand, this change consolidates the trace port related code
into a single source file, what facilitates an upcoming disabling of
this functionality by a user choise.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Acked-by: M Chetan Kumar <m.chetan.kumar@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/wwan/iosm/iosm_ipc_trace.c')
-rw-r--r-- | drivers/net/wwan/iosm/iosm_ipc_trace.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wwan/iosm/iosm_ipc_trace.c b/drivers/net/wwan/iosm/iosm_ipc_trace.c index c5fa12599c2b..5f5cfd39bede 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_trace.c +++ b/drivers/net/wwan/iosm/iosm_ipc_trace.c @@ -132,9 +132,15 @@ static const struct file_operations ipc_trace_fops = { */ struct iosm_trace *ipc_trace_init(struct iosm_imem *ipc_imem) { - struct iosm_trace *ipc_trace = kzalloc(sizeof(*ipc_trace), GFP_KERNEL); + struct ipc_chnl_cfg chnl_cfg = { 0 }; + struct iosm_trace *ipc_trace; struct dentry *debugfs_pdev; + ipc_chnl_cfg_get(&chnl_cfg, IPC_MEM_CTRL_CHL_ID_3); + ipc_imem_channel_init(ipc_imem, IPC_CTYPE_CTRL, chnl_cfg, + IRQ_MOD_OFF); + + ipc_trace = kzalloc(sizeof(*ipc_trace), GFP_KERNEL); if (!ipc_trace) return NULL; |