From 104a416d80fca22284319b06eff87b6f632a3649 Mon Sep 17 00:00:00 2001 From: Dmitry Artamonow Date: Sun, 15 Mar 2009 19:13:16 +0100 Subject: [ARM] 5426/1: h3600: remove clr_h3600_egpio/set_h3600_egpio helpers Replace all occurences with assign_h3600_egpio. Also simplify code a bit by replacing couple of if-else statements with one-line equivalents. Signed-off-by: Dmitry Artamonow Signed-off-by: Russell King --- arch/arm/mach-sa1100/h3600.c | 6 +----- arch/arm/mach-sa1100/include/mach/h3600.h | 13 ------------- 2 files changed, 1 insertion(+), 18 deletions(-) (limited to 'arch/arm/mach-sa1100') diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index 9f13f5bd57a..1fa0f58c07b 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c @@ -92,11 +92,7 @@ static int h3600_irda_set_power(struct device *dev, unsigned int state) static void h3600_irda_set_speed(struct device *dev, unsigned int speed) { - if (speed < 4000000) { - clr_h3600_egpio(IPAQ_EGPIO_IR_FSEL); - } else { - set_h3600_egpio(IPAQ_EGPIO_IR_FSEL); - } + assign_h3600_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000)); } static struct irda_platform_data h3600_irda_data = { diff --git a/arch/arm/mach-sa1100/include/mach/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h index 8e8ccfc2f46..33fc4bcfd3e 100644 --- a/arch/arm/mach-sa1100/include/mach/h3600.h +++ b/arch/arm/mach-sa1100/include/mach/h3600.h @@ -105,19 +105,6 @@ static __inline__ void assign_h3600_egpio(enum ipaq_egpio_type x, int level) ipaq_model_ops.control(x,level); } -static __inline__ void clr_h3600_egpio(enum ipaq_egpio_type x) -{ - if (ipaq_model_ops.control) - ipaq_model_ops.control(x,0); -} - -static __inline__ void set_h3600_egpio(enum ipaq_egpio_type x) -{ - if (ipaq_model_ops.control) - ipaq_model_ops.control(x,1); -} - - #endif /* ASSEMBLY */ #endif /* _INCLUDE_H3600_H_ */ -- cgit v1.2.3