Commit e3bab5eb authored by Varsha Rao's avatar Varsha Rao Committed by Greg Kroah-Hartman

staging: speakup: Added spaces around arithmetic operators.

Added spaces around arithmetic operators (+, -, /), to fix the checkpatch
issue.
Signed-off-by: default avatarVarsha Rao <rvarsha016@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8190e15c
......@@ -291,7 +291,7 @@ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr,
i *= (int)cp1[-1] + 1;
i += 2; /* 0 and last map ver */
if (cp1[-3] != KEY_MAP_VER || cp1[-1] > 10 ||
i+SHIFT_TBL_SIZE+4 >= sizeof(spk_key_buf)) {
i + SHIFT_TBL_SIZE + 4 >= sizeof(spk_key_buf)) {
pr_warn("i %d %d %d %d\n", i,
(int)cp1[-3], (int)cp1[-2], (int)cp1[-1]);
kfree(in_buff);
......@@ -483,7 +483,7 @@ static ssize_t punc_show(struct kobject *kobj, struct kobj_attribute *attr,
*cp++ = (char)i;
}
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
return cp-buf;
return cp - buf;
}
/*
......@@ -574,7 +574,7 @@ ssize_t spk_var_show(struct kobject *kobj, struct kobj_attribute *attr,
*cp1++ = '"';
*cp1++ = '\n';
*cp1 = '\0';
rv = cp1-buf;
rv = cp1 - buf;
} else {
rv = sprintf(buf, "\"\"\n");
}
......
......@@ -99,7 +99,7 @@ int speakup_set_selection(struct tty_struct *tty)
sel_start = new_sel_start;
sel_end = new_sel_end;
/* Allocate a new buffer before freeing the old one ... */
bp = kmalloc((sel_end-sel_start)/2+1, GFP_ATOMIC);
bp = kmalloc((sel_end - sel_start) / 2 + 1, GFP_ATOMIC);
if (!bp) {
speakup_clear_selection();
return -ENOMEM;
......
......@@ -97,7 +97,7 @@ static irqreturn_t synth_readbuf_handler(int irq, void *dev_id)
spin_lock_irqsave(&speakup_info.spinlock, flags);
while (inb_p(speakup_info.port_tts + UART_LSR) & UART_LSR_DR) {
c = inb_p(speakup_info.port_tts+UART_RX);
c = inb_p(speakup_info.port_tts + UART_RX);
synth->read_buff_add((u_char)c);
}
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
......@@ -122,10 +122,10 @@ static void start_serial_interrupt(int irq)
/* Turn on Interrupts */
outb(UART_IER_MSI|UART_IER_RLSI|UART_IER_RDI,
speakup_info.port_tts + UART_IER);
inb(speakup_info.port_tts+UART_LSR);
inb(speakup_info.port_tts+UART_RX);
inb(speakup_info.port_tts+UART_IIR);
inb(speakup_info.port_tts+UART_MSR);
inb(speakup_info.port_tts + UART_LSR);
inb(speakup_info.port_tts + UART_RX);
inb(speakup_info.port_tts + UART_IIR);
inb(speakup_info.port_tts + UART_MSR);
outb(1, speakup_info.port_tts + UART_FCR); /* Turn FIFO On */
}
......@@ -138,7 +138,7 @@ void spk_stop_serial_interrupt(void)
return;
/* Turn off interrupts */
outb(0, speakup_info.port_tts+UART_IER);
outb(0, speakup_info.port_tts + UART_IER);
/* Free IRQ */
free_irq(serstate->irq, (void *)synth_readbuf_handler);
}
......
......@@ -233,7 +233,7 @@ static void do_catch_up(struct spk_synth *synth)
delay_time_val = delay_time->u.n.value;
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
schedule_timeout(msecs_to_jiffies(delay_time_val));
jiff_max = jiffies+jiffy_delta_val;
jiff_max = jiffies + jiffy_delta_val;
}
}
timeout = SPK_XMITR_TIMEOUT;
......@@ -260,13 +260,13 @@ static int synth_probe(struct spk_synth *synth)
speakup_info.port_tts = port_forced;
pr_info("probe forced to %x by kernel command line\n",
speakup_info.port_tts);
if (synth_request_region(speakup_info.port_tts-1,
if (synth_request_region(speakup_info.port_tts - 1,
SYNTH_IO_EXTENT)) {
pr_warn("sorry, port already reserved\n");
return -EBUSY;
}
port_val = inw(speakup_info.port_tts-1);
synth_port_control = speakup_info.port_tts-1;
port_val = inw(speakup_info.port_tts - 1);
synth_port_control = speakup_info.port_tts - 1;
} else {
for (i = 0; synth_portlist[i]; i++) {
if (synth_request_region(synth_portlist[i],
......@@ -294,7 +294,7 @@ static int synth_probe(struct spk_synth *synth)
return -ENODEV;
}
pr_info("%s: %03x-%03x, driver version %s,\n", synth->long_name,
synth_port_control, synth_port_control+SYNTH_IO_EXTENT-1,
synth_port_control, synth_port_control + SYNTH_IO_EXTENT - 1,
synth->version);
synth->alive = 1;
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment