From: Paul Fertser Date: Mon, 27 Jul 2009 20:58:48 +0000 (+0400) Subject: mfd: revise locking for pcf50633 ADC X-Git-Tag: v2.6.32-rc1~643^2~43 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd8ef10261d7ae92ad2b4925afd2b56f46175c47;p=pandora-kernel.git mfd: revise locking for pcf50633 ADC Current implementation is prone to races, this patch attempts to remove all but one (in pcf50633_adc_sync_read). The idea is that we need to guard the queue access only on inserting and removing items. If we insert and there're no more items in the queue it means that the last irq already happened and we need to trigger ADC manually. If not, then the next conversion will be triggered by the irq handler upon completion of the previous. Signed-off-by: Paul Fertser Signed-off-by: Samuel Ortiz --- Reading git-diff-tree failed