aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorDmitry Artamonow <mad_soft@inbox.ru>2009-03-15 14:14:27 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-15 16:08:20 -0400
commit607b067e161185d5c441aa366ff9fccd4fd676cb (patch)
tree29c7ee2c11793ba16f3c4e99fddb7d8908dff510 /arch/arm
parent104a416d80fca22284319b06eff87b6f632a3649 (diff)
[ARM] 5427/1: h3600: ipaq_model_ops final cleanup
Since now ipaq_model_ops used only for accessing h3600 EGPIOs, drop it completely and use assign_h3600_egpio() directly. Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-sa1100/h3600.c16
-rw-r--r--arch/arm/mach-sa1100/include/mach/h3600.h12
2 files changed, 5 insertions, 23 deletions
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 1fa0f58c07b0..0eb2f159578b 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -46,8 +46,8 @@
46 46
47#include "generic.h" 47#include "generic.h"
48 48
49struct ipaq_model_ops ipaq_model_ops; 49void (*assign_h3600_egpio)(enum ipaq_egpio_type x, int level);
50EXPORT_SYMBOL(ipaq_model_ops); 50EXPORT_SYMBOL(assign_h3600_egpio);
51 51
52static struct mtd_partition h3xxx_partitions[] = { 52static struct mtd_partition h3xxx_partitions[] = {
53 { 53 {
@@ -293,10 +293,6 @@ static void h3100_control_egpio(enum ipaq_egpio_type x, int setp)
293 } 293 }
294} 294}
295 295
296static struct ipaq_model_ops h3100_model_ops __initdata = {
297 .control = h3100_control_egpio,
298};
299
300#define H3100_DIRECT_EGPIO (GPIO_H3100_BT_ON \ 296#define H3100_DIRECT_EGPIO (GPIO_H3100_BT_ON \
301 | GPIO_H3100_GPIO3 \ 297 | GPIO_H3100_GPIO3 \
302 | GPIO_H3100_QMUTE \ 298 | GPIO_H3100_QMUTE \
@@ -322,7 +318,7 @@ static void __init h3100_map_io(void)
322 GAFR &= ~H3100_DIRECT_EGPIO; 318 GAFR &= ~H3100_DIRECT_EGPIO;
323 319
324 H3100_EGPIO = h3100_egpio; 320 H3100_EGPIO = h3100_egpio;
325 ipaq_model_ops = h3100_model_ops; 321 assign_h3600_egpio = h3100_control_egpio;
326} 322}
327 323
328MACHINE_START(H3100, "Compaq iPAQ H3100") 324MACHINE_START(H3100, "Compaq iPAQ H3100")
@@ -405,10 +401,6 @@ static void h3600_control_egpio(enum ipaq_egpio_type x, int setp)
405 } 401 }
406} 402}
407 403
408static struct ipaq_model_ops h3600_model_ops __initdata = {
409 .control = h3600_control_egpio,
410};
411
412static void __init h3600_map_io(void) 404static void __init h3600_map_io(void)
413{ 405{
414 h3xxx_map_io(); 406 h3xxx_map_io();
@@ -423,7 +415,7 @@ static void __init h3600_map_io(void)
423 GPIO_LDD11 | GPIO_LDD10 | GPIO_LDD9 | GPIO_LDD8; 415 GPIO_LDD11 | GPIO_LDD10 | GPIO_LDD9 | GPIO_LDD8;
424 416
425 H3600_EGPIO = h3600_egpio; /* Maintains across sleep? */ 417 H3600_EGPIO = h3600_egpio; /* Maintains across sleep? */
426 ipaq_model_ops = h3600_model_ops; 418 assign_h3600_egpio = h3600_control_egpio;
427} 419}
428 420
429MACHINE_START(H3600, "Compaq iPAQ H3600") 421MACHINE_START(H3600, "Compaq iPAQ H3600")
diff --git a/arch/arm/mach-sa1100/include/mach/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h
index 33fc4bcfd3ee..2827faa47421 100644
--- a/arch/arm/mach-sa1100/include/mach/h3600.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600.h
@@ -93,17 +93,7 @@ enum ipaq_egpio_type {
93 IPAQ_EGPIO_LCD_ENABLE, /* Enable/disable LCD controller */ 93 IPAQ_EGPIO_LCD_ENABLE, /* Enable/disable LCD controller */
94}; 94};
95 95
96struct ipaq_model_ops { 96extern void (*assign_h3600_egpio)(enum ipaq_egpio_type x, int level);
97 void (*control)(enum ipaq_egpio_type, int);
98};
99
100extern struct ipaq_model_ops ipaq_model_ops;
101
102static __inline__ void assign_h3600_egpio(enum ipaq_egpio_type x, int level)
103{
104 if (ipaq_model_ops.control)
105 ipaq_model_ops.control(x,level);
106}
107 97
108#endif /* ASSEMBLY */ 98#endif /* ASSEMBLY */
109 99