浏览代码

ARM: sa11x0: assabet: clean up IrDA power setting

Minor clean up to the IrDA power setting support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King 12 年之前
父节点
当前提交
22564bde0b
共有 1 个文件被更改,包括 3 次插入6 次删除
  1. 3 6
      arch/arm/mach-sa1100/assabet.c

+ 3 - 6
arch/arm/mach-sa1100/assabet.c

@@ -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;
 }