Commit 629c7349 authored by Ioana Ciornei's avatar Ioana Ciornei Committed by Greg Kroah-Hartman

staging: dgap: properly indent to match open paranthesis

Indent parameters and arguments passed to function calls to match
open paranthesis
Signed-off-by: default avatarIoana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fb795c68
...@@ -931,8 +931,8 @@ static int dgap_parsefile(char **in) ...@@ -931,8 +931,8 @@ static int dgap_parsefile(char **in)
brd->u.board.conc1++; brd->u.board.conc1++;
conc_type = dgap_gettok(in); conc_type = dgap_gettok(in);
if (conc_type == 0 || (conc_type != CX && if (conc_type == 0 ||
conc_type != EPC)) { (conc_type != CX && conc_type != EPC)) {
pr_err("failed to set a type of concentratros"); pr_err("failed to set a type of concentratros");
return -1; return -1;
} }
...@@ -972,8 +972,8 @@ static int dgap_parsefile(char **in) ...@@ -972,8 +972,8 @@ static int dgap_parsefile(char **in)
brd->u.board.module1++; brd->u.board.module1++;
module_type = dgap_gettok(in); module_type = dgap_gettok(in);
if (module_type == 0 || (module_type != PORTS && if (module_type == 0 ||
module_type != MODEM)) { (module_type != PORTS && module_type != MODEM)) {
pr_err("failed to set a type of module"); pr_err("failed to set a type of module");
return -1; return -1;
} }
...@@ -1351,8 +1351,7 @@ static int dgap_remap(struct board_t *brd) ...@@ -1351,8 +1351,7 @@ static int dgap_remap(struct board_t *brd)
if (!request_mem_region(brd->membase, 0x200000, "dgap")) if (!request_mem_region(brd->membase, 0x200000, "dgap"))
return -ENOMEM; return -ENOMEM;
if (!request_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000, if (!request_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000, "dgap"))
"dgap"))
goto err_req_mem; goto err_req_mem;
brd->re_map_membase = ioremap(brd->membase, 0x200000); brd->re_map_membase = ioremap(brd->membase, 0x200000);
...@@ -1390,7 +1389,7 @@ static void dgap_unmap(struct board_t *brd) ...@@ -1390,7 +1389,7 @@ static void dgap_unmap(struct board_t *brd)
* the Linux line discipline way. * the Linux line discipline way.
*/ */
static void dgap_parity_scan(struct channel_t *ch, unsigned char *cbuf, static void dgap_parity_scan(struct channel_t *ch, unsigned char *cbuf,
unsigned char *fbuf, int *len) unsigned char *fbuf, int *len)
{ {
int l = *len; int l = *len;
int count = 0; int count = 0;
...@@ -1649,7 +1648,7 @@ static void dgap_input(struct channel_t *ch) ...@@ -1649,7 +1648,7 @@ static void dgap_input(struct channel_t *ch)
len = tty_buffer_request_room(tp->port, len); len = tty_buffer_request_room(tp->port, len);
tty_insert_flip_string_flags(tp->port, ch->ch_bd->flipbuf, tty_insert_flip_string_flags(tp->port, ch->ch_bd->flipbuf,
ch->ch_bd->flipflagbuf, len); ch->ch_bd->flipflagbuf, len);
} else { } else {
len = tty_buffer_request_room(tp->port, len); len = tty_buffer_request_room(tp->port, len);
tty_insert_flip_string(tp->port, ch->ch_bd->flipbuf, len); tty_insert_flip_string(tp->port, ch->ch_bd->flipbuf, len);
...@@ -2161,7 +2160,7 @@ static struct board_t *dgap_found_board(struct pci_dev *pdev, int id, ...@@ -2161,7 +2160,7 @@ static struct board_t *dgap_found_board(struct pci_dev *pdev, int id,
/* init our poll helper tasklet */ /* init our poll helper tasklet */
tasklet_init(&brd->helper_tasklet, dgap_poll_tasklet, tasklet_init(&brd->helper_tasklet, dgap_poll_tasklet,
(unsigned long) brd); (unsigned long)brd);
ret = dgap_remap(brd); ret = dgap_remap(brd);
if (ret) if (ret)
...@@ -2342,7 +2341,7 @@ static void dgap_poll_handler(ulong dummy) ...@@ -2342,7 +2341,7 @@ static void dgap_poll_handler(ulong dummy)
* *
*=======================================================================*/ *=======================================================================*/
static void dgap_cmdb(struct channel_t *ch, u8 cmd, u8 byte1, static void dgap_cmdb(struct channel_t *ch, u8 cmd, u8 byte1,
u8 byte2, uint ncmds) u8 byte2, uint ncmds)
{ {
char __iomem *vaddr; char __iomem *vaddr;
struct __iomem cm_t *cm_addr; struct __iomem cm_t *cm_addr;
...@@ -3011,7 +3010,7 @@ static int dgap_block_til_ready(struct tty_struct *tty, struct file *file, ...@@ -3011,7 +3010,7 @@ static int dgap_block_til_ready(struct tty_struct *tty, struct file *file,
int sleep_on_un_flags; int sleep_on_un_flags;
if (!tty || tty->magic != TTY_MAGIC || !file || !ch || if (!tty || tty->magic != TTY_MAGIC || !file || !ch ||
ch->magic != DGAP_CHANNEL_MAGIC) ch->magic != DGAP_CHANNEL_MAGIC)
return -EIO; return -EIO;
un = tty->driver_data; un = tty->driver_data;
...@@ -3509,7 +3508,7 @@ static int dgap_tty_write_room(struct tty_struct *tty) ...@@ -3509,7 +3508,7 @@ static int dgap_tty_write_room(struct tty_struct *tty)
* In here exists all the Transparent Print magic as well. * In here exists all the Transparent Print magic as well.
*/ */
static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf, static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf,
int count) int count)
{ {
struct channel_t *ch; struct channel_t *ch;
struct un_t *un; struct un_t *un;
...@@ -3575,7 +3574,7 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf, ...@@ -3575,7 +3574,7 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf,
*/ */
if ((un->un_type == DGAP_PRINT) && !(ch->ch_flags & CH_PRON)) { if ((un->un_type == DGAP_PRINT) && !(ch->ch_flags & CH_PRON)) {
dgap_wmove(ch, ch->ch_digi.digi_onstr, dgap_wmove(ch, ch->ch_digi.digi_onstr,
(int) ch->ch_digi.digi_onlen); (int)ch->ch_digi.digi_onlen);
head = readw(&(bs->tx_head)) & tmask; head = readw(&(bs->tx_head)) & tmask;
ch->ch_flags |= CH_PRON; ch->ch_flags |= CH_PRON;
} }
...@@ -3586,7 +3585,7 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf, ...@@ -3586,7 +3585,7 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf,
*/ */
if ((un->un_type != DGAP_PRINT) && (ch->ch_flags & CH_PRON)) { if ((un->un_type != DGAP_PRINT) && (ch->ch_flags & CH_PRON)) {
dgap_wmove(ch, ch->ch_digi.digi_offstr, dgap_wmove(ch, ch->ch_digi.digi_offstr,
(int) ch->ch_digi.digi_offlen); (int)ch->ch_digi.digi_offlen);
head = readw(&(bs->tx_head)) & tmask; head = readw(&(bs->tx_head)) & tmask;
ch->ch_flags &= ~CH_PRON; ch->ch_flags &= ~CH_PRON;
} }
...@@ -3644,7 +3643,7 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf, ...@@ -3644,7 +3643,7 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf,
writeb(1, &(bs->iempty)); writeb(1, &(bs->iempty));
} else { } else {
dgap_wmove(ch, ch->ch_digi.digi_offstr, dgap_wmove(ch, ch->ch_digi.digi_offstr,
(int) ch->ch_digi.digi_offlen); (int)ch->ch_digi.digi_offlen);
head = readw(&(bs->tx_head)) & tmask; head = readw(&(bs->tx_head)) & tmask;
ch->ch_flags &= ~CH_PRON; ch->ch_flags &= ~CH_PRON;
} }
...@@ -3731,7 +3730,7 @@ static int dgap_tty_tiocmget(struct tty_struct *tty) ...@@ -3731,7 +3730,7 @@ static int dgap_tty_tiocmget(struct tty_struct *tty)
* Set modem signals, called by ld. * Set modem signals, called by ld.
*/ */
static int dgap_tty_tiocmset(struct tty_struct *tty, static int dgap_tty_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear) unsigned int set, unsigned int clear)
{ {
struct board_t *bd; struct board_t *bd;
struct channel_t *ch; struct channel_t *ch;
...@@ -4222,7 +4221,7 @@ static int dgap_tty_digisetcustombaud(struct channel_t *ch, struct board_t *bd, ...@@ -4222,7 +4221,7 @@ static int dgap_tty_digisetcustombaud(struct channel_t *ch, struct board_t *bd,
* dgap_set_termios() * dgap_set_termios()
*/ */
static void dgap_tty_set_termios(struct tty_struct *tty, static void dgap_tty_set_termios(struct tty_struct *tty,
struct ktermios *old_termios) struct ktermios *old_termios)
{ {
struct board_t *bd; struct board_t *bd;
struct channel_t *ch; struct channel_t *ch;
...@@ -4385,7 +4384,7 @@ static int dgap_tty_open(struct tty_struct *tty, struct file *file) ...@@ -4385,7 +4384,7 @@ static int dgap_tty_open(struct tty_struct *tty, struct file *file)
* sleep waiting for it to happen or they cancel the open. * sleep waiting for it to happen or they cancel the open.
*/ */
rc = wait_event_interruptible(brd->state_wait, rc = wait_event_interruptible(brd->state_wait,
(brd->state & BOARD_READY)); (brd->state & BOARD_READY));
if (rc) if (rc)
return rc; return rc;
...@@ -4597,7 +4596,7 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file) ...@@ -4597,7 +4596,7 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file)
* have been dropped for modems to see it. * have been dropped for modems to see it.
*/ */
spin_unlock_irqrestore(&ch->ch_lock, spin_unlock_irqrestore(&ch->ch_lock,
lock_flags); lock_flags);
/* .25 second delay for dropping RTS/DTR */ /* .25 second delay for dropping RTS/DTR */
schedule_timeout_interruptible(msecs_to_jiffies(250)); schedule_timeout_interruptible(msecs_to_jiffies(250));
...@@ -4615,7 +4614,7 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file) ...@@ -4615,7 +4614,7 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file)
*/ */
if ((un->un_type == DGAP_PRINT) && (ch->ch_flags & CH_PRON)) { if ((un->un_type == DGAP_PRINT) && (ch->ch_flags & CH_PRON)) {
dgap_wmove(ch, ch->ch_digi.digi_offstr, dgap_wmove(ch, ch->ch_digi.digi_offstr,
(int) ch->ch_digi.digi_offlen); (int)ch->ch_digi.digi_offlen);
ch->ch_flags &= ~CH_PRON; ch->ch_flags &= ~CH_PRON;
} }
...@@ -4750,7 +4749,7 @@ static void dgap_tty_flush_chars(struct tty_struct *tty) ...@@ -4750,7 +4749,7 @@ static void dgap_tty_flush_chars(struct tty_struct *tty)
* The usual assortment of ioctl's * The usual assortment of ioctl's
*/ */
static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
unsigned long arg) unsigned long arg)
{ {
struct board_t *bd; struct board_t *bd;
struct channel_t *ch; struct channel_t *ch;
...@@ -5996,7 +5995,7 @@ static int dgap_test_bios(struct board_t *brd) ...@@ -5996,7 +5995,7 @@ static int dgap_test_bios(struct board_t *brd)
err1 = readw(addr + SEQUENCE); err1 = readw(addr + SEQUENCE);
err2 = readw(addr + ERROR); err2 = readw(addr + ERROR);
dev_warn(&brd->pdev->dev, "%s failed diagnostics. Error #(%x,%x).\n", dev_warn(&brd->pdev->dev, "%s failed diagnostics. Error #(%x,%x).\n",
brd->name, err1, err2); brd->name, err1, err2);
brd->state = BOARD_FAILED; brd->state = BOARD_FAILED;
brd->dpastatus = BD_NOBIOS; brd->dpastatus = BD_NOBIOS;
...@@ -6531,7 +6530,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type, ...@@ -6531,7 +6530,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type,
if (fw_info[card_type].conf_name) { if (fw_info[card_type].conf_name) {
ret = request_firmware(&fw, fw_info[card_type].conf_name, ret = request_firmware(&fw, fw_info[card_type].conf_name,
&pdev->dev); &pdev->dev);
if (ret) { if (ret) {
dev_err(&pdev->dev, "config file %s not found\n", dev_err(&pdev->dev, "config file %s not found\n",
fw_info[card_type].conf_name); fw_info[card_type].conf_name);
...@@ -6584,7 +6583,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type, ...@@ -6584,7 +6583,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type,
if (fw_info[card_type].bios_name) { if (fw_info[card_type].bios_name) {
ret = request_firmware(&fw, fw_info[card_type].bios_name, ret = request_firmware(&fw, fw_info[card_type].bios_name,
&pdev->dev); &pdev->dev);
if (ret) { if (ret) {
dev_err(&pdev->dev, "bios file %s not found\n", dev_err(&pdev->dev, "bios file %s not found\n",
fw_info[card_type].bios_name); fw_info[card_type].bios_name);
...@@ -6601,7 +6600,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type, ...@@ -6601,7 +6600,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type,
if (fw_info[card_type].fep_name) { if (fw_info[card_type].fep_name) {
ret = request_firmware(&fw, fw_info[card_type].fep_name, ret = request_firmware(&fw, fw_info[card_type].fep_name,
&pdev->dev); &pdev->dev);
if (ret) { if (ret) {
dev_err(&pdev->dev, "dgap: fep file %s not found\n", dev_err(&pdev->dev, "dgap: fep file %s not found\n",
fw_info[card_type].fep_name); fw_info[card_type].fep_name);
...@@ -6630,7 +6629,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type, ...@@ -6630,7 +6629,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type,
if (fw_info[card_type].con_name && check && vaddr) { if (fw_info[card_type].con_name && check && vaddr) {
ret = request_firmware(&fw, fw_info[card_type].con_name, ret = request_firmware(&fw, fw_info[card_type].con_name,
&pdev->dev); &pdev->dev);
if (ret) { if (ret) {
dev_err(&pdev->dev, "conc file %s not found\n", dev_err(&pdev->dev, "conc file %s not found\n",
fw_info[card_type].con_name); fw_info[card_type].con_name);
...@@ -6994,8 +6993,8 @@ static int dgap_start(void) ...@@ -6994,8 +6993,8 @@ static int dgap_start(void)
} }
device = device_create(dgap_class, NULL, device = device_create(dgap_class, NULL,
MKDEV(DIGI_DGAP_MAJOR, 0), MKDEV(DIGI_DGAP_MAJOR, 0),
NULL, "dgap_mgmt"); NULL, "dgap_mgmt");
if (IS_ERR(device)) { if (IS_ERR(device)) {
rc = PTR_ERR(device); rc = PTR_ERR(device);
goto failed_device; goto failed_device;
......
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