ARM: sa11x0: assabet: clean up IrDA power setting
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 9 Jul 2013 09:32:30 +0000 (10:32 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 12 Dec 2013 22:59:19 +0000 (22:59 +0000)
Minor clean up to the IrDA power setting support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-sa1100/assabet.c

index fc840f6..8443a27 100644 (file)
@@ -286,12 +286,9 @@ static int assabet_irda_set_power(struct device *dev, unsigned int state)
                0
        };
 
-       if (state < 4) {
-               state = bcr_state[state];
-               ASSABET_BCR_clear(state ^ (ASSABET_BCR_IRDA_MD1|
-                                          ASSABET_BCR_IRDA_MD0));
-               ASSABET_BCR_set(state);
-       }
+       if (state < 4)
+               ASSABET_BCR_frob(ASSABET_BCR_IRDA_MD1 | ASSABET_BCR_IRDA_MD0,
+                                bcr_state[state]);
        return 0;
 }