aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ Freyensee <james_p_freyensee@linux.intel.com>2010-12-09 10:37:37 +0000
committerAlan Cox <alan@linux.intel.com>2010-12-09 10:37:37 +0000
commit548e97b2b66505b559709a984dc93e3347986a3c (patch)
tree7151e73296f782756e66f911c4e1717d653642cd
parenta6d0cb8424ac05b04b39fe5bcbe815c220cea7ab (diff)
downloadmrst-s0i3-test-548e97b2b66505b559709a984dc93e3347986a3c.tar.gz
mrst-s0i3-test-548e97b2b66505b559709a984dc93e3347986a3c.tar.xz
mrst-s0i3-test-548e97b2b66505b559709a984dc93e3347986a3c.zip
pti: checkpatch cleaned
This patch cleans up the code style-wise in preperation for mainline Linux kernel submission. Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
-rw-r--r--drivers/misc/pti.c55
1 files changed, 26 insertions, 29 deletions
diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c
index 9124fb2b24c..83dda4d64e9 100644
--- a/drivers/misc/pti.c
+++ b/drivers/misc/pti.c
@@ -169,7 +169,7 @@ static void pti_control_frame_built_and_sent(struct masterchannel *mc)
get_task_comm(comm, current);
else
strcpy(comm, "Interrupt");
-
+
/* Ensure our buffer is zero terminated */
comm[sizeof(current->comm)] = 0;
@@ -230,8 +230,7 @@ static struct masterchannel *getID(u8 *IDarray, int max_IDS, int baseID)
for (i = 0; i < max_IDS; i++)
if (IDarray[i] != 0xff)
break;
- if (i == max_IDS)
- {
+ if (i == max_IDS) {
kfree(mc);
return 0;
}
@@ -319,12 +318,10 @@ void mipi_release_masterchannel(struct masterchannel *mc)
if (master == APP_BASE_ID) {
i = channel >> 3;
drv_data->IA_App[i] &= ~(0x80>>(channel & 0x7));
- }
- else if (master == OS_BASE_ID) {
+ } else if (master == OS_BASE_ID) {
i = channel >> 3;
drv_data->IA_OS[i] &= ~(0x80>>(channel & 0x7));
- }
- else {
+ } else {
i = channel >> 3;
drv_data->IA_Modem[i] &= ~(0x80>>(channel & 0x7));
}
@@ -354,7 +351,7 @@ void mipi_pti_writedata(struct masterchannel *mc, u8 *buf, int count)
API function, thus, all parameters should
be checked for validity.
*/
- if ((mc != NULL) && (buf != NULL) && (count > 0))
+ if ((mc != NULL) && (buf != NULL) && (count > 0))
pti_write_to_aperture(mc, buf, count);
return;
}
@@ -388,14 +385,14 @@ static void __devexit pti_pci_remove(struct pci_dev *pdev)
*
* @return int : Success = 0, otherwise fail.
*
- * The main purpose of using the tty device interface is for
- * each tty port to have a unique PTI write aperture. In an
- * example use case, ttyPTI0 gets syslogd and an APP aperture
- * ID and ttyPTI1 is where the n_tracesink ldisc hooks to route
- * modem messages into PTI. Modem trace data does not have to
+ * The main purpose of using the tty device interface is for
+ * each tty port to have a unique PTI write aperture. In an
+ * example use case, ttyPTI0 gets syslogd and an APP aperture
+ * ID and ttyPTI1 is where the n_tracesink ldisc hooks to route
+ * modem messages into PTI. Modem trace data does not have to
* go to ttyPTI1, but ttyPTI0 and ttyPTI1 do need to be distinct
- * master IDs. These messages go through the PTI HW and out of
- * the handheld platform and to the Fido/Lauterbach device.
+ * master IDs. These messages go through the PTI HW and out of
+ * the handheld platform and to the Fido/Lauterbach device.
*/
static int pti_tty_driver_open(struct tty_struct *tty, struct file *filp)
{
@@ -413,14 +410,14 @@ static int pti_tty_driver_open(struct tty_struct *tty, struct file *filp)
ret = tty_port_open(&drv_data->port, tty, filp);
pti_tty_data = tty->driver_data;
- if (tty->index == PTITTY_MINOR_START)
+ if (tty->index == PTITTY_MINOR_START)
mc = mipi_request_masterchannel(0);
else
mc = mipi_request_masterchannel(2);
-
- if (mc == 0)
+
+ if (mc == 0)
return -ENXIO;
-
+
pti_tty_data->mc = mc;
return ret;
@@ -493,7 +490,7 @@ static void pti_tty_cleanup(struct tty_struct *tty)
* master, channel write ID.
* @param data: trace data to be written.
* @param len: # of byte to write.
- * @return int : # of bytes written, or error.
+ * @return int : # of bytes written, or error.
*/
int pti_tty_driver_write(struct tty_struct *tty,
const unsigned char *buf, int len)
@@ -677,14 +674,14 @@ static struct console pti_console = {
*
* @return int - Always returns 0.
*
- * Notes: The primary purpose of the PTI tty port 0 is to hook
- * the syslog daemon to it; thus this port will be open for a
- * very long time.
+ * Notes: The primary purpose of the PTI tty port 0 is to hook
+ * the syslog daemon to it; thus this port will be open for a
+ * very long time.
*/
int pti_port_activate(struct tty_port *port, struct tty_struct *tty)
{
- if (port->tty->index == PTITTY_MINOR_START)
- console_start(&pti_console);
+ if (port->tty->index == PTITTY_MINOR_START)
+ console_start(&pti_console);
return 0;
}
@@ -694,13 +691,13 @@ int pti_port_activate(struct tty_port *port, struct tty_struct *tty)
*
* @param port- The tty port number of the PTI device.
*
- * Notes: The primary purpose of the PTI tty port 0 is to hook
- * the syslog daemon to it; thus this port will be open for a
- * very long time.
+ * Notes: The primary purpose of the PTI tty port 0 is to hook
+ * the syslog daemon to it; thus this port will be open for a
+ * very long time.
*/
void pti_port_shutdown(struct tty_port *port)
{
- if (port->tty->index == PTITTY_MINOR_START)
+ if (port->tty->index == PTITTY_MINOR_START)
console_stop(&pti_console);
}