Commit d8b3966e authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] const file_operations fallout

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent abf0437b
......@@ -1346,22 +1346,34 @@ static const struct file_operations sq_fops =
.ioctl = sq_ioctl,
.open = sq_open,
.release = sq_release,
};
#ifdef HAS_RECORD
.read = NULL /* default to no read for compat mode */
#endif
static const struct file_operations sq_fops_record =
{
.owner = THIS_MODULE,
.llseek = no_llseek,
.write = sq_write,
.poll = sq_poll,
.ioctl = sq_ioctl,
.open = sq_open,
.release = sq_release,
.read = sq_read,
};
#endif
static int sq_init(void)
{
const struct file_operations *fops = &sq_fops;
#ifndef MODULE
int sq_unit;
#endif
#ifdef HAS_RECORD
if (dmasound.mach.record)
sq_fops.read = sq_read ;
fops = &sq_fops_record;
#endif
sq_unit = register_sound_dsp(&sq_fops, -1);
sq_unit = register_sound_dsp(fops, -1);
if (sq_unit < 0) {
printk(KERN_ERR "dmasound_core: couldn't register fops\n") ;
return sq_unit ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment