diff options
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r-- | drivers/staging/dgnc/dgnc_cls.c | 22 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_driver.c | 126 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_driver.h | 12 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_mgmt.c | 22 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_neo.c | 30 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_neo.h | 2 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_sysfs.c | 166 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_sysfs.h | 6 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_tty.c | 254 | ||||
-rw-r--r-- | drivers/staging/dgnc/dgnc_tty.h | 6 | ||||
-rw-r--r-- | drivers/staging/dgnc/digi.h | 4 |
11 files changed, 325 insertions, 325 deletions
diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c index 117e158..fa1bb63 100644 --- a/drivers/staging/dgnc/dgnc_cls.c +++ b/drivers/staging/dgnc/dgnc_cls.c @@ -43,7 +43,7 @@ #include "dgnc_tty.h" #include "dgnc_trace.h" -static inline void cls_parse_isr(struct board_t *brd, uint port); +static inline void cls_parse_isr(struct dgnc_board *brd, uint port); static inline void cls_clear_break(struct channel_t *ch, int force); static inline void cls_set_cts_flow_control(struct channel_t *ch); static inline void cls_set_rts_flow_control(struct channel_t *ch); @@ -53,7 +53,7 @@ static inline void cls_set_no_output_flow_control(struct channel_t *ch); static inline void cls_set_no_input_flow_control(struct channel_t *ch); static void cls_parse_modem(struct channel_t *ch, uchar signals); static void cls_tasklet(unsigned long data); -static void cls_vpd(struct board_t *brd); +static void cls_vpd(struct dgnc_board *brd); static void cls_uart_init(struct channel_t *ch); static void cls_uart_off(struct channel_t *ch); static int cls_drain(struct tty_struct *tty, uint seconds); @@ -393,7 +393,7 @@ static inline void cls_clear_break(struct channel_t *ch, int force) /* Parse the ISR register for the specific port */ -static inline void cls_parse_isr(struct board_t *brd, uint port) +static inline void cls_parse_isr(struct dgnc_board *brd, uint port) { struct channel_t *ch; uchar isr = 0; @@ -477,7 +477,7 @@ static void cls_param(struct tty_struct *tty) uchar uart_ier = 0; uint baud = 9600; int quot = 0; - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; @@ -725,7 +725,7 @@ static void cls_param(struct tty_struct *tty) */ static void cls_tasklet(unsigned long data) { - struct board_t *bd = (struct board_t *) data; + struct dgnc_board *bd = (struct dgnc_board *) data; struct channel_t *ch; ulong lock_flags; int i; @@ -802,7 +802,7 @@ static void cls_tasklet(unsigned long data) */ static irqreturn_t cls_intr(int irq, void *voidbrd) { - struct board_t *brd = (struct board_t *) voidbrd; + struct dgnc_board *brd = (struct dgnc_board *) voidbrd; uint i = 0; uchar poll_reg; unsigned long lock_flags; @@ -976,17 +976,17 @@ static int cls_drain(struct tty_struct *tty, uint seconds) int rc = 0; if (!tty || tty->magic != TTY_MAGIC) { - return (-ENXIO); + return -ENXIO; } un = (struct un_t *) tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) { - return (-ENXIO); + return -ENXIO; } ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) { - return (-ENXIO); + return -ENXIO; } DGNC_LOCK(ch->ch_lock, lock_flags); @@ -1002,7 +1002,7 @@ static int cls_drain(struct tty_struct *tty, uint seconds) if (rc) DPR_IOCTL(("%d Drain - User ctrl c'ed\n", __LINE__)); - return (rc); + return rc; } @@ -1378,7 +1378,7 @@ static void cls_send_immediate_char(struct channel_t *ch, unsigned char c) writeb(c, &ch->ch_cls_uart->txrx); } -static void cls_vpd(struct board_t *brd) +static void cls_vpd(struct dgnc_board *brd) { ulong vpdbase; /* Start of io base of the card */ u8 __iomem *re_map_vpdbase;/* Remapped memory of the card */ diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 71d2b83..1318a70 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -71,16 +71,16 @@ PARM_INT(trcbuf_size, 0x100000, 0644, "Debugging trace buffer size."); * */ static int dgnc_start(void); -static int dgnc_finalize_board_init(struct board_t *brd); +static int dgnc_finalize_board_init(struct dgnc_board *brd); static void dgnc_init_globals(void); static int dgnc_found_board(struct pci_dev *pdev, int id); -static void dgnc_cleanup_board(struct board_t *brd); +static void dgnc_cleanup_board(struct dgnc_board *brd); static void dgnc_poll_handler(ulong dummy); static int dgnc_init_pci(void); static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); static void dgnc_remove_one(struct pci_dev *dev); static int dgnc_probe1(struct pci_dev *pdev, int card_type); -static void dgnc_do_remap(struct board_t *brd); +static void dgnc_do_remap(struct dgnc_board *brd); /* Driver load/unload functions */ int dgnc_init_module(void); @@ -106,7 +106,7 @@ static struct file_operations dgnc_BoardFops = * Globals */ uint dgnc_NumBoards; -struct board_t *dgnc_Board[MAXBOARDS]; +struct dgnc_board *dgnc_Board[MAXBOARDS]; DEFINE_SPINLOCK(dgnc_global_lock); int dgnc_driver_state = DRIVER_INITIALIZED; ulong dgnc_poll_counter; @@ -225,7 +225,7 @@ int dgnc_init_module(void) rc = dgnc_start(); if (rc < 0) { - return(rc); + return rc; } /* @@ -250,7 +250,7 @@ int dgnc_init_module(void) } DPR_INIT(("Finished init_module. Returning %d\n", rc)); - return (rc); + return rc; } @@ -286,7 +286,7 @@ static int dgnc_start(void) if (rc <= 0) { APR(("Can't register dgnc driver device (%d)\n", rc)); rc = -ENXIO; - return(rc); + return rc; } dgnc_Major = rc; @@ -311,7 +311,7 @@ static int dgnc_start(void) if (rc < 0) { APR(("tty preinit - not enough memory (%d)\n", rc)); - return(rc); + return rc; } /* Start the poller */ @@ -328,7 +328,7 @@ static int dgnc_start(void) dgnc_driver_state = DRIVER_READY; } - return(rc); + return rc; } /* @@ -418,7 +418,7 @@ void dgnc_cleanup_module(void) * * Free all the memory associated with a board */ -static void dgnc_cleanup_board(struct board_t *brd) +static void dgnc_cleanup_board(struct dgnc_board *brd) { int i = 0; @@ -491,7 +491,7 @@ static void dgnc_cleanup_board(struct board_t *brd) */ static int dgnc_found_board(struct pci_dev *pdev, int id) { - struct board_t *brd; + struct dgnc_board *brd; unsigned int pci_irq; int i = 0; int rc = 0; @@ -499,10 +499,10 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) /* get the board structure and prep it */ brd = dgnc_Board[dgnc_NumBoards] = - (struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL); + (struct dgnc_board *) kzalloc(sizeof(struct dgnc_board), GFP_KERNEL); if (!brd) { APR(("memory allocation for board structure failed\n")); - return(-ENOMEM); + return -ENOMEM; } /* make a temporary message buffer for the boot messages */ @@ -511,7 +511,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) if (!brd->msgbuf) { kfree(brd); APR(("memory allocation for board msgbuf failed\n")); - return(-ENOMEM); + return -ENOMEM; } /* store the info for the board we've found */ @@ -663,7 +663,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) default: APR(("Did not find any compatible Neo or Classic PCI boards in system.\n")); - return (-ENXIO); + return -ENXIO; } @@ -725,22 +725,22 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) wake_up_interruptible(&brd->state_wait); - return(0); + return 0; failed: - return (-ENXIO); + return -ENXIO; } -static int dgnc_finalize_board_init(struct board_t *brd) { +static int dgnc_finalize_board_init(struct dgnc_board *brd) { int rc = 0; DPR_INIT(("dgnc_finalize_board_init() - start\n")); if (!brd || brd->magic != DGNC_BOARD_MAGIC) - return(-ENODEV); + return -ENODEV; DPR_INIT(("dgnc_finalize_board_init() - start #2\n")); @@ -756,13 +756,13 @@ static int dgnc_finalize_board_init(struct board_t *brd) { DPR_INIT(("Requested and received usage of IRQ %d\n", brd->irq)); } } - return(rc); + return rc; } /* * Remap PCI memory. */ -static void dgnc_do_remap(struct board_t *brd) +static void dgnc_do_remap(struct dgnc_board *brd) { if (!brd || brd->magic != DGNC_BOARD_MAGIC) @@ -802,7 +802,7 @@ static void dgnc_do_remap(struct board_t *brd) static void dgnc_poll_handler(ulong dummy) { - struct board_t *brd; + struct dgnc_board *brd; unsigned long lock_flags; int i; unsigned long new_time; @@ -900,7 +900,7 @@ int dgnc_ms_sleep(ulong ms) { current->state = TASK_INTERRUPTIBLE; schedule_timeout((ms * HZ) / 1000); - return (signal_pending(current)); + return signal_pending(current); } @@ -912,47 +912,47 @@ char *dgnc_ioctl_name(int cmd) { switch(cmd) { - case TCGETA: return("TCGETA"); - case TCGETS: return("TCGETS"); - case TCSETA: return("TCSETA"); - case TCSETS: return("TCSETS"); - case TCSETAW: return("TCSETAW"); - case TCSETSW: return("TCSETSW"); - case TCSETAF: return("TCSETAF"); - case TCSETSF: return("TCSETSF"); - case TCSBRK: return("TCSBRK"); - case TCXONC: return("TCXONC"); - case TCFLSH: return("TCFLSH"); - case TIOCGSID: return("TIOCGSID"); - - case TIOCGETD: return("TIOCGETD"); - case TIOCSETD: return("TIOCSETD"); - case TIOCGWINSZ: return("TIOCGWINSZ"); - case TIOCSWINSZ: return("TIOCSWINSZ"); - - case TIOCMGET: return("TIOCMGET"); - case TIOCMSET: return("TIOCMSET"); - case TIOCMBIS: return("TIOCMBIS"); - case TIOCMBIC: return("TIOCMBIC"); + case TCGETA: return "TCGETA"; + case TCGETS: return "TCGETS"; + case TCSETA: return "TCSETA"; + case TCSETS: return "TCSETS"; + case TCSETAW: return "TCSETAW"; + case TCSETSW: return "TCSETSW"; + case TCSETAF: return "TCSETAF"; + case TCSETSF: return "TCSETSF"; + case TCSBRK: return "TCSBRK"; + case TCXONC: return "TCXONC"; + case TCFLSH: return "TCFLSH"; + case TIOCGSID: return "TIOCGSID"; + + case TIOCGETD: return "TIOCGETD"; + case TIOCSETD: return "TIOCSETD"; + case TIOCGWINSZ: return "TIOCGWINSZ"; + case TIOCSWINSZ: return "TIOCSWINSZ"; + + case TIOCMGET: return "TIOCMGET"; + case TIOCMSET: return "TIOCMSET"; + case TIOCMBIS: return "TIOCMBIS"; + case TIOCMBIC: return "TIOCMBIC"; /* from digi.h */ - case DIGI_SETA: return("DIGI_SETA"); - case DIGI_SETAW: return("DIGI_SETAW"); - case DIGI_SETAF: return("DIGI_SETAF"); - case DIGI_SETFLOW: return("DIGI_SETFLOW"); - case DIGI_SETAFLOW: return("DIGI_SETAFLOW"); - case DIGI_GETFLOW: return("DIGI_GETFLOW"); - case DIGI_GETAFLOW: return("DIGI_GETAFLOW"); - case DIGI_GETA: return("DIGI_GETA"); - case DIGI_GEDELAY: return("DIGI_GEDELAY"); - case DIGI_SEDELAY: return("DIGI_SEDELAY"); - case DIGI_GETCUSTOMBAUD: return("DIGI_GETCUSTOMBAUD"); - case DIGI_SETCUSTOMBAUD: return("DIGI_SETCUSTOMBAUD"); - case TIOCMODG: return("TIOCMODG"); - case TIOCMODS: return("TIOCMODS"); - case TIOCSDTR: return("TIOCSDTR"); - case TIOCCDTR: return("TIOCCDTR"); - - default: return("unknown"); + case DIGI_SETA: return "DIGI_SETA"; + case DIGI_SETAW: return "DIGI_SETAW"; + case DIGI_SETAF: return "DIGI_SETAF"; + case DIGI_SETFLOW: return "DIGI_SETFLOW"; + case DIGI_SETAFLOW: return "DIGI_SETAFLOW"; + case DIGI_GETFLOW: return "DIGI_GETFLOW"; + case DIGI_GETAFLOW: return "DIGI_GETAFLOW"; + case DIGI_GETA: return "DIGI_GETA"; + case DIGI_GEDELAY: return "DIGI_GEDELAY"; + case DIGI_SEDELAY: return "DIGI_SEDELAY"; + case DIGI_GETCUSTOMBAUD: return "DIGI_GETCUSTOMBAUD"; + case DIGI_SETCUSTOMBAUD: return "DIGI_SETCUSTOMBAUD"; + case TIOCMODG: return "TIOCMODG"; + case TIOCMODS: return "TIOCMODS"; + case TIOCSDTR: return "TIOCSDTR"; + case TIOCCDTR: return "TIOCCDTR"; + + default: return "unknown"; } } diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h index 218b15d..3519b80 100644 --- a/drivers/staging/dgnc/dgnc_driver.h +++ b/drivers/staging/dgnc/dgnc_driver.h @@ -45,7 +45,7 @@ /* * Driver identification, error and debugging statments * - * In theory, you can change all occurances of "digi" in the next + * In theory, you can change all occurrences of "digi" in the next * three lines, and the driver printk's will all automagically change. * * APR((fmt, args, ...)); Always prints message @@ -246,7 +246,7 @@ enum { * *************************************************************************/ -struct board_t; +struct dgnc_board; struct channel_t; /************************************************************************ @@ -259,7 +259,7 @@ struct board_ops { void (*uart_off) (struct channel_t *ch); int (*drain) (struct tty_struct *tty, uint seconds); void (*param) (struct tty_struct *tty); - void (*vpd) (struct board_t *brd); + void (*vpd) (struct dgnc_board *brd); void (*assert_modem_signals) (struct channel_t *ch); void (*flush_uart_write) (struct channel_t *ch); void (*flush_uart_read) (struct channel_t *ch); @@ -282,7 +282,7 @@ struct board_ops { /* * Per-board information */ -struct board_t { +struct dgnc_board { int magic; /* Board Magic number. */ int boardnum; /* Board number: 0-32 */ @@ -449,7 +449,7 @@ struct un_t { ************************************************************************/ struct channel_t { int magic; /* Channel Magic Number */ - struct board_t *ch_bd; /* Board structure pointer */ + struct dgnc_board *ch_bd; /* Board structure pointer */ struct digi_t ch_digi; /* Transparent Print structure */ struct un_t ch_tun; /* Terminal unit info */ struct un_t ch_pun; /* Printer unit info */ @@ -555,7 +555,7 @@ extern int dgnc_poll_tick; /* Poll interval - 20 ms */ extern int dgnc_trcbuf_size; /* Size of the ringbuffer */ extern spinlock_t dgnc_global_lock; /* Driver global spinlock */ extern uint dgnc_NumBoards; /* Total number of boards */ -extern struct board_t *dgnc_Board[MAXBOARDS]; /* Array of board structs */ +extern struct dgnc_board *dgnc_Board[MAXBOARDS]; /* Array of board structs */ extern ulong dgnc_poll_counter; /* Times the poller has run */ extern char *dgnc_state_text[]; /* Array of state text */ extern char *dgnc_driver_state_text[];/* Array of driver state text */ diff --git a/drivers/staging/dgnc/dgnc_mgmt.c b/drivers/staging/dgnc/dgnc_mgmt.c index c4629d7..bb39f5d 100644 --- a/drivers/staging/dgnc/dgnc_mgmt.c +++ b/drivers/staging/dgnc/dgnc_mgmt.c @@ -74,13 +74,13 @@ int dgnc_mgmt_open(struct inode *inode, struct file *file) /* Only allow 1 open at a time on mgmt device */ if (dgnc_mgmt_in_use[minor]) { DGNC_UNLOCK(dgnc_global_lock, lock_flags); - return (-EBUSY); + return -EBUSY; } dgnc_mgmt_in_use[minor]++; } else { DGNC_UNLOCK(dgnc_global_lock, lock_flags); - return (-ENXIO); + return -ENXIO; } DGNC_UNLOCK(dgnc_global_lock, lock_flags); @@ -154,7 +154,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ddi.dinfo_nboards, ddi.dinfo_version)); if (copy_to_user(uarg, &ddi, sizeof (ddi))) - return(-EFAULT); + return -EFAULT; break; } @@ -166,13 +166,13 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) struct digi_info di; if (copy_from_user(&brd, uarg, sizeof(int))) { - return(-EFAULT); + return -EFAULT; } DPR_MGMT(("DIGI_GETBD asking about board: %d\n", brd)); if ((brd < 0) || (brd > dgnc_NumBoards) || (dgnc_NumBoards == 0)) - return (-ENODEV); + return -ENODEV; memset(&di, 0, sizeof(di)); @@ -196,7 +196,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) di.info_bdtype, di.info_bdstate, di.info_nports, di.info_physsize)); if (copy_to_user(uarg, &di, sizeof (di))) - return (-EFAULT); + return -EFAULT; break; } @@ -210,7 +210,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) uint channel = 0; if (copy_from_user(&ni, uarg, sizeof(struct ni_info))) { - return(-EFAULT); + return -EFAULT; } DPR_MGMT(("DIGI_GETBD asking about board: %d channel: %d\n", @@ -221,16 +221,16 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) /* Verify boundaries on board */ if ((board < 0) || (board > dgnc_NumBoards) || (dgnc_NumBoards == 0)) - return (-ENODEV); + return -ENODEV; /* Verify boundaries on channel */ if ((channel < 0) || (channel > dgnc_Board[board]->nasync)) - return (-ENODEV); + return -ENODEV; ch = dgnc_Board[board]->channels[channel]; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (-ENODEV); + return -ENODEV; memset(&ni, 0, sizeof(ni)); ni.board = board; @@ -291,7 +291,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) DGNC_UNLOCK(ch->ch_lock, lock_flags); if (copy_to_user(uarg, &ni, sizeof(ni))) - return (-EFAULT); + return -EFAULT; break; } diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 8b9e09a..0e2a5e1 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -43,8 +43,8 @@ #include "dgnc_tty.h" #include "dgnc_trace.h" -static inline void neo_parse_lsr(struct board_t *brd, uint port); -static inline void neo_parse_isr(struct board_t *brd, uint port); +static inline void neo_parse_lsr(struct dgnc_board *brd, uint port); +static inline void neo_parse_isr(struct dgnc_board *brd, uint port); static void neo_copy_data_from_uart_to_queue(struct channel_t *ch); static inline void neo_clear_break(struct channel_t *ch, int force); static inline void neo_set_cts_flow_control(struct channel_t *ch); @@ -56,7 +56,7 @@ static inline void neo_set_no_input_flow_control(struct channel_t *ch); static inline void neo_set_new_start_stop_chars(struct channel_t *ch); static void neo_parse_modem(struct channel_t *ch, uchar signals); static void neo_tasklet(unsigned long data); -static void neo_vpd(struct board_t *brd); +static void neo_vpd(struct dgnc_board *brd); static void neo_uart_init(struct channel_t *ch); static void neo_uart_off(struct channel_t *ch); static int neo_drain(struct tty_struct *tty, uint seconds); @@ -107,7 +107,7 @@ static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0 * In this case, we are reading the DVID (Read-only Device Identification) * value of the Neo card. */ -static inline void neo_pci_posting_flush(struct board_t *bd) +static inline void neo_pci_posting_flush(struct dgnc_board *bd) { readb(bd->re_map_membase + 0x8D); } @@ -411,7 +411,7 @@ static inline void neo_clear_break(struct channel_t *ch, int force) /* * Parse the ISR register. */ -static inline void neo_parse_isr(struct board_t *brd, uint port) +static inline void neo_parse_isr(struct dgnc_board *brd, uint port) { struct channel_t *ch; uchar isr; @@ -538,7 +538,7 @@ static inline void neo_parse_isr(struct board_t *brd, uint port) } -static inline void neo_parse_lsr(struct board_t *brd, uint port) +static inline void neo_parse_lsr(struct dgnc_board *brd, uint port) { struct channel_t *ch; int linestatus; @@ -650,7 +650,7 @@ static void neo_param(struct tty_struct *tty) uchar uart_ier = 0; uint baud = 9600; int quot = 0; - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; @@ -911,7 +911,7 @@ static void neo_param(struct tty_struct *tty) */ static void neo_tasklet(unsigned long data) { - struct board_t *bd = (struct board_t *) data; + struct dgnc_board *bd = (struct dgnc_board *) data; struct channel_t *ch; ulong lock_flags; int i; @@ -994,7 +994,7 @@ static void neo_tasklet(unsigned long data) */ static irqreturn_t neo_intr(int irq, void *voidbrd) { - struct board_t *brd = (struct board_t *) voidbrd; + struct dgnc_board *brd = (struct dgnc_board *) voidbrd; struct channel_t *ch; int port = 0; int type = 0; @@ -1111,7 +1111,7 @@ static irqreturn_t neo_intr(int irq, void *voidbrd) * Why would I check EVERY possibility of type of * interrupt, when we know its TXRDY??? * Becuz for some reason, even tho we got triggered for TXRDY, - * it seems to be occassionally wrong. Instead of TX, which + * it seems to be occasionally wrong. Instead of TX, which * it should be, I was getting things like RXDY too. Weird. */ neo_parse_isr(brd, port); @@ -1404,17 +1404,17 @@ static int neo_drain(struct tty_struct *tty, uint seconds) int rc = 0; if (!tty || tty->magic != TTY_MAGIC) { - return (-ENXIO); + return -ENXIO; } un = (struct un_t *) tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) { - return (-ENXIO); + return -ENXIO; } ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) { - return (-ENXIO); + return -ENXIO; } DPR_IOCTL(("%d Drain wait started.\n", __LINE__)); @@ -1439,7 +1439,7 @@ static int neo_drain(struct tty_struct *tty, uint seconds) DPR_IOCTL(("%d Drain wait finished.\n", __LINE__)); } - return (rc); + return rc; } @@ -1939,7 +1939,7 @@ static unsigned int neo_read_eeprom(unsigned char __iomem *base, unsigned int ad } -static void neo_vpd(struct board_t *brd) +static void neo_vpd(struct dgnc_board *brd) { unsigned int i = 0; unsigned int a; diff --git a/drivers/staging/dgnc/dgnc_neo.h b/drivers/staging/dgnc/dgnc_neo.h index 7ec5710..1a4abb1 100644 --- a/drivers/staging/dgnc/dgnc_neo.h +++ b/drivers/staging/dgnc/dgnc_neo.h @@ -47,7 +47,7 @@ struct neo_uart_struct { u8 fctr; /* WR FCTR - Feature Control Reg */ u8 efr; /* WR EFR - Enhanced Function Reg */ u8 tfifo; /* WR TXCNT/TXTRG - Transmit FIFO Reg */ - u8 rfifo; /* WR RXCNT/RXTRG - Recieve FIFO Reg */ + u8 rfifo; /* WR RXCNT/RXTRG - Receive FIFO Reg */ u8 xoffchar1; /* WR XOFF 1 - XOff Character 1 Reg */ u8 xoffchar2; /* WR XOFF 2 - XOff Character 2 Reg */ u8 xonchar1; /* WR XON 1 - Xon Character 1 Reg */ diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c index 0ea6c80..5834e0c 100644 --- a/drivers/staging/dgnc/dgnc_sysfs.c +++ b/drivers/staging/dgnc/dgnc_sysfs.c @@ -152,19 +152,19 @@ void dgnc_remove_driver_sysfiles(struct pci_driver *dgnc_driver) #define DGNC_VERIFY_BOARD(p, bd) \ if (!p) \ - return (0); \ + return 0; \ \ bd = dev_get_drvdata(p); \ if (!bd || bd->magic != DGNC_BOARD_MAGIC) \ - return (0); \ + return 0; \ if (bd->state != BOARD_READY) \ - return (0); \ + return 0; \ static ssize_t dgnc_vpd_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -184,7 +184,7 @@ static DEVICE_ATTR(vpd, S_IRUSR, dgnc_vpd_show, NULL); static ssize_t dgnc_serial_number_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; DGNC_VERIFY_BOARD(p, bd); @@ -201,7 +201,7 @@ static DEVICE_ATTR(serial_number, S_IRUSR, dgnc_serial_number_show, NULL); static ssize_t dgnc_ports_state_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -219,7 +219,7 @@ static DEVICE_ATTR(ports_state, S_IRUSR, dgnc_ports_state_show, NULL); static ssize_t dgnc_ports_baud_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -236,7 +236,7 @@ static DEVICE_ATTR(ports_baud, S_IRUSR, dgnc_ports_baud_show, NULL); static ssize_t dgnc_ports_msignals_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -264,7 +264,7 @@ static DEVICE_ATTR(ports_msignals, S_IRUSR, dgnc_ports_msignals_show, NULL); static ssize_t dgnc_ports_iflag_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -281,7 +281,7 @@ static DEVICE_ATTR(ports_iflag, S_IRUSR, dgnc_ports_iflag_show, NULL); static ssize_t dgnc_ports_cflag_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -298,7 +298,7 @@ static DEVICE_ATTR(ports_cflag, S_IRUSR, dgnc_ports_cflag_show, NULL); static ssize_t dgnc_ports_oflag_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -315,7 +315,7 @@ static DEVICE_ATTR(ports_oflag, S_IRUSR, dgnc_ports_oflag_show, NULL); static ssize_t dgnc_ports_lflag_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -332,7 +332,7 @@ static DEVICE_ATTR(ports_lflag, S_IRUSR, dgnc_ports_lflag_show, NULL); static ssize_t dgnc_ports_digi_flag_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -349,7 +349,7 @@ static DEVICE_ATTR(ports_digi_flag, S_IRUSR, dgnc_ports_digi_flag_show, NULL); static ssize_t dgnc_ports_rxcount_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -366,7 +366,7 @@ static DEVICE_ATTR(ports_rxcount, S_IRUSR, dgnc_ports_rxcount_show, NULL); static ssize_t dgnc_ports_txcount_show(struct device *p, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; int count = 0; int i = 0; @@ -384,7 +384,7 @@ static DEVICE_ATTR(ports_txcount, S_IRUSR, dgnc_ports_txcount_show, NULL); /* this function creates the sys files that will export each signal status * to sysfs each value will be put in a separate filename */ -void dgnc_create_ports_sysfiles(struct board_t *bd) +void dgnc_create_ports_sysfiles(struct dgnc_board *bd) { int rc = 0; @@ -408,7 +408,7 @@ void dgnc_create_ports_sysfiles(struct board_t *bd) /* removes all the sys files created for that port */ -void dgnc_remove_ports_sysfiles(struct board_t *bd) +void dgnc_remove_ports_sysfiles(struct dgnc_board *bd) { device_remove_file(&(bd->pdev->dev), &dev_attr_ports_state); device_remove_file(&(bd->pdev->dev), &dev_attr_ports_baud); @@ -427,23 +427,23 @@ void dgnc_remove_ports_sysfiles(struct board_t *bd) static ssize_t dgnc_tty_state_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%s", un->un_open_count ? "Open" : "Closed"); } @@ -452,23 +452,23 @@ static DEVICE_ATTR(state, S_IRUSR, dgnc_tty_state_show, NULL); static ssize_t dgnc_tty_baud_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%d\n", ch->ch_old_baud); } @@ -477,23 +477,23 @@ static DEVICE_ATTR(baud, S_IRUSR, dgnc_tty_baud_show, NULL); static ssize_t dgnc_tty_msignals_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; if (ch->ch_open_count) { return snprintf(buf, PAGE_SIZE, "%s %s %s %s %s %s\n", @@ -511,23 +511,23 @@ static DEVICE_ATTR(msignals, S_IRUSR, dgnc_tty_msignals_show, NULL); static ssize_t dgnc_tty_iflag_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%x\n", ch->ch_c_iflag); } @@ -536,23 +536,23 @@ static DEVICE_ATTR(iflag, S_IRUSR, dgnc_tty_iflag_show, NULL); static ssize_t dgnc_tty_cflag_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%x\n", ch->ch_c_cflag); } @@ -561,23 +561,23 @@ static DEVICE_ATTR(cflag, S_IRUSR, dgnc_tty_cflag_show, NULL); static ssize_t dgnc_tty_oflag_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%x\n", ch->ch_c_oflag); } @@ -586,23 +586,23 @@ static DEVICE_ATTR(oflag, S_IRUSR, dgnc_tty_oflag_show, NULL); static ssize_t dgnc_tty_lflag_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%x\n", ch->ch_c_lflag); } @@ -611,23 +611,23 @@ static DEVICE_ATTR(lflag, S_IRUSR, dgnc_tty_lflag_show, NULL); static ssize_t dgnc_tty_digi_flag_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%x\n", ch->ch_digi.digi_flags); } @@ -636,23 +636,23 @@ static DEVICE_ATTR(digi_flag, S_IRUSR, dgnc_tty_digi_flag_show, NULL); static ssize_t dgnc_tty_rxcount_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%ld\n", ch->ch_rxcount); } @@ -661,23 +661,23 @@ static DEVICE_ATTR(rxcount, S_IRUSR, dgnc_tty_rxcount_show, NULL); static ssize_t dgnc_tty_txcount_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%ld\n", ch->ch_txcount); } @@ -686,23 +686,23 @@ static DEVICE_ATTR(txcount, S_IRUSR, dgnc_tty_txcount_show, NULL); static ssize_t dgnc_tty_name_show(struct device *d, struct device_attribute *attr, char *buf) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; if (!d) - return (0); + return 0; un = (struct un_t *) dev_get_drvdata(d); if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (0); + return 0; if (bd->state != BOARD_READY) - return (0); + return 0; return snprintf(buf, PAGE_SIZE, "%sn%d%c\n", (un->un_type == DGNC_PRINT) ? "pr" : "tty", diff --git a/drivers/staging/dgnc/dgnc_sysfs.h b/drivers/staging/dgnc/dgnc_sysfs.h index 4b87ce1..68c0de5 100644 --- a/drivers/staging/dgnc/dgnc_sysfs.h +++ b/drivers/staging/dgnc/dgnc_sysfs.h @@ -26,14 +26,14 @@ #include <linux/device.h> -struct board_t; +struct dgnc_board; struct channel_t; struct un_t; struct pci_driver; struct class_device; -extern void dgnc_create_ports_sysfiles(struct board_t *bd); -extern void dgnc_remove_ports_sysfiles(struct board_t *bd); +extern void dgnc_create_ports_sysfiles(struct dgnc_board *bd); +extern void dgnc_remove_ports_sysfiles(struct dgnc_board *bd); extern void dgnc_create_driver_sysfiles(struct pci_driver *); extern void dgnc_remove_driver_sysfiles(struct pci_driver *); diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index a7bb6bc..6906e98 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -69,7 +69,7 @@ /* * internal variables */ -static struct board_t *dgnc_BoardsByMajor[256]; +static struct dgnc_board *dgnc_BoardsByMajor[256]; static uchar *dgnc_TmpWriteBuf = NULL; static DECLARE_MUTEX(dgnc_TmpWriteSem); @@ -190,10 +190,10 @@ int dgnc_tty_preinit(void) if (!dgnc_TmpWriteBuf) { DPR_INIT(("unable to allocate tmp write buf")); - return (-ENOMEM); + return -ENOMEM; } - return(0); + return 0; } @@ -202,7 +202,7 @@ int dgnc_tty_preinit(void) * * Init the tty subsystem for this board. */ -int dgnc_tty_register(struct board_t *brd) +int dgnc_tty_register(struct dgnc_board *brd) { int rc = 0; @@ -232,7 +232,7 @@ int dgnc_tty_register(struct board_t *brd) */ brd->SerialDriver.ttys = kzalloc(brd->maxports * sizeof(struct tty_struct *), GFP_KERNEL); if (!brd->SerialDriver.ttys) - return(-ENOMEM); + return -ENOMEM; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) brd->SerialDriver.refcount = brd->TtyRefCnt; @@ -242,12 +242,12 @@ int dgnc_tty_register(struct board_t *brd) brd->SerialDriver.termios = kzalloc(brd->maxports * sizeof(struct ktermios *), GFP_KERNEL); if (!brd->SerialDriver.termios) - return(-ENOMEM); + return -ENOMEM; #if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) brd->SerialDriver.termios_locked = kzalloc(brd->maxports * sizeof(struct ktermios *), GFP_KERNEL); if (!brd->SerialDriver.termios_locked) - return(-ENOMEM); + return -ENOMEM; #endif /* * Entry points for driver. Called by the kernel from @@ -260,14 +260,14 @@ int dgnc_tty_register(struct board_t *brd) rc = tty_register_driver(&brd->SerialDriver); if (rc < 0) { APR(("Can't register tty device (%d)\n", rc)); - return(rc); + return rc; } brd->dgnc_Major_Serial_Registered = TRUE; } /* * If we're doing transparent print, we have to do all of the above - * again, seperately so we don't get the LD confused about what major + * again, separately so we don't get the LD confused about what major * we are when we get into the dgnc_tty_open() routine. */ brd->PrintDriver.magic = TTY_DRIVER_MAGIC; @@ -286,12 +286,12 @@ int dgnc_tty_register(struct board_t *brd) /* * The kernel wants space to store pointers to - * tty_struct's and termios's. Must be seperate from + * tty_struct's and termios's. Must be separated from * the Serial Driver so we don't get confused */ brd->PrintDriver.ttys = kzalloc(brd->maxports * sizeof(struct tty_struct *), GFP_KERNEL); if (!brd->PrintDriver.ttys) - return(-ENOMEM); + return -ENOMEM; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) brd->PrintDriver.refcount = brd->TtyRefCnt; @@ -301,12 +301,12 @@ int dgnc_tty_register(struct board_t *brd) brd->PrintDriver.termios = kzalloc(brd->maxports * sizeof(struct ktermios *), GFP_KERNEL); if (!brd->PrintDriver.termios) - return(-ENOMEM); + return -ENOMEM; #if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0) brd->PrintDriver.termios_locked = kzalloc(brd->maxports * sizeof(struct ktermios *), GFP_KERNEL); if (!brd->PrintDriver.termios_locked) - return(-ENOMEM); + return -ENOMEM; #endif /* @@ -320,7 +320,7 @@ int dgnc_tty_register(struct board_t *brd) rc = tty_register_driver(&brd->PrintDriver); if (rc < 0) { APR(("Can't register Transparent Print device (%d)\n", rc)); - return(rc); + return rc; } brd->dgnc_Major_TransparentPrint_Registered = TRUE; } @@ -331,7 +331,7 @@ int dgnc_tty_register(struct board_t *brd) DPR_INIT(("DGNC REGISTER TTY: MAJOR: %d\n", brd->SerialDriver.major)); - return (rc); + return rc; } @@ -341,14 +341,14 @@ int dgnc_tty_register(struct board_t *brd) * Init the tty subsystem. Called once per board after board has been * downloaded and init'ed. */ -int dgnc_tty_init(struct board_t *brd) +int dgnc_tty_init(struct dgnc_board *brd) { int i; void __iomem *vaddr; struct channel_t *ch; if (!brd) - return (-ENXIO); + return -ENXIO; DPR_INIT(("dgnc_tty_init start\n")); @@ -436,7 +436,7 @@ int dgnc_tty_init(struct board_t *brd) DPR_INIT(("dgnc_tty_init finish\n")); - return (0); + return 0; } @@ -460,7 +460,7 @@ void dgnc_tty_post_uninit(void) * Uninitialize the TTY portion of this driver. Free all memory and * resources. */ -void dgnc_tty_uninit(struct board_t *brd) +void dgnc_tty_uninit(struct dgnc_board *brd) { int i = 0; @@ -671,7 +671,7 @@ static void dgnc_wmove(struct channel_t *ch, char *buf, uint n) *=======================================================================*/ void dgnc_input(struct channel_t *ch) { - struct board_t *bd; + struct dgnc_board *bd; struct tty_struct *tp; struct tty_ldisc *ld; uint rmask; @@ -867,7 +867,7 @@ void dgnc_input(struct channel_t *ch) ************************************************************************/ void dgnc_carrier(struct channel_t *ch) { - struct board_t *bd; + struct dgnc_board *bd; int virt_carrier = 0; int phys_carrier = 0; @@ -1260,7 +1260,7 @@ void dgnc_wakeup_writes(struct channel_t *ch) */ static int dgnc_tty_open(struct tty_struct *tty, struct file *file) { - struct board_t *brd; + struct dgnc_board *brd; struct channel_t *ch; struct un_t *un; uint major = 0; @@ -1473,7 +1473,7 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file) DGNC_UNLOCK(ch->ch_lock, lock_flags); DPR_OPEN(("dgnc_tty_open finished\n")); - return (rc); + return rc; } @@ -1491,12 +1491,12 @@ static int dgnc_block_til_ready(struct tty_struct *tty, struct file *file, struc int sleep_on_un_flags = 0; if (!tty || tty->magic != TTY_MAGIC || !file || !ch || ch->magic != DGNC_CHANNEL_MAGIC) { - return (-ENXIO); + return -ENXIO; } un = tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) { - return (-ENXIO); + return -ENXIO; } DPR_OPEN(("dgnc_block_til_ready - before block.\n")); @@ -1624,12 +1624,12 @@ static int dgnc_block_til_ready(struct tty_struct *tty, struct file *file, struc if (retval) { DPR_OPEN(("dgnc_block_til_ready - done. error. retval: %x\n", retval)); - return(retval); + return retval; } DPR_OPEN(("dgnc_block_til_ready - done no error. jiffies: %lu\n", jiffies)); - return(0); + return 0; } @@ -1667,7 +1667,7 @@ static void dgnc_tty_hangup(struct tty_struct *tty) static void dgnc_tty_close(struct tty_struct *tty, struct file *file) { struct ktermios *ts; - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; ulong lock_flags; @@ -1843,15 +1843,15 @@ static int dgnc_tty_chars_in_buffer(struct tty_struct *tty) ulong lock_flags = 0; if (tty == NULL) - return(0); + return 0; un = tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; DGNC_LOCK(ch->ch_lock, lock_flags); @@ -1873,7 +1873,7 @@ static int dgnc_tty_chars_in_buffer(struct tty_struct *tty) DPR_WRITE(("dgnc_tty_chars_in_buffer. Port: %x - %d (head: %d tail: %d)\n", ch->ch_portnum, chars, thead, ttail)); - return(chars); + return chars; } @@ -1891,22 +1891,22 @@ static int dgnc_maxcps_room(struct tty_struct *tty, int bytes_available) struct un_t *un = NULL; if (!tty) - return (bytes_available); + return bytes_available; un = tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) - return (bytes_available); + return bytes_available; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (bytes_available); + return bytes_available; /* * If its not the Transparent print device, return * the full data amount. */ if (un->un_type != DGNC_PRINT) - return (bytes_available); + return bytes_available; if (ch->ch_digi.digi_maxcps > 0 && ch->ch_digi.digi_bufsize > 0 ) { int cps_limit = 0; @@ -1931,7 +1931,7 @@ static int dgnc_maxcps_room(struct tty_struct *tty, int bytes_available) bytes_available = min(cps_limit, bytes_available); } - return (bytes_available); + return bytes_available; } @@ -1951,15 +1951,15 @@ static int dgnc_tty_write_room(struct tty_struct *tty) ulong lock_flags = 0; if (tty == NULL || dgnc_TmpWriteBuf == NULL) - return(0); + return 0; un = tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) - return (0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (0); + return 0; DGNC_LOCK(ch->ch_lock, lock_flags); @@ -1994,7 +1994,7 @@ static int dgnc_tty_write_room(struct tty_struct *tty) DPR_WRITE(("dgnc_tty_write_room - %d tail: %d head: %d\n", ret, tail, head)); - return(ret); + return ret; } @@ -2037,18 +2037,18 @@ static int dgnc_tty_write(struct tty_struct *tty, int from_user = 0; if (tty == NULL || dgnc_TmpWriteBuf == NULL) - return(0); + return 0; un = tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) - return(0); + return 0; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return(0); + return 0; if (!count) - return(0); + return 0; DPR_WRITE(("dgnc_tty_write: Port: %x tty=%p user=%d len=%d\n", ch->ch_portnum, tty, from_user, count)); @@ -2090,7 +2090,7 @@ static int dgnc_tty_write(struct tty_struct *tty, */ if (count <= 0) { DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(0); + return 0; } /* @@ -2120,7 +2120,7 @@ static int dgnc_tty_write(struct tty_struct *tty, */ if (count <= 0) { DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(0); + return 0; } if (from_user) { @@ -2136,7 +2136,7 @@ static int dgnc_tty_write(struct tty_struct *tty, */ /* we're allowed to block if it's from_user */ if (down_interruptible(&dgnc_TmpWriteSem)) { - return (-EINTR); + return -EINTR; } /* @@ -2147,7 +2147,7 @@ static int dgnc_tty_write(struct tty_struct *tty, if (!count) { up(&dgnc_TmpWriteSem); - return(-EFAULT); + return -EFAULT; } DGNC_LOCK(ch->ch_lock, lock_flags); @@ -2229,7 +2229,7 @@ static int dgnc_tty_write(struct tty_struct *tty, ch->ch_bd->bd_ops->copy_data_from_queue_to_uart(ch); } - return (count); + return count; } @@ -2301,7 +2301,7 @@ static int dgnc_tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int set, unsigned int clear) #endif { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; int ret = -EIO; @@ -2349,7 +2349,7 @@ static int dgnc_tty_tiocmset(struct tty_struct *tty, struct file *file, DPR_IOCTL(("dgnc_tty_tiocmset finish\n")); - return (0); + return 0; } @@ -2360,7 +2360,7 @@ static int dgnc_tty_tiocmset(struct tty_struct *tty, struct file *file, */ static int dgnc_tty_send_break(struct tty_struct *tty, int msec) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; int ret = -EIO; @@ -2402,7 +2402,7 @@ static int dgnc_tty_send_break(struct tty_struct *tty, int msec) DPR_IOCTL(("dgnc_tty_send_break finish\n")); - return (0); + return 0; } @@ -2414,7 +2414,7 @@ static int dgnc_tty_send_break(struct tty_struct *tty, int msec) */ static void dgnc_tty_wait_until_sent(struct tty_struct *tty, int timeout) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; int rc; @@ -2450,7 +2450,7 @@ static void dgnc_tty_wait_until_sent(struct tty_struct *tty, int timeout) */ static void dgnc_tty_send_xchar(struct tty_struct *tty, char c) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; ulong lock_flags; @@ -2497,7 +2497,7 @@ static inline int dgnc_get_mstat(struct channel_t *ch) DPR_IOCTL(("dgnc_getmstat start\n")); if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return(-ENXIO); + return -ENXIO; DGNC_LOCK(ch->ch_lock, lock_flags); @@ -2522,7 +2522,7 @@ static inline int dgnc_get_mstat(struct channel_t *ch) DPR_IOCTL(("dgnc_getmstat finish\n")); - return(result); + return result; } @@ -2538,17 +2538,17 @@ static int dgnc_get_modem_info(struct channel_t *ch, unsigned int __user *value DPR_IOCTL(("dgnc_get_modem_info start\n")); if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return(-ENXIO); + return -ENXIO; result = dgnc_get_mstat(ch); if (result < 0) - return (-ENXIO); + return -ENXIO; rc = put_user(result, value); DPR_IOCTL(("dgnc_get_modem_info finish\n")); - return(rc); + return rc; } @@ -2559,7 +2559,7 @@ static int dgnc_get_modem_info(struct channel_t *ch, unsigned int __user *value */ static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, unsigned int __user *value) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; int ret = -ENXIO; @@ -2587,7 +2587,7 @@ static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, uns ret = get_user(arg, value); if (ret) - return(ret); + return ret; switch (command) { case TIOCMBIS: @@ -2631,7 +2631,7 @@ static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, uns break; default: - return(-EINVAL); + return -EINVAL; } DGNC_LOCK(ch->ch_lock, lock_flags); @@ -2642,7 +2642,7 @@ static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, uns DPR_IOCTL(("dgnc_set_modem_info finish\n")); - return (0); + return 0; } @@ -2662,18 +2662,18 @@ static int dgnc_tty_digigeta(struct tty_struct *tty, struct digi_t __user *retin ulong lock_flags; if (!retinfo) - return (-EFAULT); + return -EFAULT; if (!tty || tty->magic != TTY_MAGIC) - return (-EFAULT); + return -EFAULT; un = tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) - return (-EFAULT); + return -EFAULT; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (-EFAULT); + return -EFAULT; memset(&tmp, 0, sizeof(tmp)); @@ -2682,9 +2682,9 @@ static int dgnc_tty_digigeta(struct tty_struct *tty, struct digi_t __user *retin DGNC_UNLOCK(ch->ch_lock, lock_flags); if (copy_to_user(retinfo, &tmp, sizeof(*retinfo))) - return (-EFAULT); + return -EFAULT; - return (0); + return 0; } @@ -2698,7 +2698,7 @@ static int dgnc_tty_digigeta(struct tty_struct *tty, struct digi_t __user *retin */ static int dgnc_tty_digiseta(struct tty_struct *tty, struct digi_t __user *new_info) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; struct digi_t new_digi; @@ -2707,23 +2707,23 @@ static int dgnc_tty_digiseta(struct tty_struct *tty, struct digi_t __user *new_i DPR_IOCTL(("DIGI_SETA start\n")); if (!tty || tty->magic != TTY_MAGIC) - return (-EFAULT); + return -EFAULT; un = tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) - return (-EFAULT); + return -EFAULT; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (-EFAULT); + return -EFAULT; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (-EFAULT); + return -EFAULT; if (copy_from_user(&new_digi, new_info, sizeof(struct digi_t))) { DPR_IOCTL(("DIGI_SETA failed copy_from_user\n")); - return(-EFAULT); + return -EFAULT; } DGNC_LOCK(ch->ch_lock, lock_flags); @@ -2773,7 +2773,7 @@ static int dgnc_tty_digiseta(struct tty_struct *tty, struct digi_t __user *new_i DPR_IOCTL(("DIGI_SETA finish\n")); - return(0); + return 0; } @@ -2782,7 +2782,7 @@ static int dgnc_tty_digiseta(struct tty_struct *tty, struct digi_t __user *new_i */ static void dgnc_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; unsigned long lock_flags; @@ -2878,7 +2878,7 @@ static void dgnc_tty_unthrottle(struct tty_struct *tty) static void dgnc_tty_start(struct tty_struct *tty) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; ulong lock_flags; @@ -2912,7 +2912,7 @@ static void dgnc_tty_start(struct tty_struct *tty) static void dgnc_tty_stop(struct tty_struct *tty) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; ulong lock_flags; @@ -2959,7 +2959,7 @@ static void dgnc_tty_stop(struct tty_struct *tty) */ static void dgnc_tty_flush_chars(struct tty_struct *tty) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; ulong lock_flags; @@ -3056,7 +3056,7 @@ static void dgnc_tty_flush_buffer(struct tty_struct *tty) static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg) { - struct board_t *bd; + struct dgnc_board *bd; struct channel_t *ch; struct un_t *un; int rc; @@ -3064,19 +3064,19 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, void __user *uarg = (void __user *) arg; if (!tty || tty->magic != TTY_MAGIC) - return (-ENODEV); + return -ENODEV; un = tty->driver_data; if (!un || un->magic != DGNC_UNIT_MAGIC) - return (-ENODEV); + return -ENODEV; ch = un->un_ch; if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) - return (-ENODEV); + return -ENODEV; bd = ch->ch_bd; if (!bd || bd->magic != DGNC_BOARD_MAGIC) - return (-ENODEV); + return -ENODEV; DPR_IOCTL(("dgnc_tty_ioctl start on port %d - cmd %s (%x), arg %lx\n", ch->ch_portnum, dgnc_ioctl_name(cmd), cmd, arg)); @@ -3086,7 +3086,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, if (un->un_open_count <= 0) { DPR_BASIC(("dgnc_tty_ioctl - unit not open.\n")); DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(-EIO); + return -EIO; } switch (cmd) { @@ -3105,14 +3105,14 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, rc = tty_check_change(tty); DGNC_UNLOCK(ch->ch_lock, lock_flags); if (rc) { - return(rc); + return rc; } rc = ch->ch_bd->bd_ops->drain(tty, 0); if (rc) { DPR_IOCTL(("dgnc_tty_ioctl - bad return: %d ", rc)); - return(-EINTR); + return -EINTR; } DGNC_LOCK(ch->ch_lock, lock_flags); @@ -3126,7 +3126,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DPR_IOCTL(("dgnc_tty_ioctl finish on port %d - cmd %s (%x), arg %lx\n", ch->ch_portnum, dgnc_ioctl_name(cmd), cmd, arg)); - return(0); + return 0; case TCSBRKP: @@ -3138,13 +3138,13 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, rc = tty_check_change(tty); DGNC_UNLOCK(ch->ch_lock, lock_flags); if (rc) { - return(rc); + return rc; } rc = ch->ch_bd->bd_ops->drain(tty, 0); if (rc) { DPR_IOCTL(("dgnc_tty_ioctl - bad return: %d ", rc)); - return(-EINTR); + return -EINTR; } DGNC_LOCK(ch->ch_lock, lock_flags); @@ -3156,19 +3156,19 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DPR_IOCTL(("dgnc_tty_ioctl finish on port %d - cmd %s (%x), arg %lx\n", ch->ch_portnum, dgnc_ioctl_name(cmd), cmd, arg)); - return(0); + return 0; case TIOCSBRK: rc = tty_check_change(tty); DGNC_UNLOCK(ch->ch_lock, lock_flags); if (rc) { - return(rc); + return rc; } rc = ch->ch_bd->bd_ops->drain(tty, 0); if (rc) { DPR_IOCTL(("dgnc_tty_ioctl - bad return: %d ", rc)); - return(-EINTR); + return -EINTR; } DGNC_LOCK(ch->ch_lock, lock_flags); @@ -3180,7 +3180,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DPR_IOCTL(("dgnc_tty_ioctl finish on port %d - cmd %s (%x), arg %lx\n", ch->ch_portnum, dgnc_ioctl_name(cmd), cmd, arg)); - return(0); + return 0; case TIOCCBRK: /* Do Nothing */ @@ -3192,31 +3192,31 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DGNC_UNLOCK(ch->ch_lock, lock_flags); rc = put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long __user *) arg); - return(rc); + return rc; case TIOCSSOFTCAR: DGNC_UNLOCK(ch->ch_lock, lock_flags); rc = get_user(arg, (unsigned long __user *) arg); if (rc) - return(rc); + return rc; DGNC_LOCK(ch->ch_lock, lock_flags); tty->termios.c_cflag = ((tty->termios.c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); ch->ch_bd->bd_ops->param(tty); DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(0); + return 0; case TIOCMGET: DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(dgnc_get_modem_info(ch, uarg)); + return dgnc_get_modem_info(ch, uarg); case TIOCMBIS: case TIOCMBIC: case TIOCMSET: DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(dgnc_set_modem_info(tty, cmd, uarg)); + return dgnc_set_modem_info(tty, cmd, uarg); /* * Here are any additional ioctl's that we want to implement @@ -3235,7 +3235,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, rc = tty_check_change(tty); if (rc) { DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(rc); + return rc; } if ((arg == TCIFLUSH) || (arg == TCIOFLUSH)) { @@ -3265,7 +3265,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, /* pretend we didn't recognize this IOCTL */ DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(-ENOIOCTLCMD); + return -ENOIOCTLCMD; case TCSETSF: case TCSETSW: /* @@ -3291,14 +3291,14 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, rc = ch->ch_bd->bd_ops->drain(tty, 0); if (rc) { DPR_IOCTL(("dgnc_tty_ioctl - bad return: %d\n", rc)); - return(-EINTR); + return -EINTR; } DPR_IOCTL(("dgnc_tty_ioctl finish on port %d - cmd %s (%x), arg %lx\n", ch->ch_portnum, dgnc_ioctl_name(cmd), cmd, arg)); /* pretend we didn't recognize this */ - return(-ENOIOCTLCMD); + return -ENOIOCTLCMD; case TCSETAW: @@ -3306,21 +3306,21 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, rc = ch->ch_bd->bd_ops->drain(tty, 0); if (rc) { DPR_IOCTL(("dgnc_tty_ioctl - bad return: %d ", rc)); - return(-EINTR); + return -EINTR; } /* pretend we didn't recognize this */ - return(-ENOIOCTLCMD); + return -ENOIOCTLCMD; case TCXONC: DGNC_UNLOCK(ch->ch_lock, lock_flags); /* Make the ld do it */ - return(-ENOIOCTLCMD); + return -ENOIOCTLCMD; case DIGI_GETA: /* get information for ditty */ DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(dgnc_tty_digigeta(tty, uarg)); + return dgnc_tty_digigeta(tty, uarg); case DIGI_SETAW: case DIGI_SETAF: @@ -3332,7 +3332,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, rc = ch->ch_bd->bd_ops->drain(tty, 0); if (rc) { DPR_IOCTL(("dgnc_tty_ioctl - bad return: %d ", rc)); - return(-EINTR); + return -EINTR; } DGNC_LOCK(ch->ch_lock, lock_flags); } @@ -3343,7 +3343,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, case DIGI_SETA: DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(dgnc_tty_digiseta(tty, uarg)); + return dgnc_tty_digiseta(tty, uarg); case DIGI_LOOPBACK: { @@ -3352,7 +3352,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DGNC_UNLOCK(ch->ch_lock, lock_flags); rc = get_user(loopback, (unsigned int __user *) arg); if (rc) - return(rc); + return rc; DGNC_LOCK(ch->ch_lock, lock_flags); /* Enable/disable internal loopback for this port */ @@ -3363,13 +3363,13 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, ch->ch_bd->bd_ops->param(tty); DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(0); + return 0; } case DIGI_GETCUSTOMBAUD: DGNC_UNLOCK(ch->ch_lock, lock_flags); rc = put_user(ch->ch_custom_speed, (unsigned int __user *) arg); - return(rc); + return rc; case DIGI_SETCUSTOMBAUD: { @@ -3378,12 +3378,12 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DGNC_UNLOCK(ch->ch_lock, lock_flags); rc = get_user(new_rate, (unsigned int __user *) arg); if (rc) - return(rc); + return rc; DGNC_LOCK(ch->ch_lock, lock_flags); dgnc_set_custom_speed(ch, new_rate); ch->ch_bd->bd_ops->param(tty); DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(0); + return 0; } /* @@ -3399,11 +3399,11 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DGNC_UNLOCK(ch->ch_lock, lock_flags); rc = get_user(c, (unsigned char __user *) arg); if (rc) - return(rc); + return rc; DGNC_LOCK(ch->ch_lock, lock_flags); ch->ch_bd->bd_ops->send_immediate_char(ch, c); DGNC_UNLOCK(ch->ch_lock, lock_flags); - return(0); + return 0; } /* @@ -3427,9 +3427,9 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DGNC_UNLOCK(ch->ch_lock, lock_flags); if (copy_to_user(uarg, &buf, sizeof(struct digi_getcounter))) { - return (-EFAULT); + return -EFAULT; } - return(0); + return 0; } /* @@ -3454,7 +3454,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DGNC_UNLOCK(ch->ch_lock, lock_flags); rc = put_user(events, (unsigned int __user *) arg); - return(rc); + return rc; } /* @@ -3475,7 +3475,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, * Get data from user first. */ if (copy_from_user(&buf, uarg, sizeof(struct digi_getbuffer))) { - return (-EFAULT); + return -EFAULT; } DGNC_LOCK(ch->ch_lock, lock_flags); @@ -3521,9 +3521,9 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DGNC_UNLOCK(ch->ch_lock, lock_flags); if (copy_to_user(uarg, &buf, sizeof(struct digi_getbuffer))) { - return (-EFAULT); + return -EFAULT; } - return(0); + return 0; } default: DGNC_UNLOCK(ch->ch_lock, lock_flags); @@ -3532,7 +3532,7 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DPR_IOCTL(("dgnc_tty_ioctl end - cmd %s (%x), arg %lx\n", dgnc_ioctl_name(cmd), cmd, arg)); - return(-ENOIOCTLCMD); + return -ENOIOCTLCMD; } DGNC_UNLOCK(ch->ch_lock, lock_flags); @@ -3540,5 +3540,5 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, DPR_IOCTL(("dgnc_tty_ioctl end - cmd %s (%x), arg %lx\n", dgnc_ioctl_name(cmd), cmd, arg)); - return(0); + return 0; } diff --git a/drivers/staging/dgnc/dgnc_tty.h b/drivers/staging/dgnc/dgnc_tty.h index deb388d..9d1c284 100644 --- a/drivers/staging/dgnc/dgnc_tty.h +++ b/drivers/staging/dgnc/dgnc_tty.h @@ -24,13 +24,13 @@ #include "dgnc_driver.h" -int dgnc_tty_register(struct board_t *brd); +int dgnc_tty_register(struct dgnc_board *brd); int dgnc_tty_preinit(void); -int dgnc_tty_init(struct board_t *); +int dgnc_tty_init(struct dgnc_board *); void dgnc_tty_post_uninit(void); -void dgnc_tty_uninit(struct board_t *); +void dgnc_tty_uninit(struct dgnc_board *); void dgnc_input(struct channel_t *ch); void dgnc_carrier(struct channel_t *ch); diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h index eb6e371..6a9adf6 100644 --- a/drivers/staging/dgnc/digi.h +++ b/drivers/staging/dgnc/digi.h @@ -201,9 +201,9 @@ struct shrink_buf_struct { unsigned int shrink_buf_vaddr; /* Virtual address of board */ unsigned int shrink_buf_phys; /* Physical address of board */ unsigned int shrink_buf_bseg; /* Amount of board memory */ - unsigned int shrink_buf_hseg; /* '186 Begining of Dual-Port */ + unsigned int shrink_buf_hseg; /* '186 Beginning of Dual-Port */ - unsigned int shrink_buf_lseg; /* '186 Begining of freed memory */ + unsigned int shrink_buf_lseg; /* '186 Beginning of freed memory */ unsigned int shrink_buf_mseg; /* Linear address from start of dual-port were freed memory begins, host viewpoint. */ |