Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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/20230124163953.345949-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
65b7b869 f337703b

+7 -7
+1 -1
sound/soc/codecs/rt1316-sdw.c
··· 584 584 * slave_ops: callbacks for get_clock_stop_mode, clock_stop and 585 585 * port_prep are not defined for now 586 586 */ 587 - static struct sdw_slave_ops rt1316_slave_ops = { 587 + static const struct sdw_slave_ops rt1316_slave_ops = { 588 588 .read_prop = rt1316_read_prop, 589 589 .update_status = rt1316_update_status, 590 590 };
+1 -1
sound/soc/codecs/rt1318-sdw.c
··· 697 697 * slave_ops: callbacks for get_clock_stop_mode, clock_stop and 698 698 * port_prep are not defined for now 699 699 */ 700 - static struct sdw_slave_ops rt1318_slave_ops = { 700 + static const struct sdw_slave_ops rt1318_slave_ops = { 701 701 .read_prop = rt1318_read_prop, 702 702 .update_status = rt1318_update_status, 703 703 };
+1 -1
sound/soc/codecs/rt711-sdca-sdw.c
··· 338 338 return ret; 339 339 } 340 340 341 - static struct sdw_slave_ops rt711_sdca_slave_ops = { 341 + static const struct sdw_slave_ops rt711_sdca_slave_ops = { 342 342 .read_prop = rt711_sdca_read_prop, 343 343 .interrupt_callback = rt711_sdca_interrupt_callback, 344 344 .update_status = rt711_sdca_update_status,
+1 -1
sound/soc/codecs/rt715-sdca-sdw.c
··· 172 172 return 0; 173 173 } 174 174 175 - static struct sdw_slave_ops rt715_sdca_slave_ops = { 175 + static const struct sdw_slave_ops rt715_sdca_slave_ops = { 176 176 .read_prop = rt715_sdca_read_prop, 177 177 .update_status = rt715_sdca_update_status, 178 178 };
+1 -1
sound/soc/codecs/wcd938x-sdw.c
··· 191 191 return IRQ_HANDLED; 192 192 } 193 193 194 - static struct sdw_slave_ops wcd9380_slave_ops = { 194 + static const struct sdw_slave_ops wcd9380_slave_ops = { 195 195 .update_status = wcd9380_update_status, 196 196 .interrupt_callback = wcd9380_interrupt_callback, 197 197 .bus_config = wcd9380_bus_config,
+1 -1
sound/soc/codecs/wsa881x.c
··· 1106 1106 return 0; 1107 1107 } 1108 1108 1109 - static struct sdw_slave_ops wsa881x_slave_ops = { 1109 + static const struct sdw_slave_ops wsa881x_slave_ops = { 1110 1110 .update_status = wsa881x_update_status, 1111 1111 .bus_config = wsa881x_bus_config, 1112 1112 .port_prep = wsa881x_port_prep,
+1 -1
sound/soc/codecs/wsa883x.c
··· 1073 1073 return 0; 1074 1074 } 1075 1075 1076 - static struct sdw_slave_ops wsa883x_slave_ops = { 1076 + static const struct sdw_slave_ops wsa883x_slave_ops = { 1077 1077 .update_status = wsa883x_update_status, 1078 1078 .port_prep = wsa883x_port_prep, 1079 1079 };