forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/pci/asihpi/hpicmn.c
....@@ -1,20 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /******************************************************************************
23
34 AudioScience HPI driver
45 Copyright (C) 1997-2014 AudioScience Inc. <support@audioscience.com>
56
6
- This program is free software; you can redistribute it and/or modify
7
- it under the terms of version 2 of the GNU General Public License as
8
- published by the Free Software Foundation;
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU General Public License for more details.
14
-
15
- You should have received a copy of the GNU General Public License
16
- along with this program; if not, write to the Free Software
17
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
187
198 \file hpicmn.c
209
....@@ -39,10 +28,12 @@
3928 static struct hpi_adapters_list adapters;
4029
4130 /**
42
-* Given an HPI Message that was sent out and a response that was received,
43
-* validate that the response has the correct fields filled in,
44
-* i.e ObjectType, Function etc
45
-**/
31
+ * hpi_validate_response - Given an HPI Message that was sent out and
32
+ * a response that was received, validate that the response has the
33
+ * correct fields filled in, i.e ObjectType, Function etc
34
+ * @phm: message
35
+ * @phr: response
36
+ */
4637 u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr)
4738 {
4839 if (phr->type != HPI_TYPE_RESPONSE) {
....@@ -117,10 +108,11 @@
117108 }
118109
119110 /**
120
-* FindAdapter returns a pointer to the struct hpi_adapter_obj with
121
-* index wAdapterIndex in an HPI_ADAPTERS_LIST structure.
122
-*
123
-*/
111
+ * hpi_find_adapter - FindAdapter returns a pointer to the struct
112
+ * hpi_adapter_obj with index wAdapterIndex in an HPI_ADAPTERS_LIST
113
+ * structure.
114
+ * @adapter_index: value in [0, HPI_MAX_ADAPTERS[
115
+ */
124116 struct hpi_adapter_obj *hpi_find_adapter(u16 adapter_index)
125117 {
126118 struct hpi_adapter_obj *pao = NULL;
....@@ -148,10 +140,9 @@
148140 }
149141
150142 /**
151
-*
152
-* wipe an HPI_ADAPTERS_LIST structure.
153
-*
154
-**/
143
+ * wipe_adapter_list - wipe an HPI_ADAPTERS_LIST structure.
144
+ *
145
+ */
155146 static void wipe_adapter_list(void)
156147 {
157148 memset(&adapters, 0, sizeof(adapters));