[ar71xx] fix GPIO function select bit definitions (based on a patch by Jonas <jmajau...
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1113-Remove-not-needed-ifdef-as-machine_is_-is-always-de.patch
1 From 6d612224c0182f69f103cc20a7460870e5c45c0f Mon Sep 17 00:00:00 2001
2 From: Holger Freyther <zecke@openmoko.org>
3 Date: Fri, 25 Jul 2008 23:06:05 +0100
4 Subject: [PATCH] Remove not needed #ifdef as machine_is_ is always defined.
5 If we build a kernel without gta01/gta02 the
6 machine_is_ macro will expand to (0) and the compiler will
7 optimize the if (0) {} away.
8
9 Signed-Off-By: Holger Freyther <zecke@openmoko.org>
10 ---
11 arch/arm/plat-s3c24xx/neo1973_pm_gsm.c | 14 ++++----------
12 1 files changed, 4 insertions(+), 10 deletions(-)
13
14 diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
15 index f22cad8..cde3dd8 100644
16 --- a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
17 +++ b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
18 @@ -63,16 +63,13 @@ static ssize_t gsm_read(struct device *dev, struct device_attribute *attr,
19 if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_RST))
20 goto out_1;
21 } else if (!strcmp(attr->attr.name, "download")) {
22 -#ifdef CONFIG_MACH_NEO1973_GTA01
23 - if (machine_is_neo1973_gta01())
24 + if (machine_is_neo1973_gta01()) {
25 if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_DNLOAD))
26 goto out_1;
27 -#endif
28 -#ifdef CONFIG_MACH_NEO1973_GTA02
29 - if (machine_is_neo1973_gta02())
30 + } else if (machine_is_neo1973_gta02()) {
31 if (!s3c2410_gpio_getpin(GTA02_GPIO_nDL_GSM))
32 goto out_1;
33 -#endif
34 + }
35 }
36
37 return strlcpy(buf, "0\n", 3);
38 @@ -140,11 +137,9 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
39 } else if (!strcmp(attr->attr.name, "reset")) {
40 s3c2410_gpio_setpin(GTA01_GPIO_MODEM_RST, on);
41 } else if (!strcmp(attr->attr.name, "download")) {
42 -#ifdef CONFIG_MACH_NEO1973_GTA01
43 if (machine_is_neo1973_gta01())
44 s3c2410_gpio_setpin(GTA01_GPIO_MODEM_DNLOAD, on);
45 -#endif
46 -#ifdef CONFIG_MACH_NEO1973_GTA02
47 +
48 if (machine_is_neo1973_gta02()) {
49 /*
50 * the keyboard / buttons driver requests and enables
51 @@ -168,7 +163,6 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
52 gta01_gsm.gpio_ndl_gsm = !on;
53 s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, !on);
54 }
55 -#endif
56 }
57
58 return count;
59 --
60 1.5.6.3
61
This page took 0.042877 seconds and 5 git commands to generate.