Re: [PATCH v2] spi: spi-imx: spi_imx_remove: do not disable disabled clocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 27, 2014 at 10:16:15AM +0100, Philippe De Muyter wrote:

> ------------[ cut here ]------------
> WARNING: at drivers/clk/clk.c:780 clk_disable+0x18/0x24()
> Modules linked in: spi_imx(-) [last unloaded: ev76c560]
> CPU: 1 PID: 16337 Comm: rmmod Tainted: G        W    3.10.17-80548-g90191eb-dirty #33
> [<80013b4c>] (unwind_backtrace+0x0/0xf8) from [<800115dc>] (show_stack+0x10/0x14)

Don't paste entire backtraces into commit logs unless they're adding
something, it makes the mail harder to read.  Especially don't do this
before the text explanation of the commit.

> Since commit 9e556dcc55774c9a1032f32baa0e5cfafede8b70, "spi: spi-imx: only
> enable the clocks when we start to transfer a message", clocks are always
> disabled except when transmitting messages.  There is thus no need to
> disable them at module removal.

>  	writel(0, spi_imx->base + MXC_CSPICTRL);
> -	clk_disable_unprepare(spi_imx->clk_ipg);
> -	clk_disable_unprepare(spi_imx->clk_per);
> +	clk_unprepare(spi_imx->clk_ipg);
> +	clk_unprepare(spi_imx->clk_per);
>  	spi_master_put(master);

Why is the fix for this not to convert the enable/disable done when
tranferring to be preparing as well?  The message transfer doesn't
get started in atomic context so I can't see any advantage to leaving
the clock prepared all the time but it's possible I'm missing something.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux