summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx/patches-2.6.24/1126-Remove-not-needed-ifdef-as-machine_is_-is-always-de.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
committerMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
commit614683faf8029100802db06a825648d0b6490285 (patch)
tree7401b135dc7ce24ff0175e67e0f2ce7f96296ff0 /target/linux/s3c24xx/patches-2.6.24/1126-Remove-not-needed-ifdef-as-machine_is_-is-always-de.patch
parent4a018d2445c5f249179ff82c8fffb0e3b717f738 (diff)
downloadmtk-20170518-614683faf8029100802db06a825648d0b6490285.zip
mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.gz
mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.bz2
changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko)
SVN-Revision: 13613
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.24/1126-Remove-not-needed-ifdef-as-machine_is_-is-always-de.patch')
-rw-r--r--target/linux/s3c24xx/patches-2.6.24/1126-Remove-not-needed-ifdef-as-machine_is_-is-always-de.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.24/1126-Remove-not-needed-ifdef-as-machine_is_-is-always-de.patch b/target/linux/s3c24xx/patches-2.6.24/1126-Remove-not-needed-ifdef-as-machine_is_-is-always-de.patch
new file mode 100644
index 0000000..8670c15
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.24/1126-Remove-not-needed-ifdef-as-machine_is_-is-always-de.patch
@@ -0,0 +1,61 @@
+From cab66f63cd7e36a576d3ae53fef466df4e3391d8 Mon Sep 17 00:00:00 2001
+From: Holger Freyther <zecke@openmoko.org>
+Date: Sun, 13 Apr 2008 07:25:57 +0100
+Subject: [PATCH] Remove not needed #ifdef as machine_is_ is always defined.
+ If we build a kernel without gta01/gta02 the
+ machine_is_ macro will expand to (0) and the compiler will
+ optimize the if (0) {} away.
+
+Signed-Off-By: Holger Freyther <zecke@openmoko.org>
+---
+ arch/arm/plat-s3c24xx/neo1973_pm_gsm.c | 14 ++++----------
+ 1 files changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
+index f22cad8..cde3dd8 100644
+--- a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
++++ b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
+@@ -63,16 +63,13 @@ static ssize_t gsm_read(struct device *dev, struct device_attribute *attr,
+ if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_RST))
+ goto out_1;
+ } else if (!strcmp(attr->attr.name, "download")) {
+-#ifdef CONFIG_MACH_NEO1973_GTA01
+- if (machine_is_neo1973_gta01())
++ if (machine_is_neo1973_gta01()) {
+ if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_DNLOAD))
+ goto out_1;
+-#endif
+-#ifdef CONFIG_MACH_NEO1973_GTA02
+- if (machine_is_neo1973_gta02())
++ } else if (machine_is_neo1973_gta02()) {
+ if (!s3c2410_gpio_getpin(GTA02_GPIO_nDL_GSM))
+ goto out_1;
+-#endif
++ }
+ }
+
+ return strlcpy(buf, "0\n", 3);
+@@ -140,11 +137,9 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
+ } else if (!strcmp(attr->attr.name, "reset")) {
+ s3c2410_gpio_setpin(GTA01_GPIO_MODEM_RST, on);
+ } else if (!strcmp(attr->attr.name, "download")) {
+-#ifdef CONFIG_MACH_NEO1973_GTA01
+ if (machine_is_neo1973_gta01())
+ s3c2410_gpio_setpin(GTA01_GPIO_MODEM_DNLOAD, on);
+-#endif
+-#ifdef CONFIG_MACH_NEO1973_GTA02
++
+ if (machine_is_neo1973_gta02()) {
+ /*
+ * the keyboard / buttons driver requests and enables
+@@ -168,7 +163,6 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
+ gta01_gsm.gpio_ndl_gsm = !on;
+ s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, !on);
+ }
+-#endif
+ }
+
+ return count;
+--
+1.5.6.5
+