OMAP: hwmod: separate list locking and hwmod hardware locking
authorKevin Hilman <khilman@ti.com>
Tue, 21 Sep 2010 16:34:09 +0000 (10:34 -0600)
committerPaul Walmsley <paul@pwsan.com>
Tue, 21 Sep 2010 21:11:30 +0000 (15:11 -0600)
commit12b1fdb45c2594070bb36e39cd89a33547aad8fb
tree01af153ff32c155ca5a5392badf82ffcaca6bbaa
parentff4d3e186b7b92c74a4f64360f723c603193f344
OMAP: hwmod: separate list locking and hwmod hardware locking

Currently omap_hwmod_mutex is being used to protect both the list
access/modification and concurrent access to hwmod functions.  This
patch separates these two types of locking.

First, omap_hwmod_mutex is used only to protect access and
modification of omap_hwmod_list.  Also cleaned up some comments
referring to this mutex that are no longer needed.

Then, for protecting concurrent access to hwmod functions, use a
per-hwmod mutex.  This protects concurrent access to a single hwmod,
but would allow concurrent access to different hwmods.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
[paul@pwsan.com: added structure documentation; changed mutex variable
 name]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/plat-omap/include/plat/omap_hwmod.h