mfd: pcf50633-adc: Fix potential race in pcf50633_adc_sync_read
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 12 May 2010 00:10:54 +0000 (02:10 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 27 May 2010 23:37:49 +0000 (01:37 +0200)
commit6438a694b670cd188c2fd2f75e0cd6b0ae21bea9
treedd53c02d505042d8ff6cedbd48f7f84a49d8878f
parent0aeee5d4f6aa9bd28373907727937b7935d0434c
mfd: pcf50633-adc: Fix potential race in pcf50633_adc_sync_read

Currently it's not guaranteed that request struct is not already freed when
reading from it. Fix this by moving synced request related fields from the
pcf50633_adc_request struct to its own struct and store it on the functions
stack.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/pcf50633-adc.c