From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] I2C: add CSR SiRFprimaII on-chip I2C controllers driver
Date: Tue, 20 Dec 2011 20:07:50 +0000 [thread overview]
Message-ID: <20111220200750.GA2577@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1323852927-13521-1-git-send-email-Barry.Song@csr.com>
On Wed, Dec 14, 2011 at 04:55:27PM +0800, Barry Song wrote:
> +static int __devinit i2c_sirfsoc_probe(struct platform_device *pdev)
> +{
> + struct clk *clk;
> +
> + clk = clk_get(&pdev->dev, NULL);
> + err = clk_prepare(clk);
> + err = clk_enable(clk);
...
> + clk_disable(clk);
> +
> + dev_info(&pdev->dev, " I2C adapter ready to operate\n");
> +
> + return 0;
> +}
> +
> +static int __devexit i2c_sirfsoc_remove(struct platform_device *pdev)
> +{
> + clk_disable(siic->clk);
> + clk_unprepare(siic->clk);
> + clk_put(siic->clk);
This doesn't look right - look at the state which you leave the clk in
upon successful probe, and now look at what you do when you do a remove.
It seems that you disable an already disabled clock to me.
next prev parent reply other threads:[~2011-12-20 20:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 8:55 [PATCH v4] I2C: add CSR SiRFprimaII on-chip I2C controllers driver Barry Song
2011-12-20 13:11 ` Barry Song
2011-12-20 20:07 ` Russell King - ARM Linux [this message]
2011-12-21 3:29 ` Barry Song
2011-12-21 3:34 ` Richard Zhao
2011-12-21 3:47 ` Shawn Guo
2011-12-22 12:08 ` Barry Song
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=20111220200750.GA2577@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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).