aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/i4l/isdn_tty.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index 869885620c94..dfb83e68bd86 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -333,7 +333,7 @@ isdn_tty_countDLE(unsigned char *buf, int len)
333static int 333static int
334isdn_tty_handleDLEdown(modem_info *info, atemu *m, int len) 334isdn_tty_handleDLEdown(modem_info *info, atemu *m, int len)
335{ 335{
336 unsigned char *p = &info->xmit_buf[info->xmit_count]; 336 unsigned char *p = &info->port.xmit_buf[info->xmit_count];
337 int count = 0; 337 int count = 0;
338 338
339 while (len > 0) { 339 while (len > 0) {
@@ -477,7 +477,7 @@ isdn_tty_senddown(modem_info *info)
477 return; 477 return;
478 } 478 }
479 skb_reserve(skb, skb_res); 479 skb_reserve(skb, skb_res);
480 memcpy(skb_put(skb, buflen), info->xmit_buf, buflen); 480 memcpy(skb_put(skb, buflen), info->port.xmit_buf, buflen);
481 info->xmit_count = 0; 481 info->xmit_count = 0;
482#ifdef CONFIG_ISDN_AUDIO 482#ifdef CONFIG_ISDN_AUDIO
483 if (info->vonline & 2) { 483 if (info->vonline & 2) {
@@ -1152,7 +1152,7 @@ isdn_tty_write(struct tty_struct *tty, const u_char *buf, int count)
1152 isdn_tty_check_esc(buf, m->mdmreg[REG_ESC], c, 1152 isdn_tty_check_esc(buf, m->mdmreg[REG_ESC], c,
1153 &(m->pluscount), 1153 &(m->pluscount),
1154 &(m->lastplus)); 1154 &(m->lastplus));
1155 memcpy(&(info->xmit_buf[info->xmit_count]), buf, c); 1155 memcpy(&info->port.xmit_buf[info->xmit_count], buf, c);
1156#ifdef CONFIG_ISDN_AUDIO 1156#ifdef CONFIG_ISDN_AUDIO
1157 if (info->vonline) { 1157 if (info->vonline) {
1158 int cc = isdn_tty_handleDLEdown(info, m, c); 1158 int cc = isdn_tty_handleDLEdown(info, m, c);
@@ -1906,13 +1906,15 @@ isdn_tty_modem_init(void)
1906#ifdef CONFIG_ISDN_AUDIO 1906#ifdef CONFIG_ISDN_AUDIO
1907 skb_queue_head_init(&info->dtmf_queue); 1907 skb_queue_head_init(&info->dtmf_queue);
1908#endif 1908#endif
1909 if (!(info->xmit_buf = kmalloc(ISDN_SERIAL_XMIT_MAX + 5, GFP_KERNEL))) { 1909 info->port.xmit_buf = kmalloc(ISDN_SERIAL_XMIT_MAX + 5,
1910 GFP_KERNEL);
1911 if (!info->port.xmit_buf) {
1910 printk(KERN_ERR "Could not allocate modem xmit-buffer\n"); 1912 printk(KERN_ERR "Could not allocate modem xmit-buffer\n");
1911 retval = -ENOMEM; 1913 retval = -ENOMEM;
1912 goto err_unregister; 1914 goto err_unregister;
1913 } 1915 }
1914 /* Make room for T.70 header */ 1916 /* Make room for T.70 header */
1915 info->xmit_buf += 4; 1917 info->port.xmit_buf += 4;
1916 } 1918 }
1917 return 0; 1919 return 0;
1918err_unregister: 1920err_unregister:
@@ -1921,7 +1923,7 @@ err_unregister:
1921#ifdef CONFIG_ISDN_TTY_FAX 1923#ifdef CONFIG_ISDN_TTY_FAX
1922 kfree(info->fax); 1924 kfree(info->fax);
1923#endif 1925#endif
1924 kfree(info->xmit_buf - 4); 1926 kfree(info->port.xmit_buf - 4);
1925 } 1927 }
1926 tty_unregister_driver(m->tty_modem); 1928 tty_unregister_driver(m->tty_modem);
1927err: 1929err:
@@ -1942,7 +1944,7 @@ isdn_tty_exit(void)
1942#ifdef CONFIG_ISDN_TTY_FAX 1944#ifdef CONFIG_ISDN_TTY_FAX
1943 kfree(info->fax); 1945 kfree(info->fax);
1944#endif 1946#endif
1945 kfree(info->xmit_buf - 4); 1947 kfree(info->port.xmit_buf - 4);
1946 } 1948 }
1947 tty_unregister_driver(dev->mdm.tty_modem); 1949 tty_unregister_driver(dev->mdm.tty_modem);
1948 put_tty_driver(dev->mdm.tty_modem); 1950 put_tty_driver(dev->mdm.tty_modem);