From: Dongsoo Ha <[email protected]> Multiple calling adc by other device have happend over sampling. It can be TS(TouchScreen), in the issue, while the adc is approaching. This commit is preventing code for over sampling.
Signed-off-by: Dongsoo Ha <[email protected]> Signed-off-by: Huisung Kang <[email protected]> --- arch/arm/plat-samsung/adc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 33ecd0c..10b32ea 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -297,7 +297,8 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw) data1 = readl(adc->regs + S3C2410_ADCDAT1); adc_dbg(adc, "read %d: 0x%04x, 0x%04x\n", client->nr_samples, data0, data1); - client->nr_samples--; + if (client->nr_samples > 0) + client->nr_samples--; if (cpu == TYPE_ADCV1 || cpu == TYPE_ADCV11) { data0 &= 0x3ff; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
