.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /****************************************************************************** |
---|
2 | 3 | |
---|
3 | 4 | AudioScience HPI driver |
---|
4 | 5 | Copyright (C) 1997-2014 AudioScience Inc. <support@audioscience.com> |
---|
5 | 6 | |
---|
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 |
---|
18 | 7 | |
---|
19 | 8 | \file hpicmn.c |
---|
20 | 9 | |
---|
.. | .. |
---|
39 | 28 | static struct hpi_adapters_list adapters; |
---|
40 | 29 | |
---|
41 | 30 | /** |
---|
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 | + */ |
---|
46 | 37 | u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr) |
---|
47 | 38 | { |
---|
48 | 39 | if (phr->type != HPI_TYPE_RESPONSE) { |
---|
.. | .. |
---|
117 | 108 | } |
---|
118 | 109 | |
---|
119 | 110 | /** |
---|
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 | + */ |
---|
124 | 116 | struct hpi_adapter_obj *hpi_find_adapter(u16 adapter_index) |
---|
125 | 117 | { |
---|
126 | 118 | struct hpi_adapter_obj *pao = NULL; |
---|
.. | .. |
---|
148 | 140 | } |
---|
149 | 141 | |
---|
150 | 142 | /** |
---|
151 | | -* |
---|
152 | | -* wipe an HPI_ADAPTERS_LIST structure. |
---|
153 | | -* |
---|
154 | | -**/ |
---|
| 143 | + * wipe_adapter_list - wipe an HPI_ADAPTERS_LIST structure. |
---|
| 144 | + * |
---|
| 145 | + */ |
---|
155 | 146 | static void wipe_adapter_list(void) |
---|
156 | 147 | { |
---|
157 | 148 | memset(&adapters, 0, sizeof(adapters)); |
---|