]> bbs.cooldavid.org Git - net-next-2.6.git/commit
serial: replace open coded mutex with a real mutex in mrst_max3110.c
authorArjan van de Ven <arjan@linux.intel.com>
Thu, 17 Jun 2010 10:02:06 +0000 (11:02 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 20:47:39 +0000 (13:47 -0700)
commit68c16b4117cc746a91897d629b61e5f2af18c225
treef681c2966cf731a32edc0f33e072a6f4b3272e5e
parent99dd3f6b7e2ef5179f67503a401a99141708687a
serial: replace open coded mutex with a real mutex in mrst_max3110.c

The mrst_max3110.c driver uses an open coded, non atomic variable
to create exclusion between two of its worker threads. More than that,
while the main thread does a proper set-work-clear sequence,
the other thread only does a test, with the result that no actual
exclusion is happening.

this patch replaces this open coded variable with a proper mutex

in addition, the 'lock' spinlock is removed from the per adapter structure,
the lock was only ever initialized but never used

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/serial/mrst_max3110.c