Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95da2cbb authored by Banajit Goswami's avatar Banajit Goswami Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: constify snd_pcm_ops structures for MSM platforms



Check for snd_pcm_ops structures that are only stored in the ops field of a
snd_soc_platform_driver structure or passed as the third argument to
snd_pcm_set_ops.  The corresponding field or parameter is declared const,
so snd_pcm_ops structures that have this property can be declared as const
as well.
These changes are in accordance with the upstream changes
in ASoC between Linux-4.4 and Linux-4.9 versions.

Change-Id: Ib772d7fc6df0b10b0bf134d1e1436f8cfced357a
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
parent 07476f4c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3080,7 +3080,7 @@ static int msm_asoc_cpe_lsm_probe(struct snd_soc_platform *platform)
	return 0;
}

static struct snd_pcm_ops msm_cpe_lsm_ops = {
static const struct snd_pcm_ops msm_cpe_lsm_ops = {
	.open = msm_cpe_lsm_open,
	.close = msm_cpe_lsm_close,
	.ioctl = msm_cpe_lsm_ioctl,
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2014, 2017 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -29,7 +29,7 @@ static int msm_pcm_hostless_prepare(struct snd_pcm_substream *substream)
	return 0;
}

static struct snd_pcm_ops msm_pcm_hostless_ops = {
static const struct snd_pcm_ops msm_pcm_hostless_ops = {
	.prepare = msm_pcm_hostless_prepare
};

+1 −1
Original line number Diff line number Diff line
@@ -1626,7 +1626,7 @@ static int msm_compr_add_controls(struct snd_soc_pcm_runtime *rtd)
	return 0;
}

static struct snd_pcm_ops msm_compr_ops = {
static const struct snd_pcm_ops msm_compr_ops = {
	.open	   = msm_compr_open,
	.hw_params	= msm_compr_hw_params,
	.close	  = msm_compr_close,
+1 −1
Original line number Diff line number Diff line
@@ -1910,7 +1910,7 @@ static int msm_lsm_pcm_copy(struct snd_pcm_substream *substream, int ch,
	return 0;
}

static struct snd_pcm_ops msm_lsm_ops = {
static const struct snd_pcm_ops msm_lsm_ops = {
	.open           = msm_lsm_open,
	.close          = msm_lsm_close,
	.ioctl          = msm_lsm_ioctl,
+1 −1
Original line number Diff line number Diff line
@@ -838,7 +838,7 @@ static snd_pcm_uframes_t msm_afe_pointer(struct snd_pcm_substream *substream)
	return bytes_to_frames(runtime, (prtd->pcm_irq_pos));
}

static struct snd_pcm_ops msm_afe_ops = {
static const struct snd_pcm_ops msm_afe_ops = {
	.open           = msm_afe_open,
	.copy           = msm_afe_copy,
	.hw_params	= msm_afe_hw_params,
Loading