Skip to content

Commit

Permalink
[ARM] 5427/1: h3600: ipaq_model_ops final cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Artamonow authored and Russell King committed Mar 15, 2009
1 parent 104a416 commit 607b067
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
16 changes: 4 additions & 12 deletions arch/arm/mach-sa1100/h3600.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@

#include "generic.h"

struct ipaq_model_ops ipaq_model_ops;
EXPORT_SYMBOL(ipaq_model_ops);
void (*assign_h3600_egpio)(enum ipaq_egpio_type x, int level);
EXPORT_SYMBOL(assign_h3600_egpio);

static struct mtd_partition h3xxx_partitions[] = {
{
Expand Down Expand Up @@ -293,10 +293,6 @@ static void h3100_control_egpio(enum ipaq_egpio_type x, int setp)
}
}

static struct ipaq_model_ops h3100_model_ops __initdata = {
.control = h3100_control_egpio,
};

#define H3100_DIRECT_EGPIO (GPIO_H3100_BT_ON \
| GPIO_H3100_GPIO3 \
| GPIO_H3100_QMUTE \
Expand All @@ -322,7 +318,7 @@ static void __init h3100_map_io(void)
GAFR &= ~H3100_DIRECT_EGPIO;

H3100_EGPIO = h3100_egpio;
ipaq_model_ops = h3100_model_ops;
assign_h3600_egpio = h3100_control_egpio;
}

MACHINE_START(H3100, "Compaq iPAQ H3100")
Expand Down Expand Up @@ -405,10 +401,6 @@ static void h3600_control_egpio(enum ipaq_egpio_type x, int setp)
}
}

static struct ipaq_model_ops h3600_model_ops __initdata = {
.control = h3600_control_egpio,
};

static void __init h3600_map_io(void)
{
h3xxx_map_io();
Expand All @@ -423,7 +415,7 @@ static void __init h3600_map_io(void)
GPIO_LDD11 | GPIO_LDD10 | GPIO_LDD9 | GPIO_LDD8;

H3600_EGPIO = h3600_egpio; /* Maintains across sleep? */
ipaq_model_ops = h3600_model_ops;
assign_h3600_egpio = h3600_control_egpio;
}

MACHINE_START(H3600, "Compaq iPAQ H3600")
Expand Down
12 changes: 1 addition & 11 deletions arch/arm/mach-sa1100/include/mach/h3600.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,7 @@ enum ipaq_egpio_type {
IPAQ_EGPIO_LCD_ENABLE, /* Enable/disable LCD controller */
};

struct ipaq_model_ops {
void (*control)(enum ipaq_egpio_type, int);
};

extern struct ipaq_model_ops ipaq_model_ops;

static __inline__ void assign_h3600_egpio(enum ipaq_egpio_type x, int level)
{
if (ipaq_model_ops.control)
ipaq_model_ops.control(x,level);
}
extern void (*assign_h3600_egpio)(enum ipaq_egpio_type x, int level);

#endif /* ASSEMBLY */

Expand Down

0 comments on commit 607b067

Please sign in to comment.