|
|
Re: [PATCH] net/irda: add clk_prepare/clk_unprepare to pxaficp_ir |
From: Philipp Zabel <philipp.zabel@xxxxxxxxx>
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@xxxxxxxxx>
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion] [Ethernet Bridging] [Linux Wireless Networking] [Linux Bluetooth Networking] [Linux Networking Users] [VLAN] [Git] [IETF Annouce] [Linux Assembly] [Security] [Bugtraq] [Photo] [Singles Social Networking] [Yosemite Information] [MIPS Linux] [ARM Linux Kernel] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Free Dating]
![]() |
![]() |