aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/nozomi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/nozomi.c')
-rw-r--r--drivers/char/nozomi.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index d3400b20444f..0f39bec28b45 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -358,7 +358,7 @@ struct port {
358 u8 update_flow_control; 358 u8 update_flow_control;
359 struct ctrl_ul ctrl_ul; 359 struct ctrl_ul ctrl_ul;
360 struct ctrl_dl ctrl_dl; 360 struct ctrl_dl ctrl_dl;
361 struct kfifo *fifo_ul; 361 struct kfifo fifo_ul;
362 void __iomem *dl_addr[2]; 362 void __iomem *dl_addr[2];
363 u32 dl_size[2]; 363 u32 dl_size[2];
364 u8 toggle_dl; 364 u8 toggle_dl;
@@ -685,8 +685,8 @@ static int nozomi_read_config_table(struct nozomi *dc)
685 dump_table(dc); 685 dump_table(dc);
686 686
687 for (i = PORT_MDM; i < MAX_PORT; i++) { 687 for (i = PORT_MDM; i < MAX_PORT; i++) {
688 dc->port[i].fifo_ul = 688 kfifo_alloc(&dc->port[i].fifo_ul,
689 kfifo_alloc(FIFO_BUFFER_SIZE_UL, GFP_ATOMIC, NULL); 689 FIFO_BUFFER_SIZE_UL, GFP_ATOMIC, NULL);
690 memset(&dc->port[i].ctrl_dl, 0, sizeof(struct ctrl_dl)); 690 memset(&dc->port[i].ctrl_dl, 0, sizeof(struct ctrl_dl));
691 memset(&dc->port[i].ctrl_ul, 0, sizeof(struct ctrl_ul)); 691 memset(&dc->port[i].ctrl_ul, 0, sizeof(struct ctrl_ul));
692 } 692 }
@@ -798,7 +798,7 @@ static int send_data(enum port_type index, struct nozomi *dc)
798 struct tty_struct *tty = tty_port_tty_get(&port->port); 798 struct tty_struct *tty = tty_port_tty_get(&port->port);
799 799
800 /* Get data from tty and place in buf for now */ 800 /* Get data from tty and place in buf for now */
801 size = __kfifo_get(port->fifo_ul, dc->send_buf, 801 size = __kfifo_get(&port->fifo_ul, dc->send_buf,
802 ul_size < SEND_BUF_MAX ? ul_size : SEND_BUF_MAX); 802 ul_size < SEND_BUF_MAX ? ul_size : SEND_BUF_MAX);
803 803
804 if (size == 0) { 804 if (size == 0) {
@@ -988,11 +988,11 @@ static int receive_flow_control(struct nozomi *dc)
988 988
989 } else if (old_ctrl.CTS == 0 && ctrl_dl.CTS == 1) { 989 } else if (old_ctrl.CTS == 0 && ctrl_dl.CTS == 1) {
990 990
991 if (__kfifo_len(dc->port[port].fifo_ul)) { 991 if (__kfifo_len(&dc->port[port].fifo_ul)) {
992 DBG1("Enable interrupt (0x%04X) on port: %d", 992 DBG1("Enable interrupt (0x%04X) on port: %d",
993 enable_ier, port); 993 enable_ier, port);
994 DBG1("Data in buffer [%d], enable transmit! ", 994 DBG1("Data in buffer [%d], enable transmit! ",
995 __kfifo_len(dc->port[port].fifo_ul)); 995 __kfifo_len(&dc->port[port].fifo_ul));
996 enable_transmit_ul(port, dc); 996 enable_transmit_ul(port, dc);
997 } else { 997 } else {
998 DBG1("No data in buffer..."); 998 DBG1("No data in buffer...");
@@ -1536,8 +1536,7 @@ static void __devexit nozomi_card_exit(struct pci_dev *pdev)
1536 free_irq(pdev->irq, dc); 1536 free_irq(pdev->irq, dc);
1537 1537
1538 for (i = 0; i < MAX_PORT; i++) 1538 for (i = 0; i < MAX_PORT; i++)
1539 if (dc->port[i].fifo_ul) 1539 kfifo_free(&dc->port[i].fifo_ul);
1540 kfifo_free(dc->port[i].fifo_ul);
1541 1540
1542 kfree(dc->send_buf); 1541 kfree(dc->send_buf);
1543 1542
@@ -1673,7 +1672,7 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
1673 goto exit; 1672 goto exit;
1674 } 1673 }
1675 1674
1676 rval = __kfifo_put(port->fifo_ul, (unsigned char *)buffer, count); 1675 rval = __kfifo_put(&port->fifo_ul, (unsigned char *)buffer, count);
1677 1676
1678 /* notify card */ 1677 /* notify card */
1679 if (unlikely(dc == NULL)) { 1678 if (unlikely(dc == NULL)) {
@@ -1721,7 +1720,7 @@ static int ntty_write_room(struct tty_struct *tty)
1721 if (!port->port.count) 1720 if (!port->port.count)
1722 goto exit; 1721 goto exit;
1723 1722
1724 room = port->fifo_ul->size - __kfifo_len(port->fifo_ul); 1723 room = port->fifo_ul.size - __kfifo_len(&port->fifo_ul);
1725 1724
1726exit: 1725exit:
1727 mutex_unlock(&port->tty_sem); 1726 mutex_unlock(&port->tty_sem);
@@ -1878,7 +1877,7 @@ static s32 ntty_chars_in_buffer(struct tty_struct *tty)
1878 goto exit_in_buffer; 1877 goto exit_in_buffer;
1879 } 1878 }
1880 1879
1881 rval = __kfifo_len(port->fifo_ul); 1880 rval = __kfifo_len(&port->fifo_ul);
1882 1881
1883exit_in_buffer: 1882exit_in_buffer:
1884 return rval; 1883 return rval;