lkml.org 
[lkml]   [2013]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 04/22] mfd: omap-usb-tll: Clean up clock handling
On 01/16/2013 04:55 PM, Russell King - ARM Linux wrote:
> On Wed, Jan 16, 2013 at 04:43:35PM +0200, Roger Quadros wrote:
>> + spin_lock_irqsave(&tll->lock, flags);
>> +
>> + for (i = 0; i < tll->nch; i++) {
>> + char clkname[] = "usb_tll_hs_usb_chx_clk";
>> + struct clk *fck;
>> +
>> + snprintf(clkname, sizeof(clkname),
>> + "usb_tll_hs_usb_ch%d_clk", i);
>> + fck = clk_get(dev, clkname);
>
> NAK. Why are you doing this under a spinlock?
>
> clk_get() takes a mutex. You must not be in an atomic region (iow, you
> must not be holding a spinlock, and you must not have IRQs disabled)
> when you call clk_get().
>
Right. Good catch :).

--
cheers,
-roger.


\
 
 \ /
  Last update: 2013-01-16 18:21    [W:0.148 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site