[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120316.231047.1919840752101978309.davem@davemloft.net>
Date: Fri, 16 Mar 2012 23:10:47 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: philipp.zabel@...il.com
Cc: netdev@...r.kernel.org, eric.y.miao@...il.com,
haojian.zhuang@...vell.com, samuel@...tiz.org
Subject: Re: [PATCH] net/irda: add clk_prepare/clk_unprepare to pxaficp_ir
From: Philipp Zabel <philipp.zabel@...il.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@...il.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().
There are other ways this could have been handled as well.
But just making clk_{enable,disable}() essentially stop working
was not a very good one at all.
I'll apply this patch to net-next, but I just wanted to point out
what an absolutely brain-dead way this was handled.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists