mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-30 01:46:30 -05:00
75 lines
2.5 KiB
Diff
75 lines
2.5 KiB
Diff
|
From b003c8d5407773d3aa28a48c9841e4c124da453d Mon Sep 17 00:00:00 2001
|
||
|
From: Banajit Goswami <bgoswami@codeaurora.org>
|
||
|
Date: Thu, 3 Nov 2016 19:18:07 -0700
|
||
|
Subject: ASoC: msm: q6dspv2: use correct variable type to store ION buff size
|
||
|
|
||
|
The size of the physical memory allocated for ION buffers
|
||
|
are of type size_t. Change updates the type of variables
|
||
|
sent to ION drivers to size_t to avoid any mismatch.
|
||
|
|
||
|
Change-Id: I3d33ed922b979652c64027e6f1c6f0a8ed4850a3
|
||
|
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
|
||
|
---
|
||
|
sound/soc/msm/qdsp6v2/q6asm.c | 10 ++++++----
|
||
|
sound/soc/msm/qdsp6v2/q6voice.h | 2 +-
|
||
|
2 files changed, 7 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c
|
||
|
index 0ea94cb..ea57cda 100644
|
||
|
--- a/sound/soc/msm/qdsp6v2/q6asm.c
|
||
|
+++ b/sound/soc/msm/qdsp6v2/q6asm.c
|
||
|
@@ -3013,7 +3013,8 @@ int q6asm_set_shared_circ_buff(struct audio_client *ac,
|
||
|
int dir)
|
||
|
{
|
||
|
struct audio_buffer *buf_circ;
|
||
|
- int bytes_to_alloc, rc, len;
|
||
|
+ int bytes_to_alloc, rc;
|
||
|
+ size_t len;
|
||
|
|
||
|
buf_circ = kzalloc(sizeof(struct audio_buffer), GFP_KERNEL);
|
||
|
|
||
|
@@ -3032,7 +3033,7 @@ int q6asm_set_shared_circ_buff(struct audio_client *ac,
|
||
|
rc = msm_audio_ion_alloc("audio_client", &buf_circ->client,
|
||
|
&buf_circ->handle, bytes_to_alloc,
|
||
|
(ion_phys_addr_t *)&buf_circ->phys,
|
||
|
- (size_t *)&len, &buf_circ->data);
|
||
|
+ &len, &buf_circ->data);
|
||
|
|
||
|
if (rc) {
|
||
|
pr_err("%s: Audio ION alloc is failed, rc = %d\n", __func__,
|
||
|
@@ -3074,7 +3075,8 @@ int q6asm_set_shared_pos_buff(struct audio_client *ac,
|
||
|
int dir)
|
||
|
{
|
||
|
struct audio_buffer *buf_pos = &ac->shared_pos_buf;
|
||
|
- int len, rc;
|
||
|
+ int rc;
|
||
|
+ size_t len;
|
||
|
int bytes_to_alloc = sizeof(struct asm_shared_position_buffer);
|
||
|
|
||
|
mutex_lock(&ac->cmd_lock);
|
||
|
@@ -3083,7 +3085,7 @@ int q6asm_set_shared_pos_buff(struct audio_client *ac,
|
||
|
|
||
|
rc = msm_audio_ion_alloc("audio_client", &buf_pos->client,
|
||
|
&buf_pos->handle, bytes_to_alloc,
|
||
|
- (ion_phys_addr_t *)&buf_pos->phys, (size_t *)&len,
|
||
|
+ (ion_phys_addr_t *)&buf_pos->phys, &len,
|
||
|
&buf_pos->data);
|
||
|
|
||
|
if (rc) {
|
||
|
diff --git a/sound/soc/msm/qdsp6v2/q6voice.h b/sound/soc/msm/qdsp6v2/q6voice.h
|
||
|
index 3b3e728..834fe7c 100644
|
||
|
--- a/sound/soc/msm/qdsp6v2/q6voice.h
|
||
|
+++ b/sound/soc/msm/qdsp6v2/q6voice.h
|
||
|
@@ -142,7 +142,7 @@ struct share_mem_buf {
|
||
|
struct mem_map_table {
|
||
|
dma_addr_t phys;
|
||
|
void *data;
|
||
|
- uint32_t size; /* size of buffer */
|
||
|
+ size_t size; /* size of buffer */
|
||
|
struct ion_handle *handle;
|
||
|
struct ion_client *client;
|
||
|
};
|
||
|
--
|
||
|
cgit v1.1
|
||
|
|