mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
ASoC / soc/qcom: Constify APR/GPR callback response
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>: This constifies the response data used for APR/GPR callbacks.
This commit is contained in:
@@ -122,7 +122,7 @@ struct gpr_ibasic_rsp_accepted_t {
|
||||
#define APR_SVC_MAJOR_VERSION(v) ((v >> 16) & 0xFF)
|
||||
#define APR_SVC_MINOR_VERSION(v) (v & 0xFF)
|
||||
|
||||
typedef int (*gpr_port_cb) (struct gpr_resp_pkt *d, void *priv, int op);
|
||||
typedef int (*gpr_port_cb) (const struct gpr_resp_pkt *d, void *priv, int op);
|
||||
struct packet_router;
|
||||
struct pkt_router_svc {
|
||||
struct device *dev;
|
||||
@@ -155,8 +155,8 @@ struct apr_driver {
|
||||
int (*probe)(struct apr_device *sl);
|
||||
void (*remove)(struct apr_device *sl);
|
||||
int (*callback)(struct apr_device *a,
|
||||
struct apr_resp_pkt *d);
|
||||
int (*gpr_callback)(struct gpr_resp_pkt *d, void *data, int op);
|
||||
const struct apr_resp_pkt *d);
|
||||
gpr_port_cb gpr_callback;
|
||||
struct device_driver driver;
|
||||
const struct apr_device_id *id_table;
|
||||
};
|
||||
|
||||
@@ -186,11 +186,11 @@ static void q6adm_free_copp(struct kref *ref)
|
||||
kfree(c);
|
||||
}
|
||||
|
||||
static int q6adm_callback(struct apr_device *adev, struct apr_resp_pkt *data)
|
||||
static int q6adm_callback(struct apr_device *adev, const struct apr_resp_pkt *data)
|
||||
{
|
||||
struct aprv2_ibasic_rsp_result_t *result = data->payload;
|
||||
const struct aprv2_ibasic_rsp_result_t *result = data->payload;
|
||||
int port_idx, copp_idx;
|
||||
struct apr_hdr *hdr = &data->hdr;
|
||||
const struct apr_hdr *hdr = &data->hdr;
|
||||
struct q6copp *copp;
|
||||
struct q6adm *adm = dev_get_drvdata(&adev->dev);
|
||||
|
||||
|
||||
@@ -956,11 +956,11 @@ static struct q6afe_port *q6afe_find_port(struct q6afe *afe, int token)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int q6afe_callback(struct apr_device *adev, struct apr_resp_pkt *data)
|
||||
static int q6afe_callback(struct apr_device *adev, const struct apr_resp_pkt *data)
|
||||
{
|
||||
struct q6afe *afe = dev_get_drvdata(&adev->dev);
|
||||
struct aprv2_ibasic_rsp_result_t *res;
|
||||
struct apr_hdr *hdr = &data->hdr;
|
||||
const struct aprv2_ibasic_rsp_result_t *res;
|
||||
const struct apr_hdr *hdr = &data->hdr;
|
||||
struct q6afe_port *port;
|
||||
|
||||
if (!data->payload_size)
|
||||
|
||||
@@ -490,14 +490,14 @@ int q6apm_get_hw_pointer(struct q6apm_graph *graph, int dir)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(q6apm_get_hw_pointer);
|
||||
|
||||
static int graph_callback(struct gpr_resp_pkt *data, void *priv, int op)
|
||||
static int graph_callback(const struct gpr_resp_pkt *data, void *priv, int op)
|
||||
{
|
||||
struct data_cmd_rsp_rd_sh_mem_ep_data_buffer_done_v2 *rd_done;
|
||||
struct data_cmd_rsp_wr_sh_mem_ep_data_buffer_done_v2 *done;
|
||||
struct apm_cmd_rsp_shared_mem_map_regions *rsp;
|
||||
struct gpr_ibasic_rsp_result_t *result;
|
||||
const struct gpr_ibasic_rsp_result_t *result;
|
||||
struct q6apm_graph *graph = priv;
|
||||
struct gpr_hdr *hdr = &data->hdr;
|
||||
const struct gpr_hdr *hdr = &data->hdr;
|
||||
struct device *dev = graph->dev;
|
||||
uint32_t client_event;
|
||||
phys_addr_t phys;
|
||||
@@ -764,13 +764,13 @@ struct audioreach_module *q6apm_find_module_by_mid(struct q6apm_graph *graph, ui
|
||||
|
||||
}
|
||||
|
||||
static int apm_callback(struct gpr_resp_pkt *data, void *priv, int op)
|
||||
static int apm_callback(const struct gpr_resp_pkt *data, void *priv, int op)
|
||||
{
|
||||
gpr_device_t *gdev = priv;
|
||||
struct q6apm *apm = dev_get_drvdata(&gdev->dev);
|
||||
struct device *dev = &gdev->dev;
|
||||
struct gpr_ibasic_rsp_result_t *result;
|
||||
struct gpr_hdr *hdr = &data->hdr;
|
||||
const struct gpr_hdr *hdr = &data->hdr;
|
||||
|
||||
result = data->payload;
|
||||
|
||||
|
||||
@@ -597,12 +597,12 @@ int q6asm_get_hw_pointer(struct audio_client *ac, unsigned int dir)
|
||||
EXPORT_SYMBOL_GPL(q6asm_get_hw_pointer);
|
||||
|
||||
static int32_t q6asm_stream_callback(struct apr_device *adev,
|
||||
struct apr_resp_pkt *data,
|
||||
const struct apr_resp_pkt *data,
|
||||
int session_id)
|
||||
{
|
||||
struct q6asm *q6asm = dev_get_drvdata(&adev->dev);
|
||||
struct aprv2_ibasic_rsp_result_t *result;
|
||||
struct apr_hdr *hdr = &data->hdr;
|
||||
const struct aprv2_ibasic_rsp_result_t *result;
|
||||
const struct apr_hdr *hdr = &data->hdr;
|
||||
struct audio_port_data *port;
|
||||
struct audio_client *ac;
|
||||
uint32_t client_event = 0;
|
||||
@@ -742,13 +742,13 @@ done:
|
||||
}
|
||||
|
||||
static int q6asm_srvc_callback(struct apr_device *adev,
|
||||
struct apr_resp_pkt *data)
|
||||
const struct apr_resp_pkt *data)
|
||||
{
|
||||
struct q6asm *q6asm = dev_get_drvdata(&adev->dev);
|
||||
struct aprv2_ibasic_rsp_result_t *result;
|
||||
struct audio_port_data *port;
|
||||
struct audio_client *ac = NULL;
|
||||
struct apr_hdr *hdr = &data->hdr;
|
||||
const struct apr_hdr *hdr = &data->hdr;
|
||||
struct q6asm *a;
|
||||
uint32_t sid = 0;
|
||||
uint32_t dir = 0;
|
||||
|
||||
@@ -67,11 +67,11 @@ struct q6core {
|
||||
|
||||
static struct q6core *g_core;
|
||||
|
||||
static int q6core_callback(struct apr_device *adev, struct apr_resp_pkt *data)
|
||||
static int q6core_callback(struct apr_device *adev, const struct apr_resp_pkt *data)
|
||||
{
|
||||
struct q6core *core = dev_get_drvdata(&adev->dev);
|
||||
struct aprv2_ibasic_rsp_result_t *result;
|
||||
struct apr_hdr *hdr = &data->hdr;
|
||||
const struct aprv2_ibasic_rsp_result_t *result;
|
||||
const struct apr_hdr *hdr = &data->hdr;
|
||||
|
||||
result = data->payload;
|
||||
switch (hdr->opcode) {
|
||||
|
||||
@@ -175,12 +175,12 @@ int q6prm_set_lpass_clock(struct device *dev, int clk_id, int clk_attr, int clk_
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(q6prm_set_lpass_clock);
|
||||
|
||||
static int prm_callback(struct gpr_resp_pkt *data, void *priv, int op)
|
||||
static int prm_callback(const struct gpr_resp_pkt *data, void *priv, int op)
|
||||
{
|
||||
gpr_device_t *gdev = priv;
|
||||
struct q6prm *prm = dev_get_drvdata(&gdev->dev);
|
||||
struct gpr_ibasic_rsp_result_t *result;
|
||||
struct gpr_hdr *hdr = &data->hdr;
|
||||
const struct gpr_ibasic_rsp_result_t *result;
|
||||
const struct gpr_hdr *hdr = &data->hdr;
|
||||
|
||||
switch (hdr->opcode) {
|
||||
case PRM_CMD_RSP_REQUEST_HW_RSC:
|
||||
|
||||
Reference in New Issue
Block a user