[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170410183939.mklkocu6cemurutr@sirena.org.uk>
Date: Mon, 10 Apr 2017 19:39:39 +0100
From: Mark Brown <broonie@...nel.org>
To: John Stultz <john.stultz@...aro.org>
Cc: lkml <linux-kernel@...r.kernel.org>,
Andy Green <andy.green@...aro.org>,
Zhangfei Gao <zhangfei.gao@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, Wei Xu <xuwei5@...ilicon.com>,
Rob Herring <robh+dt@...nel.org>,
Andy Green <andy@...mcat.com>,
Dave Long <dave.long@...aro.org>,
Guodong Xu <guodong.xu@...aro.org>
Subject: Re: [PATCH 2/3 v4] ASoC: hisilicon: Add hi6210 i2s audio driver
On Fri, Mar 31, 2017 at 03:06:00PM -0700, John Stultz wrote:
Looks mostly good, a few more minor issues, please send incremental
fixes for these:
> +
> + switch (i2s->format & SND_SOC_DAIFMT_MASTER_MASK) {
> + default:
> + WARN_ONCE(1, "Invalid i2s->fmt MASTER_MASK. This shouldn't happen\n");
> + }
It should still return an error just in case.
> + switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) {
> + default:
> + WARN_ONCE(1, "Invalid i2s->fmt FORMAT_MASK. This shouldn't happen\n");
> + }
Similarly.
> + default:
> + val = hi6210_read_reg(i2s, HII2S_I2S_CFG);
> + val &= ~HII2S_I2S_CFG__S2_FRAME_MODE;
> + hi6210_write_reg(i2s, HII2S_I2S_CFG, val);
> + }
Missing break.
> + ret = snd_soc_register_component(&pdev->dev, &hi6210_i2s_i2s_comp,
> + &i2s->dai, 1);
> + if (ret) {
> + dev_err(&pdev->dev, "Failed to register dai\n");
> + return ret;
> + }
devm_snd_soc_register_component()
> +static int hi6210_i2s_remove(struct platform_device *pdev)
> +{
> + snd_soc_unregister_component(&pdev->dev);
> + dev_set_drvdata(&pdev->dev, NULL);
The core will set the driver data to NULL, though it shouldn't be
needed.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists