X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Ftrident.c;h=8395501af2ae140988e76f666f38bff192a3fd2d;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=ed04f4007c2d0fbc6231656a5bfeb7951d1c9536;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/sound/oss/trident.c b/sound/oss/trident.c index ed04f4007..8395501af 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c @@ -217,7 +217,6 @@ #include #include #include -#include #include #include @@ -1282,7 +1281,7 @@ alloc_dmabuf(struct dmabuf *dmabuf, struct pci_dev *pci_dev, int order) dmabuf->buforder = order; /* now mark the pages as reserved; otherwise */ - /* remap_page_range doesn't do what we want */ + /* remap_pfn_range doesn't do what we want */ pend = virt_to_page(rawbuf + (PAGE_SIZE << order) - 1); for (page = virt_to_page(rawbuf); page <= pend; page++) SetPageReserved(page); @@ -1874,8 +1873,6 @@ trident_read(struct file *file, char __user *buffer, size_t count, loff_t * ppos pr_debug("trident: trident_read called, count = %d\n", count); VALIDATE_STATE(state); - if (ppos != &file->f_pos) - return -ESPIPE; if (dmabuf->mapped) return -ENXIO; @@ -1992,8 +1989,6 @@ trident_write(struct file *file, const char __user *buffer, size_t count, loff_t pr_debug("trident: trident_write called, count = %d\n", count); VALIDATE_STATE(state); - if (ppos != &file->f_pos) - return -ESPIPE; /* * Guard against an mmap or ioctl while writing @@ -2228,7 +2223,8 @@ trident_mmap(struct file *file, struct vm_area_struct *vma) if (size > (PAGE_SIZE << dmabuf->buforder)) goto out; ret = -EAGAIN; - if (remap_page_range(vma, vma->vm_start, virt_to_phys(dmabuf->rawbuf), + if (remap_pfn_range(vma, vma->vm_start, + virt_to_phys(dmabuf->rawbuf) >> PAGE_SHIFT, size, vma->vm_page_prot)) goto out; dmabuf->mapped = 1; @@ -2823,7 +2819,7 @@ trident_open(struct inode *inode, struct file *file) pr_debug("trident: open virtual channel %d, hard channel %d\n", state->virt, dmabuf->channel->num); - return 0; + return nonseekable_open(inode, file); } static int @@ -4018,7 +4014,8 @@ ali_free_other_states_resources(struct trident_state *state) } } -struct proc_dir_entry *res; +static struct proc_dir_entry *res; + static int ali_write_proc(struct file *file, const char __user *buffer, unsigned long count, void *data) { @@ -4079,7 +4076,7 @@ trident_open_mixdev(struct inode *inode, struct file *file) match: file->private_data = card->ac97_codec[i]; - return 0; + return nonseekable_open(inode, file); } static int @@ -4599,11 +4596,7 @@ trident_init_module(void) "5050 PCI Audio, version " DRIVER_VERSION ", " __TIME__ " " __DATE__ "\n"); - if (!pci_register_driver(&trident_pci_driver)) { - pci_unregister_driver(&trident_pci_driver); - return -ENODEV; - } - return 0; + return pci_register_driver(&trident_pci_driver); } static void __exit