mfd: arizona: Correctly report when AIF2/AIF1 is underclocked
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 20 Nov 2012 04:46:20 +0000 (13:46 +0900)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 20 Nov 2012 11:46:45 +0000 (12:46 +0100)
In the interrupt handler for an underclocked event, whilst checking for
the source of the interrupt, AIF3 was checked twice and AIF1 was not
checked. This change correctly checks the AIF1 underclocked bit and
reports the correct error messages for all cases.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/arizona-core.c

index 166254b..202bf55 100644 (file)
@@ -98,9 +98,9 @@ static irqreturn_t arizona_underclocked(int irq, void *data)
 
        if (val & ARIZONA_AIF3_UNDERCLOCKED_STS)
                dev_err(arizona->dev, "AIF3 underclocked\n");
-       if (val & ARIZONA_AIF3_UNDERCLOCKED_STS)
-               dev_err(arizona->dev, "AIF3 underclocked\n");
        if (val & ARIZONA_AIF2_UNDERCLOCKED_STS)
+               dev_err(arizona->dev, "AIF2 underclocked\n");
+       if (val & ARIZONA_AIF1_UNDERCLOCKED_STS)
                dev_err(arizona->dev, "AIF1 underclocked\n");
        if (val & ARIZONA_ISRC2_UNDERCLOCKED_STS)
                dev_err(arizona->dev, "ISRC2 underclocked\n");