diff options
Diffstat (limited to 'sound/soc/codecs/rk817_codec.c')
-rw-r--r-- | sound/soc/codecs/rk817_codec.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/codecs/rk817_codec.c b/sound/soc/codecs/rk817_codec.c index fd3a5ba034a9..943d7d933e81 100644 --- a/sound/soc/codecs/rk817_codec.c +++ b/sound/soc/codecs/rk817_codec.c @@ -46,7 +46,8 @@ static int rk817_init(struct snd_soc_component *component) if (rk817->mic_in_differential) { snd_soc_component_update_bits(component, RK817_CODEC_AMIC_CFG0, MIC_DIFF_MASK, MIC_DIFF_EN); - }; + } + return 0; } @@ -382,7 +383,7 @@ static int rk817_digital_mute(struct snd_soc_dai *dai, int mute, int stream) SNDRV_PCM_FMTBIT_S24_LE |\ SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops rk817_dai_ops = { +static const struct snd_soc_dai_ops rk817_dai_ops = { .hw_params = rk817_hw_params, .set_fmt = rk817_set_dai_fmt, .set_sysclk = rk817_set_dai_sysclk, @@ -456,7 +457,7 @@ static const struct snd_soc_component_driver soc_codec_dev_rk817 = { static void rk817_codec_parse_dt_property(struct device *dev, struct rk817_codec_priv *rk817) { - struct device_node *node = dev->parent->of_node; + struct device_node *node; node = of_get_child_by_name(dev->parent->of_node, "codec"); if (!node) { @@ -466,6 +467,8 @@ static void rk817_codec_parse_dt_property(struct device *dev, rk817->mic_in_differential = of_property_read_bool(node, "rockchip,mic-in-differential"); + + of_node_put(node); } static int rk817_platform_probe(struct platform_device *pdev) |