From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC: WM8985: Register notifier for the regulator being disabled
Date: Wed, 29 Sep 2010 10:43:23 -0700 [thread overview]
Message-ID: <20100929174322.GA31934@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1285756717-27149-1-git-send-email-dp@opensource.wolfsonmicro.com>
On Wed, Sep 29, 2010 at 11:38:37AM +0100, Dimitris Papastamos wrote:
> Make sure we get an event when the regulator is disabled so we know
> we have to sync the cache afterwards.
Note that the whole callback thing is more important for things with
idle_bias_off (which might get the regulators powered down at runtime)
than for other things which don't go down to _BIAS_OFF at runtime so
would only trigger the callback on suspend anyway.
Not a problem doing the work, it'll just be unlikely to get called at
runtime.
> Minor stylistic changes.
Always split different things out into separate patches unless they
overlap with each other a lot.
> +/*
> + * We can't use the same notifier block for more than one supply and
> + * there's no way I can see to get from a callback to the caller
> + * except container_of().
> + */
Jarkko's way of doing this was a bit nicer, but both aren't great :(
> @@ -782,7 +806,7 @@ static int wm8985_set_pll(struct snd_soc_dai *dai, int pll_id,
> {
> int ret;
> struct snd_soc_codec *codec;
> - struct pll_div pll_div;
> + struct pll_div pll_div = { 0 };
>
> codec = dai->codec;
> if (freq_in && freq_out) {
It's better to restructure the code so that the compiler is able to
follow the control flow and see that there's no uninitialised access -
this sort of change will just shut up legitimate warnings as well. Some
of the other CODEC drivers (wm8400 is one) have had similar changes
which seem to do the trick.
next prev parent reply other threads:[~2010-09-29 17:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-29 10:38 [PATCH] ASoC: WM8985: Register notifier for the regulator being disabled Dimitris Papastamos
2010-09-29 17:43 ` Mark Brown [this message]
2010-09-30 9:51 ` Dimitris Papastamos
2010-09-30 16:40 ` 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=20100929174322.GA31934@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=dp@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=patches@opensource.wolfsonmicro.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.