ASoC: rockchip: i2s-tdm: Make soc_data symbol const

Change-Id: Id78f5f2d79f6345c97456e99ae107716e1a5f560
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
Sugar Zhang
2021-08-18 18:06:41 +08:00
committed by Tao Huang
parent 8b6420a3df
commit fa8be7127d

View File

@@ -78,7 +78,7 @@ struct rk_i2s_tdm_dev {
struct snd_dmaengine_dai_dma_data playback_dma_data;
struct reset_control *tx_reset;
struct reset_control *rx_reset;
struct rk_i2s_soc_data *soc_data;
const struct rk_i2s_soc_data *soc_data;
void __iomem *cru_base;
bool is_master_mode;
bool io_multiplex;
@@ -1425,21 +1425,21 @@ static const struct txrx_config rv1126_txrx_config[] = {
{ 0xff800000, 0x10260, RV1126_I2S0_CLK_TXONLY, RV1126_I2S0_CLK_RXONLY },
};
static struct rk_i2s_soc_data px30_i2s_soc_data = {
static const struct rk_i2s_soc_data px30_i2s_soc_data = {
.softrst_offset = 0x0300,
.configs = px30_txrx_config,
.config_count = ARRAY_SIZE(px30_txrx_config),
.init = common_soc_init,
};
static struct rk_i2s_soc_data rk1808_i2s_soc_data = {
static const struct rk_i2s_soc_data rk1808_i2s_soc_data = {
.softrst_offset = 0x0300,
.configs = rk1808_txrx_config,
.config_count = ARRAY_SIZE(rk1808_txrx_config),
.init = common_soc_init,
};
static struct rk_i2s_soc_data rk3308_i2s_soc_data = {
static const struct rk_i2s_soc_data rk3308_i2s_soc_data = {
.softrst_offset = 0x0400,
.grf_reg_offset = 0x0308,
.grf_shift = 5,
@@ -1448,14 +1448,14 @@ static struct rk_i2s_soc_data rk3308_i2s_soc_data = {
.init = common_soc_init,
};
static struct rk_i2s_soc_data rk3568_i2s_soc_data = {
static const struct rk_i2s_soc_data rk3568_i2s_soc_data = {
.softrst_offset = 0x0400,
.configs = rk3568_txrx_config,
.config_count = ARRAY_SIZE(rk3568_txrx_config),
.init = common_soc_init,
};
static struct rk_i2s_soc_data rv1126_i2s_soc_data = {
static const struct rk_i2s_soc_data rv1126_i2s_soc_data = {
.softrst_offset = 0x0300,
.configs = rv1126_txrx_config,
.config_count = ARRAY_SIZE(rv1126_txrx_config),
@@ -1698,7 +1698,7 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev)
return -EINVAL;
spin_lock_init(&i2s_tdm->lock);
i2s_tdm->soc_data = (struct rk_i2s_soc_data *)of_id->data;
i2s_tdm->soc_data = (const struct rk_i2s_soc_data *)of_id->data;
i2s_tdm->bclk_fs = 64;
if (!of_property_read_u32(node, "rockchip,bclk-fs", &val)) {