diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-04-17 21:35:44 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-04-17 21:35:44 +0100 |
commit | c917c1d0151667768d22fb96d083a11e3dac5f36 (patch) | |
tree | b9904286faba7f57e8c1a4da6206cc6a255a9dd3 /arch/arm/plat-s3c24xx/adc.c | |
parent | 77f4025b5e7b290f5c3cc03aa6242328694c71d4 (diff) | |
parent | 0c3ee078251b85812e585b5cf5d1635afd73f4e2 (diff) |
Merge branch 'v2630-rc2-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux
Diffstat (limited to 'arch/arm/plat-s3c24xx/adc.c')
-rw-r--r-- | arch/arm/plat-s3c24xx/adc.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c index 9a5c767e0a4..91adfa71c17 100644 --- a/arch/arm/plat-s3c24xx/adc.c +++ b/arch/arm/plat-s3c24xx/adc.c @@ -100,7 +100,7 @@ static void s3c_adc_dbgshow(struct adc_device *adc) readl(adc->regs + S3C2410_ADCDLY)); } -void s3c_adc_try(struct adc_device *adc) +static void s3c_adc_try(struct adc_device *adc) { struct s3c_adc_client *next = adc->ts_pend; @@ -190,6 +190,23 @@ EXPORT_SYMBOL_GPL(s3c_adc_register); void s3c_adc_release(struct s3c_adc_client *client) { /* We should really check that nothing is in progress. */ + if (adc_dev->cur == client) + adc_dev->cur = NULL; + if (adc_dev->ts_pend == client) + adc_dev->ts_pend = NULL; + else { + struct list_head *p, *n; + struct s3c_adc_client *tmp; + + list_for_each_safe(p, n, &adc_pending) { + tmp = list_entry(p, struct s3c_adc_client, pend); + if (tmp == client) + list_del(&tmp->pend); + } + } + + if (adc_dev->cur == NULL) + s3c_adc_try(adc_dev); kfree(client); } EXPORT_SYMBOL_GPL(s3c_adc_release); |