From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>, Magnus <magnus.damm@gmail.com>
Subject: Re: [PATCH 2/2] ASoC: Add FSI-DA7210 sound support for SuperH
Date: Wed, 9 Dec 2009 11:32:05 +0000 [thread overview]
Message-ID: <20091209113205.GI19851@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <u3a3kx3gu.wl%morimoto.kuninori@renesas.com>
On Wed, Dec 09, 2009 at 11:53:37AM +0900, Kuninori Morimoto wrote:
> +static int fsi_da7210_init(struct snd_soc_codec *codec)
> +{
> + return snd_soc_dai_set_fmt(&da7210_dai,
> + SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
> + SND_SOC_DAIFMT_CBM_CFM);
> +
> + /* Use this function to add machine dapm controls */
> + return 0;
> +}
The second return statement can be removed - I suspect some compiler
versions will warn about unreachable code there.
> +#define DA7210_BUS 0
> +#define DA7210_ADR (0x34 >> 1)
> +static int da7210_add_i2c_device(void)
> +{
This should be being done by the arch code rather than here, and there's
no code to remove the device on shutdown. This idiom has been used by
some drivers as part of a transition from the old style ASoC stuff where
the I2C device was registered in the CODEC to reduce cross tree issues
but it's best to avoid it for new code.
next prev parent reply other threads:[~2009-12-09 11:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 2:53 [PATCH 2/2] ASoC: Add FSI-DA7210 sound support for SuperH Kuninori Morimoto
2009-12-09 11:32 ` Mark Brown [this message]
2009-12-10 2:17 ` Kuninori Morimoto
2009-12-10 9:44 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091209113205.GI19851@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=magnus.damm@gmail.com \
--cc=morimoto.kuninori@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.