[PATCH 5/8] improve-style-neo1973_pm_gsm.patch
Nelson Castillo
nelsoneci at gmail.com
Thu Oct 16 19:01:04 CEST 2008
Improve style.
Signed-off-by: Nelson Castillo <nelsoneci at gmail.com>
---
0 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
index 7dd2891..8f3c25f 100644
--- a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
+++ b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
@@ -1,7 +1,7 @@
/*
- * GSM Management code for the FIC Neo1973 GSM Phone
+ * GSM Management code for the Openmoko GTA01/GTA02 GSM Phone
*
- * (C) 2007 by Openmoko Inc.
+ * (C) 2007-2008 by Openmoko Inc.
* Author: Harald Welte <laforge at openmoko.org>
* All rights reserved.
*
@@ -40,8 +40,7 @@ extern void s3c24xx_serial_console_set_silence(int);
struct gta01pm_priv {
int gpio_ngsm_en;
- int gpio_ndl_gsm;
-
+ int gpio_ndl_gsm;
struct console *con;
};
@@ -70,10 +69,14 @@ static ssize_t gsm_read(struct device *dev, struct device_attribute *attr,
if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_ON))
goto out_1;
} else if (!strcmp(attr->attr.name, "reset")) {
- if (machine_is_neo1973_gta01() && s3c2410_gpio_getpin(GTA01_GPIO_MODEM_RST))
+ if (machine_is_neo1973_gta01() &&
+ s3c2410_gpio_getpin(GTA01_GPIO_MODEM_RST)) {
goto out_1;
- else if (machine_is_neo1973_gta02() && s3c2410_gpio_getpin(GTA02_GPIO_MODEM_RST))
+ }
+ else if (machine_is_neo1973_gta02() &&
+ s3c2410_gpio_getpin(GTA02_GPIO_MODEM_RST)) {
goto out_1;
+ }
} else if (!strcmp(attr->attr.name, "download")) {
if (machine_is_neo1973_gta01()) {
if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_DNLOAD))
@@ -101,7 +104,7 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
if (on) {
if (gta01_gsm.con) {
dev_dbg(dev, "powering up GSM, thus "
- "disconnecting serial console\n");
+ "disconnecting serial console\n");
console_stop(gta01_gsm.con);
s3c24xx_serial_console_set_silence(1);
@@ -148,14 +151,16 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
console_start(gta01_gsm.con);
dev_dbg(dev, "powered down GSM, thus enabling "
- "serial console\n");
+ "serial console\n");
}
}
} else if (!strcmp(attr->attr.name, "reset")) {
- if (machine_is_neo1973_gta01())
+ if (machine_is_neo1973_gta01()) {
neo1973_gpb_setpin(GTA01_GPIO_MODEM_RST, on);
- else if (machine_is_neo1973_gta02())
+ }
+ else if (machine_is_neo1973_gta02()) {
neo1973_gpb_setpin(GTA02_GPIO_MODEM_RST, on);
+ }
} else if (!strcmp(attr->attr.name, "download")) {
if (machine_is_neo1973_gta01())
s3c2410_gpio_setpin(GTA01_GPIO_MODEM_DNLOAD, on);
@@ -245,7 +250,8 @@ static int gta01_gsm_resume(struct platform_device *pdev)
console_stop(gta01_gsm.con);
if (machine_is_neo1973_gta02())
- s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, gta01_gsm.gpio_ndl_gsm);
+ s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM,
+ gta01_gsm.gpio_ndl_gsm);
return 0;
}
@@ -313,8 +319,9 @@ static int __init gta01_gsm_probe(struct platform_device *pdev)
if (!gta01_gsm.con)
dev_warn(&pdev->dev,
"cannot find S3C24xx console driver\n");
- } else
+ } else {
gta01_gsm.con = NULL;
+ }
/* note that download initially disabled, and enforce that */
gta01_gsm.gpio_ndl_gsm = 1;
@@ -357,4 +364,4 @@ module_exit(gta01_gsm_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <laforge at openmoko.org>");
-MODULE_DESCRIPTION("FIC Neo1973 GSM Power Management");
+MODULE_DESCRIPTION("Openmoko GTA01/GTA02 GSM Power Management");
More information about the openmoko-kernel
mailing list