X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fymfpci.c;h=13bcc7621cf8d197d594d11a5056e03b60c1877b;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=7b3236fed7416f3b084413d4b53c1daa97af8ce0;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c index 7b3236fed..13bcc7621 100644 --- a/sound/oss/ymfpci.c +++ b/sound/oss/ymfpci.c @@ -1231,8 +1231,6 @@ ymf_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) unsigned int swptr; int cnt; /* This many to go in this revolution */ - if (ppos != &file->f_pos) - return -ESPIPE; if (dmabuf->mapped) return -ENXIO; if (!dmabuf->ready && (ret = prog_dmabuf(state, 1))) @@ -1350,8 +1348,6 @@ ymf_write(struct file *file, const char __user *buffer, size_t count, loff_t *pp YMFDBGW("ymf_write: count %d\n", count); - if (ppos != &file->f_pos) - return -ESPIPE; if (dmabuf->mapped) return -ENXIO; if (!dmabuf->ready && (ret = prog_dmabuf(state, 0))) @@ -1965,7 +1961,7 @@ static int ymf_open(struct inode *inode, struct file *file) #endif up(&unit->open_sem); - return 0; + return nonseekable_open(inode, file); out_nodma: /* @@ -2043,7 +2039,7 @@ static int ymf_open_mixdev(struct inode *inode, struct file *file) match: file->private_data = unit->ac97_codec[i]; - return 0; + return nonseekable_open(inode, file); } static int ymf_ioctl_mixdev(struct inode *inode, struct file *file, @@ -2365,7 +2361,8 @@ static int ymfpci_memalloc(ymfpci_t *codec) codec->dma_area_ba = pba; codec->dma_area_size = size + 0xff; - if ((off = ((uint) ptr) & 0xff) != 0) { + off = (unsigned long)ptr & 0xff; + if (off) { ptr += 0x100 - off; pba += 0x100 - off; }