git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
sound
/
oss
/
esssolo1.c
diff --git
a/sound/oss/esssolo1.c
b/sound/oss/esssolo1.c
index
b5096b5
..
3e73405
100644
(file)
--- a/
sound/oss/esssolo1.c
+++ b/
sound/oss/esssolo1.c
@@
-445,7
+445,7
@@
static int prog_dmabuf(struct solo1_state *s, struct dmabuf *db)
if (!db->rawbuf)
return -ENOMEM;
db->buforder = order;
if (!db->rawbuf)
return -ENOMEM;
db->buforder = order;
- /* now mark the pages as reserved; otherwise remap_p
age
_range doesn't do what we want */
+ /* now mark the pages as reserved; otherwise remap_p
fn
_range doesn't do what we want */
pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
for (page = virt_to_page(db->rawbuf); page <= pend; page++)
SetPageReserved(page);
pend = virt_to_page(db->rawbuf + (PAGE_SIZE << db->buforder) - 1);
for (page = virt_to_page(db->rawbuf); page <= pend; page++)
SetPageReserved(page);
@@
-933,7
+933,7
@@
static int solo1_open_mixdev(struct inode *inode, struct file *file)
return -ENODEV;
VALIDATE_STATE(s);
file->private_data = s;
return -ENODEV;
VALIDATE_STATE(s);
file->private_data = s;
- return
0
;
+ return
nonseekable_open(inode, file)
;
}
static int solo1_release_mixdev(struct inode *inode, struct file *file)
}
static int solo1_release_mixdev(struct inode *inode, struct file *file)
@@
-1010,8
+1010,6
@@
static ssize_t solo1_read(struct file *file, char __user *buffer, size_t count,
int cnt;
VALIDATE_STATE(s);
int cnt;
VALIDATE_STATE(s);
- if (ppos != &file->f_pos)
- return -ESPIPE;
if (s->dma_adc.mapped)
return -ENXIO;
if (!s->dma_adc.ready && (ret = prog_dmabuf_adc(s)))
if (s->dma_adc.mapped)
return -ENXIO;
if (!s->dma_adc.ready && (ret = prog_dmabuf_adc(s)))
@@
-1106,8
+1104,6
@@
static ssize_t solo1_write(struct file *file, const char __user *buffer, size_t
int cnt;
VALIDATE_STATE(s);
int cnt;
VALIDATE_STATE(s);
- if (ppos != &file->f_pos)
- return -ESPIPE;
if (s->dma_dac.mapped)
return -ENXIO;
if (!s->dma_dac.ready && (ret = prog_dmabuf_dac(s)))
if (s->dma_dac.mapped)
return -ENXIO;
if (!s->dma_dac.ready && (ret = prog_dmabuf_dac(s)))
@@
-1246,7
+1242,9
@@
static int solo1_mmap(struct file *file, struct vm_area_struct *vma)
if (size > (PAGE_SIZE << db->buforder))
goto out;
ret = -EAGAIN;
if (size > (PAGE_SIZE << db->buforder))
goto out;
ret = -EAGAIN;
- if (remap_page_range(vma, vma->vm_start, virt_to_phys(db->rawbuf), size, vma->vm_page_prot))
+ if (remap_pfn_range(vma, vma->vm_start,
+ virt_to_phys(db->rawbuf) >> PAGE_SHIFT,
+ size, vma->vm_page_prot))
goto out;
db->mapped = 1;
ret = 0;
goto out;
db->mapped = 1;
ret = 0;
@@
-1647,7
+1645,7
@@
static int solo1_open(struct inode *inode, struct file *file)
s->open_mode |= file->f_mode & (FMODE_READ | FMODE_WRITE);
up(&s->open_sem);
prog_codec(s);
s->open_mode |= file->f_mode & (FMODE_READ | FMODE_WRITE);
up(&s->open_sem);
prog_codec(s);
- return
0
;
+ return
nonseekable_open(inode, file)
;
}
static /*const*/ struct file_operations solo1_audio_fops = {
}
static /*const*/ struct file_operations solo1_audio_fops = {
@@
-1740,8
+1738,6
@@
static ssize_t solo1_midi_read(struct file *file, char __user *buffer, size_t co
int cnt;
VALIDATE_STATE(s);
int cnt;
VALIDATE_STATE(s);
- if (ppos != &file->f_pos)
- return -ESPIPE;
if (!access_ok(VERIFY_WRITE, buffer, count))
return -EFAULT;
if (count == 0)
if (!access_ok(VERIFY_WRITE, buffer, count))
return -EFAULT;
if (count == 0)
@@
-1803,8
+1799,6
@@
static ssize_t solo1_midi_write(struct file *file, const char __user *buffer, si
int cnt;
VALIDATE_STATE(s);
int cnt;
VALIDATE_STATE(s);
- if (ppos != &file->f_pos)
- return -ESPIPE;
if (!access_ok(VERIFY_READ, buffer, count))
return -EFAULT;
if (count == 0)
if (!access_ok(VERIFY_READ, buffer, count))
return -EFAULT;
if (count == 0)
@@
-1951,7
+1945,7
@@
static int solo1_midi_open(struct inode *inode, struct file *file)
spin_unlock_irqrestore(&s->lock, flags);
s->open_mode |= (file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ | FMODE_MIDI_WRITE);
up(&s->open_sem);
spin_unlock_irqrestore(&s->lock, flags);
s->open_mode |= (file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ | FMODE_MIDI_WRITE);
up(&s->open_sem);
- return
0
;
+ return
nonseekable_open(inode, file)
;
}
static int solo1_midi_release(struct inode *inode, struct file *file)
}
static int solo1_midi_release(struct inode *inode, struct file *file)
@@
-2161,7
+2155,7
@@
static int solo1_dmfm_open(struct inode *inode, struct file *file)
outb(1, s->sbbase+3); /* enable OPL3 */
s->open_mode |= FMODE_DMFM;
up(&s->open_sem);
outb(1, s->sbbase+3); /* enable OPL3 */
s->open_mode |= FMODE_DMFM;
up(&s->open_sem);
- return
0
;
+ return
nonseekable_open(inode, file)
;
}
static int solo1_dmfm_release(struct inode *inode, struct file *file)
}
static int solo1_dmfm_release(struct inode *inode, struct file *file)
@@
-2459,11
+2453,7
@@
static struct pci_driver solo1_driver = {
static int __init init_solo1(void)
{
printk(KERN_INFO "solo1: version v0.20 time " __TIME__ " " __DATE__ "\n");
static int __init init_solo1(void)
{
printk(KERN_INFO "solo1: version v0.20 time " __TIME__ " " __DATE__ "\n");
- if (!pci_register_driver(&solo1_driver)) {
- pci_unregister_driver(&solo1_driver);
- return -ENODEV;
- }
- return 0;
+ return pci_register_driver(&solo1_driver);
}
/* --------------------------------------------------------------------- */
}
/* --------------------------------------------------------------------- */