X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fali5455.c;h=3f3a456b3d7ef6727817d08bb3fa02075c93a9cf;hb=7b563c525e46f373a521421e31aa791cc27beb56;hp=a7e2c3c0a5fd6c2af284dc1fc7a5b7443deb0cf2;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/sound/oss/ali5455.c b/sound/oss/ali5455.c index a7e2c3c0a..3f3a456b3 100644 --- a/sound/oss/ali5455.c +++ b/sound/oss/ali5455.c @@ -1583,7 +1583,7 @@ static ssize_t ali_read(struct file *file, char __user *buffer, size_t count, loff_t * ppos) { struct ali_state *state = (struct ali_state *) file->private_data; - struct ali_card *card = state ? state->card : NULL; + struct ali_card *card = state ? state->card : 0; struct dmabuf *dmabuf = &state->dmabuf; ssize_t ret; unsigned long flags; @@ -1593,6 +1593,8 @@ static ssize_t ali_read(struct file *file, char __user *buffer, #ifdef DEBUG2 printk("ali_audio: ali_read called, count = %d\n", count); #endif + if (ppos != &file->f_pos) + return -ESPIPE; if (dmabuf->mapped) return -ENXIO; if (dmabuf->enable & DAC_RUNNING) @@ -1722,7 +1724,7 @@ static ssize_t ali_write(struct file *file, const char __user *buffer, size_t count, loff_t * ppos) { struct ali_state *state = (struct ali_state *) file->private_data; - struct ali_card *card = state ? state->card : NULL; + struct ali_card *card = state ? state->card : 0; struct dmabuf *dmabuf = &state->dmabuf; ssize_t ret; unsigned long flags; @@ -1732,6 +1734,8 @@ static ssize_t ali_write(struct file *file, #ifdef DEBUG2 printk("ali_audio: ali_write called, count = %d\n", count); #endif + if (ppos != &file->f_pos) + return -ESPIPE; if (dmabuf->mapped) return -ENXIO; if (dmabuf->enable & ADC_RUNNING) @@ -2886,7 +2890,7 @@ found_virt: state->open_mode |= file->f_mode & (FMODE_READ | FMODE_WRITE); outl(0x00000000, card->iobase + ALI_INTERRUPTCR); outl(0x00000000, card->iobase + ALI_INTERRUPTSR); - return nonseekable_open(inode, file); + return 0; } static int ali_release(struct inode *inode, struct file *file) @@ -3043,7 +3047,7 @@ static int ali_open_mixdev(struct inode *inode, struct file *file) if (card->ac97_codec[i] != NULL && card->ac97_codec[i]->dev_mixer == minor) { file->private_data = card->ac97_codec[i]; - return nonseekable_open(inode, file); + return 0; } } return -ENODEV;