From: Jean-Francois Moine <moinejf@free.fr>
To: Jason Cooper <jason@lakedaemon.net>, Mark Brown <broonie@kernel.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
alsa-devel@alsa-project.org,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Russell King" <rmk+kernel@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org,
"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>
Subject: [PATCH] ASoC: kirkwood: cleanup the external clock probe
Date: Mon, 21 Oct 2013 09:46:13 +0200 [thread overview]
Message-ID: <20131021094613.2a07bd79@armhf> (raw)
This patch checks the return value of the clk_prepare_enable of the
external clock and removes the test about a same internal and external
clock which would quite never occur and won't work in most cases
it would occur.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
---
This patch applies against broonie/sound for-next.
---
sound/soc/kirkwood/kirkwood-i2s.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c.old b/sound/soc/kirkwood/kirkwood-i2s.c.pat2
index d0504a2..c2433ea 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c.old
+++ b/sound/soc/kirkwood/kirkwood-i2s.c.pat2
@@ -500,14 +500,11 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
return -EPROBE_DEFER;
} else {
- if (priv->extclk == priv->clk) {
- devm_clk_put(&pdev->dev, priv->extclk);
- priv->extclk = ERR_PTR(-EINVAL);
- } else {
- dev_info(&pdev->dev, "found external clock\n");
- clk_prepare_enable(priv->extclk);
- soc_dai = &kirkwood_i2s_dai_extclk;
- }
+ dev_info(&pdev->dev, "found external clock\n");
+ ret = clk_prepare_enable(priv->extclk);
+ if (err < 0)
+ return err;
+ soc_dai = kirkwood_i2s_dai_extclk;
}
/* Some sensible defaults - this reflects the powerup values */
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next reply other threads:[~2013-10-21 7:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 7:46 Jean-Francois Moine [this message]
2013-10-21 8:06 ` [PATCH] ASoC: kirkwood: cleanup the external clock probe Russell King - ARM Linux
2013-10-21 8:28 ` Jean-Francois Moine
2013-10-21 8:52 ` Russell King - ARM Linux
2013-10-21 10:09 ` Jean-Francois Moine
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=20131021094613.2a07bd79@armhf \
--to=moinejf@free.fr \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=sebastian.hesselbarth@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=u.kleine-koenig@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).