forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/soc/intel/atom/sst/sst_pvt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * sst_pvt.c - Intel SST Driver for audio engine
34 *
....@@ -7,15 +8,6 @@
78 * Dharageswari R <dharageswari.r@intel.com>
89 * KP Jeeja <jeeja.kp@intel.com>
910 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License as published by
13
- * the Free Software Foundation; version 2 of the License.
14
- *
15
- * This program is distributed in the hope that it will be useful, but
16
- * WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
- * General Public License for more details.
1911 *
2012 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2113 */
....@@ -34,7 +26,6 @@
3426 #include <asm/platform_sst_audio.h>
3527 #include "../sst-mfld-platform.h"
3628 #include "sst.h"
37
-#include "../../common/sst-dsp.h"
3829
3930 int sst_shim_write(void __iomem *addr, int offset, int value)
4031 {
....@@ -166,7 +157,7 @@
166157 {
167158 struct ipc_post *msg;
168159
169
- msg = kzalloc(sizeof(struct ipc_post), GFP_ATOMIC);
160
+ msg = kzalloc(sizeof(*msg), GFP_ATOMIC);
170161 if (!msg)
171162 return -ENOMEM;
172163 if (large) {
....@@ -196,7 +187,7 @@
196187 struct intel_sst_drv *sst_drv_ctx, struct sst_block **block,
197188 u32 msg_id, u32 drv_id)
198189 {
199
- int retval = 0;
190
+ int retval;
200191
201192 retval = sst_create_ipc_msg(arg, large);
202193 if (retval)
....@@ -206,7 +197,7 @@
206197 kfree(*arg);
207198 return -ENOMEM;
208199 }
209
- return retval;
200
+ return 0;
210201 }
211202
212203 /*
....@@ -231,9 +222,9 @@
231222 size_t mbox_data_len, const void *mbox_data, void **data,
232223 bool large, bool fill_dsp, bool sync, bool response)
233224 {
225
+ struct sst_block *block = NULL;
234226 struct ipc_post *msg = NULL;
235227 struct ipc_dsp_hdr dsp_hdr;
236
- struct sst_block *block;
237228 int ret = 0, pvt_id;
238229
239230 pvt_id = sst_assign_pvt_id(sst);