mfd: Fix jz4740_adc_set_enabled
authorAxel Lin <axel.lin@gmail.com>
Thu, 7 Oct 2010 07:51:20 +0000 (15:51 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Oct 2010 22:30:20 +0000 (00:30 +0200)
When enabled is false, clear BIT(engine) of JZ_REG_ADC_ENABLE register.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/jz4740-adc.c

index 3ad492c..9dd1b33 100644 (file)
@@ -153,7 +153,7 @@ static inline void jz4740_adc_set_enabled(struct jz4740_adc *adc, int engine,
        if (enabled)
                val |= BIT(engine);
        else
-               val &= BIT(engine);
+               val &= ~BIT(engine);
        writeb(val, adc->base + JZ_REG_ADC_ENABLE);
 
        spin_unlock_irqrestore(&adc->lock, flags);