MFD: pcf50633-adc: Fix potential race pcf50633_adc_sync_read
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 8 May 2010 17:19:51 +0000 (19:19 +0200)
committerLars-Peter Clausen <lars@metafoo.de>
Mon, 17 May 2010 17:59:40 +0000 (19:59 +0200)
commit501a67c8d153ad5849fc47720598fa2c4c05144b
tree1531527e773462372972e939d575532f6a201a2d
parent470379585be3e2e116e9412e114698debb02eb9e
MFD: pcf50633-adc: Fix potential race 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>
drivers/mfd/pcf50633-adc.c