aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi/hpicmn.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/asihpi/hpicmn.c')
-rw-r--r--sound/pci/asihpi/hpicmn.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c
index 3e9c5c289764..b15a02e91f82 100644
--- a/sound/pci/asihpi/hpicmn.c
+++ b/sound/pci/asihpi/hpicmn.c
@@ -227,8 +227,9 @@ static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC)
227 if (info->control_type) { 227 if (info->control_type) {
228 pC->p_info[info->control_index] = info; 228 pC->p_info[info->control_index] = info;
229 cached++; 229 cached++;
230 } else /* dummy cache entry */ 230 } else { /* dummy cache entry */
231 pC->p_info[info->control_index] = NULL; 231 pC->p_info[info->control_index] = NULL;
232 }
232 233
233 byte_count += info->size_in32bit_words * 4; 234 byte_count += info->size_in32bit_words * 4;
234 235
@@ -298,7 +299,7 @@ struct pad_ofs_size {
298 unsigned int field_size; 299 unsigned int field_size;
299}; 300};
300 301
301static struct pad_ofs_size pad_desc[] = { 302static const struct pad_ofs_size pad_desc[] = {
302 HPICMN_PAD_OFS_AND_SIZE(c_channel), /* HPI_PAD_CHANNEL_NAME */ 303 HPICMN_PAD_OFS_AND_SIZE(c_channel), /* HPI_PAD_CHANNEL_NAME */
303 HPICMN_PAD_OFS_AND_SIZE(c_artist), /* HPI_PAD_ARTIST */ 304 HPICMN_PAD_OFS_AND_SIZE(c_artist), /* HPI_PAD_ARTIST */
304 HPICMN_PAD_OFS_AND_SIZE(c_title), /* HPI_PAD_TITLE */ 305 HPICMN_PAD_OFS_AND_SIZE(c_title), /* HPI_PAD_TITLE */
@@ -617,6 +618,10 @@ void hpi_cmn_control_cache_sync_to_msg(struct hpi_control_cache *p_cache,
617 } 618 }
618} 619}
619 620
621/** Allocate control cache.
622
623\return Cache pointer, or NULL if allocation fails.
624*/
620struct hpi_control_cache *hpi_alloc_control_cache(const u32 control_count, 625struct hpi_control_cache *hpi_alloc_control_cache(const u32 control_count,
621 const u32 size_in_bytes, u8 *p_dsp_control_buffer) 626 const u32 size_in_bytes, u8 *p_dsp_control_buffer)
622{ 627{
@@ -667,7 +672,6 @@ static void subsys_message(struct hpi_message *phm, struct hpi_response *phr)
667 phr->u.s.num_adapters = adapters.gw_num_adapters; 672 phr->u.s.num_adapters = adapters.gw_num_adapters;
668 break; 673 break;
669 case HPI_SUBSYS_CREATE_ADAPTER: 674 case HPI_SUBSYS_CREATE_ADAPTER:
670 case HPI_SUBSYS_DELETE_ADAPTER:
671 break; 675 break;
672 default: 676 default:
673 phr->error = HPI_ERROR_INVALID_FUNC; 677 phr->error = HPI_ERROR_INVALID_FUNC;