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


Groups > linux.kernel > #1620607 > unrolled thread

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

Started byMark Brown <broonie@kernel.org>
First post2017-04-10 20:40 +0200
Last post2017-04-10 20:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

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

FromMark Brown <broonie@kernel.org>
Date2017-04-10 20:40 +0200
SubjectRe: [PATCH 2/3 v4] ASoC: hisilicon: Add hi6210 i2s audio driver
Message-ID<tuMoh-4s3-7@gated-at.bofh.it>

[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.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web