On 22/12/2010 08:12, Linus Walleij wrote:
> 2010/12/21 Chris Ball <[email protected]>:
> 
>> Hi Linus,
>>
>> On Wed, Nov 03, 2010 at 10:22:50AM +0100, Linus Walleij wrote:
>>> +/*
>>> + *   mmc_host_clk_exit - shut down clock gating code
>>> + *   @host: host with potential clock to control
>>> + */
>>> +static inline void mmc_host_clk_exit(struct mmc_host *host)
>>> +{
>>> +     /*
>>> +      * Wait for any outstanding gate and then make sure we're
>>> +      * ungated before exiting.
>>> +      */
>>> +     if (cancel_work_sync(&host->clk_disable_work))
>>> +             mmc_host_clk_gate_delayed(host);
>>> +     if (host->clk_gated)
>>> +             mmc_host_clk_ungate(host);
>>> +     BUG_ON(host->clk_requests > 0);
>>> +}
>>
>> I just hit the BUG_ON() above, when doing "rmmod sdhci-pci" on my x86
>> laptop running today's linux-next.  There was *no* SD card inserted,
>> and hadn't been one inserted all boot.
> 
> Hm, it's a plain bug...
> 
> We make sure it's ungated the line above so clk_requests is always
> == 1.
> 
> It should be BUG_ON(host->clk_requests > 1)

Change to a WARN_ON() perhaps?

David
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to