X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Ftelephony%2Fixj.c;h=ec7aeb502d1548ecbfd64c521518c11857e308de;hb=8b805ef617cf0e02f6d18b891f8deb6246421b01;hp=c7b0a357b04a68f309cf0ef783c1d7406e99014b;hpb=31f6e1bd3b58c9a67e5ea0c2d372fbf5fc9e326d;p=linux-2.6-omap-h63xx.git diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c index c7b0a357b04..a913efc6966 100644 --- a/drivers/telephony/ixj.c +++ b/drivers/telephony/ixj.c @@ -42,8 +42,6 @@ ***************************************************************************/ /* - * $Log: ixj.c,v $ - * * Revision 4.8 2003/07/09 19:39:00 Daniele Bellucci * Audit some copy_*_user and minor cleanup. * @@ -2330,7 +2328,6 @@ static int ixj_release(struct inode *inode, struct file *file_p) j->rec_codec = j->play_codec = 0; j->rec_frame_size = j->play_frame_size = 0; j->flags.cidsent = j->flags.cidring = 0; - ixj_fasync(-1, file_p, 0); /* remove from list of async notification */ if(j->cardtype == QTI_LINEJACK && !j->readers && !j->writers) { ixj_set_port(j, PORT_PSTN); @@ -3453,7 +3450,6 @@ static void ixj_write_frame(IXJ *j) { int cnt, frame_count, dly; IXJ_WORD dat; - BYTES blankword; frame_count = 0; if(j->flags.cidplay) { @@ -3501,6 +3497,8 @@ static void ixj_write_frame(IXJ *j) } if (frame_count >= 1) { if (j->ver.low == 0x12 && j->play_mode && j->flags.play_first_frame) { + BYTES blankword; + switch (j->play_mode) { case PLAYBACK_MODE_ULAW: case PLAYBACK_MODE_ALAW: @@ -3508,6 +3506,7 @@ static void ixj_write_frame(IXJ *j) break; case PLAYBACK_MODE_8LINEAR: case PLAYBACK_MODE_16LINEAR: + default: blankword.low = blankword.high = 0x00; break; case PLAYBACK_MODE_8LINEAR_WSS: @@ -3531,6 +3530,8 @@ static void ixj_write_frame(IXJ *j) j->flags.play_first_frame = 0; } else if (j->play_codec == G723_63 && j->flags.play_first_frame) { for (cnt = 0; cnt < 24; cnt++) { + BYTES blankword; + if(cnt == 12) { blankword.low = 0x02; blankword.high = 0x00; @@ -4868,6 +4869,7 @@ static char daa_CR_read(IXJ *j, int cr) bytes.high = 0xB0 + cr; break; case SOP_PU_PULSEDIALING: + default: bytes.high = 0xF0 + cr; break; } @@ -6090,15 +6092,15 @@ static int capabilities_check(IXJ *j, struct phone_capability *pcreq) return retval; } -static int ixj_ioctl(struct inode *inode, struct file *file_p, unsigned int cmd, unsigned long arg) +static long do_ixj_ioctl(struct file *file_p, unsigned int cmd, unsigned long arg) { IXJ_TONE ti; IXJ_FILTER jf; IXJ_FILTER_RAW jfr; void __user *argp = (void __user *)arg; - - unsigned int raise, mant; + struct inode *inode = file_p->f_path.dentry->d_inode; unsigned int minor = iminor(inode); + unsigned int raise, mant; int board = NUM(inode); IXJ *j = get_ixj(NUM(inode)); @@ -6656,6 +6658,15 @@ static int ixj_ioctl(struct inode *inode, struct file *file_p, unsigned int cmd, return retval; } +static long ixj_ioctl(struct file *file_p, unsigned int cmd, unsigned long arg) +{ + long ret; + lock_kernel(); + ret = do_ixj_ioctl(file_p, cmd, arg); + unlock_kernel(); + return ret; +} + static int ixj_fasync(int fd, struct file *file_p, int mode) { IXJ *j = get_ixj(NUM(file_p->f_path.dentry->d_inode)); @@ -6669,7 +6680,7 @@ static const struct file_operations ixj_fops = .read = ixj_enhanced_read, .write = ixj_enhanced_write, .poll = ixj_poll, - .ioctl = ixj_ioctl, + .unlocked_ioctl = ixj_ioctl, .release = ixj_release, .fasync = ixj_fasync };