mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
ASoC: codecs: constify static sdw_slave_ops struct
The struct sdw_slave_ops is not modified and sdw_driver takes pointer to const, so make it a const for code safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240208105011.128294-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
565abf586f
commit
fd38b4e410
@ -314,7 +314,7 @@ static int max98363_update_status(struct sdw_slave *slave,
|
||||
return max98363_io_init(slave);
|
||||
}
|
||||
|
||||
static struct sdw_slave_ops max98363_slave_ops = {
|
||||
static const struct sdw_slave_ops max98363_slave_ops = {
|
||||
.read_prop = max98363_read_prop,
|
||||
.update_status = max98363_update_status,
|
||||
};
|
||||
|
@ -821,7 +821,7 @@ static int max98373_bus_config(struct sdw_slave *slave,
|
||||
* slave_ops: callbacks for get_clock_stop_mode, clock_stop and
|
||||
* port_prep are not defined for now
|
||||
*/
|
||||
static struct sdw_slave_ops max98373_slave_ops = {
|
||||
static const struct sdw_slave_ops max98373_slave_ops = {
|
||||
.read_prop = max98373_read_prop,
|
||||
.update_status = max98373_update_status,
|
||||
.bus_config = max98373_bus_config,
|
||||
|
@ -520,7 +520,7 @@ static const struct snd_soc_dapm_route rt1017_sdca_dapm_routes[] = {
|
||||
{ "DP2TX", NULL, "V Sense" },
|
||||
};
|
||||
|
||||
static struct sdw_slave_ops rt1017_sdca_slave_ops = {
|
||||
static const struct sdw_slave_ops rt1017_sdca_slave_ops = {
|
||||
.read_prop = rt1017_sdca_read_prop,
|
||||
.update_status = rt1017_sdca_update_status,
|
||||
};
|
||||
|
@ -944,7 +944,7 @@ static const struct dev_pm_ops rt712_sdca_dmic_pm = {
|
||||
};
|
||||
|
||||
|
||||
static struct sdw_slave_ops rt712_sdca_dmic_slave_ops = {
|
||||
static const struct sdw_slave_ops rt712_sdca_dmic_slave_ops = {
|
||||
.read_prop = rt712_sdca_dmic_read_prop,
|
||||
.update_status = rt712_sdca_dmic_update_status,
|
||||
};
|
||||
|
@ -331,7 +331,7 @@ io_error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct sdw_slave_ops rt712_sdca_slave_ops = {
|
||||
static const struct sdw_slave_ops rt712_sdca_slave_ops = {
|
||||
.read_prop = rt712_sdca_read_prop,
|
||||
.interrupt_callback = rt712_sdca_interrupt_callback,
|
||||
.update_status = rt712_sdca_update_status,
|
||||
|
@ -362,7 +362,7 @@ io_error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct sdw_slave_ops rt722_sdca_slave_ops = {
|
||||
static const struct sdw_slave_ops rt722_sdca_slave_ops = {
|
||||
.read_prop = rt722_sdca_read_prop,
|
||||
.interrupt_callback = rt722_sdca_interrupt_callback,
|
||||
.update_status = rt722_sdca_update_status,
|
||||
|
Loading…
Reference in New Issue
Block a user