From: Philipp Zabel <philipp.zabel@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, eric.y.miao@gmail.com,
haojian.zhuang@marvell.com, samuel@sortiz.org
Subject: Re: [PATCH] net/irda: add clk_prepare/clk_unprepare to pxaficp_ir
Date: Sat, 17 Mar 2012 11:43:09 +0100 [thread overview]
Message-ID: <CA+gwMceyQcfs-xM6+PB79uPOBNPKJ5fER=DjDPpmdqS5OcnTXA@mail.gmail.com> (raw)
In-Reply-To: <20120316.231047.1919840752101978309.davem@davemloft.net>
On Sat, Mar 17, 2012 at 7:10 AM, David Miller <davem@davemloft.net> wrote:
> From: Philipp Zabel <philipp.zabel@gmail.com>
> Date: Thu, 15 Mar 2012 19:19:29 +0100
>
>> This patch adds clk_prepare/clk_unprepare calls to the pxaficp_ir
>> driver by using the helper functions clk_prepare_enable and
>> clk_disable_unprepare.
>>
>> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
>
> This is terrible.
>
> So the problem was that clk_enable can't be invoked from atomic
> context, because it wants to take a mutex for some implementation.
>
> Therefore an existing routine with well defined semantics,
> clk_enable(), was turned into a NOP.
>
> And this silently breaks drivers.
>
> Instead of silently breaking things, make direct
> clk_enable()/clk_disable() invocations either result in a compile
> error or a run-time BUG_ON().
I expect that anybody who turns clk_enable/clk_disable into
no-ops for their platform will be sensible enough to take care of this.
The common struct clk framework already keeps a prepare_count
variable and clk_enable does WARN_ON(clk->prepare_count == 0).
In case of PXA, it's the clk_prepare/clk_unprepare calls that are the
no-ops anyway, so thanks for applying.
regards
Philipp
prev parent reply other threads:[~2012-03-17 10:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 18:19 [PATCH] net/irda: add clk_prepare/clk_unprepare to pxaficp_ir Philipp Zabel
2012-03-17 6:10 ` David Miller
2012-03-17 10:43 ` Philipp Zabel [this message]
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='CA+gwMceyQcfs-xM6+PB79uPOBNPKJ5fER=DjDPpmdqS5OcnTXA@mail.gmail.com' \
--to=philipp.zabel@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.y.miao@gmail.com \
--cc=haojian.zhuang@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.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).