diff options
-rwxr-xr-x | zaptel.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -3076,11 +3076,11 @@ static int zt_chanandpseudo_ioctl(struct inode *inode, struct file *file, unsign /* initialize read buffers and pointers */ chan->inreadbuf = 0; chan->outreadbuf = -1; -#if 0 - /* Do we need this? */ - chan->readn[0] = chan->readn[1] = 0; - chan->readidx[0] = chan->readidx[1] = 0; -#endif + for (j=0;j<chan->numbufs;j++) { + /* Do we need this? */ + chan->readn[j] = 0; + chan->readidx[j] = 0; + } wake_up_interruptible(&chan->readbufq); /* wake_up_interruptible waiting on read */ wake_up_interruptible(&chan->sel); /* wake_up_interruptible waiting on select */ } @@ -3089,11 +3089,11 @@ static int zt_chanandpseudo_ioctl(struct inode *inode, struct file *file, unsign /* initialize write buffers and pointers */ chan->outwritebuf = -1; chan->inwritebuf = 0; -#if 0 - /* Do we ned this? */ - chan->writen[0] = chan->writen[1] = 0; - chan->writeidx[0] = chan->writeidx[1] = 0; -#endif + for (j=0;j<chan->numbufs;j++) { + /* Do we need this? */ + chan->writen[j] = 0; + chan->writeidx[j] = 0; + } wake_up_interruptible(&chan->writebufq); /* wake_up_interruptible waiting on write */ wake_up_interruptible(&chan->sel); /* wake_up_interruptible waiting on select */ /* if IO MUX wait on write empty, well, this |