From: Tero Kristo Date: Tue, 25 Sep 2012 16:05:32 +0000 (+0300) Subject: ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable X-Git-Tag: sz_161~34 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c07f62e87e36d218a4dcb164aa9cbc1f920cdd17;p=pandora-kernel.git ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable Previously the code only acquired spinlock after increasing / decreasing the usecount value, which is wrong. This leaves a small window where a task switch may occur between the check of the usecount and the actual wakeup / sleep of the domain. Fixed by moving the spinlock locking before the usecount access. Left the usecount as atomic_t if someone wants an easy access to the parameter through atomic_read. Signed-off-by: Tero Kristo Acked-by: Paul Walmsley Signed-off-by: Tony Lindgren --- Reading git-diff-tree failed