Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1620607

Re: [PATCH 2/3 v4] ASoC: hisilicon: Add hi6210 i2s audio driver

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3 v4] ASoC: hisilicon: Add hi6210 i2s audio driver
Date 2017-04-10 20:40 +0200
Message-ID <tuMoh-4s3-7@gated-at.bofh.it> (permalink)
References <trcU1-23j-3@gated-at.bofh.it> <trcU2-23j-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 2/3 v4] ASoC: hisilicon: Add hi6210 i2s audio driver Mark Brown <broonie@kernel.org> - 2017-04-10 20:40 +0200

csiph-web