Commit 628fc9d9 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Mark Brown

ASoC: rt*: Constify static struct sdw_slave_ops

The only usage of these is to assign their address to the ops field in
the sdw_driver struct, which is a pointer to const. Make them const to
allow the compiler to put them in read-only memory.
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210224211918.39109-2-rikard.falkeborn@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e92a309b
......@@ -594,7 +594,7 @@ static int rt1308_sdw_pcm_hw_free(struct snd_pcm_substream *substream,
* slave_ops: callbacks for get_clock_stop_mode, clock_stop and
* port_prep are not defined for now
*/
static struct sdw_slave_ops rt1308_slave_ops = {
static const struct sdw_slave_ops rt1308_slave_ops = {
.read_prop = rt1308_read_prop,
.interrupt_callback = rt1308_interrupt_callback,
.update_status = rt1308_update_status,
......
......@@ -683,7 +683,7 @@ static int rt5682_interrupt_callback(struct sdw_slave *slave,
return 0;
}
static struct sdw_slave_ops rt5682_slave_ops = {
static const struct sdw_slave_ops rt5682_slave_ops = {
.read_prop = rt5682_read_prop,
.interrupt_callback = rt5682_interrupt_callback,
.update_status = rt5682_update_status,
......
......@@ -430,7 +430,7 @@ static int rt700_interrupt_callback(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 rt700_slave_ops = {
static const struct sdw_slave_ops rt700_slave_ops = {
.read_prop = rt700_read_prop,
.interrupt_callback = rt700_interrupt_callback,
.update_status = rt700_update_status,
......
......@@ -431,7 +431,7 @@ static int rt711_interrupt_callback(struct sdw_slave *slave,
return 0;
}
static struct sdw_slave_ops rt711_slave_ops = {
static const struct sdw_slave_ops rt711_slave_ops = {
.read_prop = rt711_read_prop,
.interrupt_callback = rt711_interrupt_callback,
.update_status = rt711_update_status,
......
......@@ -488,7 +488,7 @@ static int rt715_bus_config(struct sdw_slave *slave,
return 0;
}
static struct sdw_slave_ops rt715_slave_ops = {
static const struct sdw_slave_ops rt715_slave_ops = {
.read_prop = rt715_read_prop,
.update_status = rt715_update_status,
.bus_config = rt715_bus_config,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment