Commit c77049ef authored by Stephane Pajot's avatar Stephane Pajot Committed by Greg Kroah-Hartman

Staging: comedi: fix brace coding style issue in jr3_pci.c

This is a patch to the jr3_pci.c file that fixes up a brace warning
found by the checkpatch.pl tool
Signed-off-by: default avatarStephane Pajot <pajot.stephane@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f92e8834
...@@ -193,9 +193,8 @@ static void set_transforms(volatile struct jr3_channel *channel, ...@@ -193,9 +193,8 @@ static void set_transforms(volatile struct jr3_channel *channel,
set_s16(&channel->transforms[num].link[i].link_amount, set_s16(&channel->transforms[num].link[i].link_amount,
transf.link[i].link_amount); transf.link[i].link_amount);
udelay(1); udelay(1);
if (transf.link[i].link_type == end_x_form) { if (transf.link[i].link_type == end_x_form)
break; break;
}
} }
} }
...@@ -460,9 +459,8 @@ static int jr3_download_firmware(struct comedi_device *dev, const u8 * data, ...@@ -460,9 +459,8 @@ static int jr3_download_firmware(struct comedi_device *dev, const u8 * data,
unsigned int count, addr; unsigned int count, addr;
more = more more = more
&& read_idm_word(data, size, &pos, &count); && read_idm_word(data, size, &pos, &count);
if (more && count == 0xffff) { if (more && count == 0xffff)
break; break;
}
more = more more = more
&& read_idm_word(data, size, &pos, &addr); && read_idm_word(data, size, &pos, &addr);
printk("Loading#%d %4.4x bytes at %4.4x\n", i, printk("Loading#%d %4.4x bytes at %4.4x\n", i,
...@@ -793,9 +791,8 @@ static int jr3_pci_attach(struct comedi_device *dev, ...@@ -793,9 +791,8 @@ static int jr3_pci_attach(struct comedi_device *dev,
} }
result = alloc_private(dev, sizeof(struct jr3_pci_dev_private)); result = alloc_private(dev, sizeof(struct jr3_pci_dev_private));
if (result < 0) { if (result < 0)
return -ENOMEM; return -ENOMEM;
}
card = NULL; card = NULL;
devpriv = dev->private; devpriv = dev->private;
init_timer(&devpriv->timer); init_timer(&devpriv->timer);
...@@ -851,9 +848,8 @@ static int jr3_pci_attach(struct comedi_device *dev, ...@@ -851,9 +848,8 @@ static int jr3_pci_attach(struct comedi_device *dev,
} }
result = comedi_pci_enable(card, "jr3_pci"); result = comedi_pci_enable(card, "jr3_pci");
if (result < 0) { if (result < 0)
return -EIO; return -EIO;
}
devpriv->pci_enabled = 1; devpriv->pci_enabled = 1;
devpriv->iobase = ioremap(pci_resource_start(card, 0), devpriv->iobase = ioremap(pci_resource_start(card, 0),
...@@ -922,9 +918,8 @@ static int jr3_pci_attach(struct comedi_device *dev, ...@@ -922,9 +918,8 @@ static int jr3_pci_attach(struct comedi_device *dev,
result = comedi_load_firmware(dev, "jr3pci.idm", jr3_download_firmware); result = comedi_load_firmware(dev, "jr3pci.idm", jr3_download_firmware);
printk("Firmare load %d\n", result); printk("Firmare load %d\n", result);
if (result < 0) { if (result < 0)
goto out; goto out;
}
/* /*
* TODO: use firmware to load preferred offset tables. Suggested * TODO: use firmware to load preferred offset tables. Suggested
* format: * format:
...@@ -973,21 +968,17 @@ static int jr3_pci_detach(struct comedi_device *dev) ...@@ -973,21 +968,17 @@ static int jr3_pci_detach(struct comedi_device *dev)
del_timer_sync(&devpriv->timer); del_timer_sync(&devpriv->timer);
if (dev->subdevices) { if (dev->subdevices) {
for (i = 0; i < devpriv->n_channels; i++) { for (i = 0; i < devpriv->n_channels; i++)
kfree(dev->subdevices[i].private); kfree(dev->subdevices[i].private);
}
} }
if (devpriv->iobase) { if (devpriv->iobase)
iounmap((void *)devpriv->iobase); iounmap((void *)devpriv->iobase);
} if (devpriv->pci_enabled)
if (devpriv->pci_enabled) {
comedi_pci_disable(devpriv->pci_dev); comedi_pci_disable(devpriv->pci_dev);
}
if (devpriv->pci_dev) { if (devpriv->pci_dev)
pci_dev_put(devpriv->pci_dev); pci_dev_put(devpriv->pci_dev);
}
} }
return 0; 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