Bring braces in line with CodingStyle
Signed-off-by: Aaron Brice <[email protected]>
---
Applies to next-20140814
drivers/staging/dgnc/dgnc_neo.c | 10 ++++------
drivers/staging/dgnc/dgnc_sysfs.c | 6 ++----
drivers/staging/dgnc/dgnc_tty.c | 38 +++++++++++---------------------------
3 files changed, 17 insertions(+), 37 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 68ff116..8fd6c2d 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1800,9 +1800,8 @@ static uint neo_get_uart_bytes_left(struct channel_t *ch)
/* Determine whether the Transmitter is empty or not */
if (!(lsr & UART_LSR_TEMT)) {
- if (ch->ch_flags & CH_TX_FIFO_EMPTY) {
+ if (ch->ch_flags & CH_TX_FIFO_EMPTY)
tasklet_schedule(&ch->ch_bd->helper_tasklet);
- }
left = 1;
} else {
ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
@@ -1927,10 +1926,9 @@ static void neo_vpd(struct dgnc_board *brd)
brd->vpd[(i*2)+1] = (a >> 8) & 0xff;
}
- if (((brd->vpd[0x08] != 0x82) /* long resource name tag */
- && (brd->vpd[0x10] != 0x82)) /* long resource name tag
(PCI-66 files)*/
- || (brd->vpd[0x7F] != 0x78)) /* small resource end tag */
- {
+ if (((brd->vpd[0x08] != 0x82) /* long resource name tag */
+ && (brd->vpd[0x10] != 0x82)) /* long resource name
tag (PCI-66 files)*/
+ || (brd->vpd[0x7F] != 0x78)) { /* small resource end
tag */
memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
} else {
/* Search for the serial number */
diff --git a/drivers/staging/dgnc/dgnc_sysfs.c
b/drivers/staging/dgnc/dgnc_sysfs.c
index 3f321bb..9fdca39 100644
--- a/drivers/staging/dgnc/dgnc_sysfs.c
+++ b/drivers/staging/dgnc/dgnc_sysfs.c
@@ -130,9 +130,8 @@ void dgnc_create_driver_sysfiles(struct pci_driver
*dgnc_driver)
rc |= driver_create_file(driverfs, &driver_attr_pollrate);
rc |= driver_create_file(driverfs, &driver_attr_pollcounter);
rc |= driver_create_file(driverfs, &driver_attr_state);
- if (rc) {
+ if (rc)
printk(KERN_ERR "DGNC: sysfs driver_create_file failed!\n");
- }
}
@@ -403,9 +402,8 @@ void dgnc_create_ports_sysfiles(struct dgnc_board *bd)
rc |= device_create_file(&(bd->pdev->dev), &dev_attr_ports_txcount);
rc |= device_create_file(&(bd->pdev->dev), &dev_attr_vpd);
rc |= device_create_file(&(bd->pdev->dev), &dev_attr_serial_number);
- if (rc) {
+ if (rc)
printk(KERN_ERR "DGNC: sysfs device_create_file failed!\n");
- }
}
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index c712b43..1485110 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -92,8 +92,7 @@ static struct digi_t dgnc_digi_init = {
* This defines a raw port at 9600 baud, 8 data bits, no parity,
* 1 stop bit.
*/
-static struct ktermios DgncDefaultTermios =
-{
+static struct ktermios DgncDefaultTermios = {
.c_iflag = (DEFAULT_IFLAGS), /* iflags */
.c_oflag = (DEFAULT_OFLAGS), /* oflags */
.c_cflag = (DEFAULT_CFLAGS), /* cflags */
@@ -895,8 +894,7 @@ void dgnc_carrier(struct channel_t *ch)
* "make pretend that carrier is there".
*/
if ((virt_carrier == 0) && ((ch->ch_flags & CH_CD) != 0) &&
- (phys_carrier == 0))
- {
+ (phys_carrier == 0)) {
/*
* When carrier drops:
@@ -1043,10 +1041,7 @@ void dgnc_check_queue_flow_control(struct channel_t *ch)
DPR_READ(("Sending stop char! Times sent:
%x\n", ch->ch_stops_sent));
}
}
- /* No FLOW */
- else {
- /* Empty... Can't do anything about the impending
overflow... */
- }
+ /* No FLOW -- Empty... Can't do anything about the impending
overflow... */
}
/*
@@ -1080,10 +1075,7 @@ void dgnc_check_queue_flow_control(struct channel_t *ch)
ch->ch_bd->bd_ops->send_start_character(ch);
DPR_READ(("Sending start char!\n"));
}
- /* No FLOW */
- else {
- /* Nothing needed. */
- }
+ /* No FLOW -- Nothing needed. */
}
}
@@ -1112,8 +1104,7 @@ void dgnc_wakeup_writes(struct channel_t *ch)
if (ch->ch_tun.un_flags & UN_ISOPEN) {
if ((ch->ch_tun.un_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- ch->ch_tun.un_tty->ldisc->ops->write_wakeup)
- {
+ ch->ch_tun.un_tty->ldisc->ops->write_wakeup) {
DGNC_UNLOCK(ch->ch_lock, lock_flags);
(ch->ch_tun.un_tty->ldisc->ops->write_wakeup)(ch->ch_tun.un_tty);
DGNC_LOCK(ch->ch_lock, lock_flags);
@@ -1154,8 +1145,7 @@ void dgnc_wakeup_writes(struct channel_t *ch)
if (ch->ch_pun.un_flags & UN_ISOPEN) {
if ((ch->ch_pun.un_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
- ch->ch_pun.un_tty->ldisc->ops->write_wakeup)
- {
+ ch->ch_pun.un_tty->ldisc->ops->write_wakeup) {
DGNC_UNLOCK(ch->ch_lock, lock_flags);
(ch->ch_pun.un_tty->ldisc->ops->write_wakeup)(ch->ch_pun.un_tty);
DGNC_LOCK(ch->ch_lock, lock_flags);
@@ -1167,11 +1157,9 @@ void dgnc_wakeup_writes(struct channel_t *ch)
* If unit is set to wait until empty, check to make sure
* the queue AND FIFO are both empty.
*/
- if (ch->ch_pun.un_flags & UN_EMPTY) {
- if ((qlen == 0) &&
(ch->ch_bd->bd_ops->get_uart_bytes_left(ch) == 0)) {
+ if (ch->ch_pun.un_flags & UN_EMPTY)
+ if ((qlen == 0) &&
(ch->ch_bd->bd_ops->get_uart_bytes_left(ch) == 0))
ch->ch_pun.un_flags &= ~(UN_EMPTY);
- }
- }
wake_up_interruptible(&ch->ch_pun.un_flags_wait);
}
@@ -1417,9 +1405,8 @@ static int dgnc_block_til_ready(struct tty_struct *tty,
struct file *file, struc
uint old_flags = 0;
int sleep_on_un_flags = 0;
- if (!tty || tty->magic != TTY_MAGIC || !file || !ch || ch->magic !=
DGNC_CHANNEL_MAGIC) {
+ if (!tty || tty->magic != TTY_MAGIC || !file || !ch || ch->magic !=
DGNC_CHANNEL_MAGIC)
return -ENXIO;
- }
un = tty->driver_data;
if (!un || un->magic != DGNC_UNIT_MAGIC)
@@ -2997,9 +2984,8 @@ static int dgnc_tty_ioctl(struct tty_struct *tty,
unsigned int cmd,
DGNC_LOCK(ch->ch_lock, lock_flags);
- if (((cmd == TCSBRK) && (!arg)) || (cmd == TCSBRKP)) {
+ if (((cmd == TCSBRK) && (!arg)) || (cmd == TCSBRKP))
ch->ch_bd->bd_ops->send_break(ch, 250);
- }
DGNC_UNLOCK(ch->ch_lock, lock_flags);
@@ -3324,10 +3310,8 @@ static int dgnc_tty_ioctl(struct tty_struct *tty,
unsigned int cmd,
events |= EV_TXB;
if ((ch->ch_flags & CH_STOP) || (ch->ch_flags & CH_FORCED_STOP))
events |= (EV_OPU | EV_OPS);
-
- if ((ch->ch_flags & CH_STOPI) || (ch->ch_flags &
CH_FORCED_STOPI)) {
+ if ((ch->ch_flags & CH_STOPI) || (ch->ch_flags &
CH_FORCED_STOPI))
events |= (EV_IPU | EV_IPS);
- }
DGNC_UNLOCK(ch->ch_lock, lock_flags);
rc = put_user(events, (unsigned int __user *) arg);
--
1.9.1
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel