aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-03-14 05:04:31 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-14 18:27:48 -0400
commitd8b3966e4c976dbf5f2fbe693b381305f7911e3d (patch)
tree7a9358f3c19da016760cac6f704a546aac4bf2cf /sound/oss
parentabf0437b420b1476b9afd56af69d1a725f51359c (diff)
[PATCH] const file_operations fallout
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/oss')
-rw-r--r--sound/oss/dmasound/dmasound_core.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
index a0ec886f2aa..f4056a9c371 100644
--- a/sound/oss/dmasound/dmasound_core.c
+++ b/sound/oss/dmasound/dmasound_core.c
@@ -1346,22 +1346,34 @@ static const struct file_operations sq_fops =
1346 .ioctl = sq_ioctl, 1346 .ioctl = sq_ioctl,
1347 .open = sq_open, 1347 .open = sq_open,
1348 .release = sq_release, 1348 .release = sq_release,
1349};
1350
1349#ifdef HAS_RECORD 1351#ifdef HAS_RECORD
1350 .read = NULL /* default to no read for compat mode */ 1352static const struct file_operations sq_fops_record =
1351#endif 1353{
1354 .owner = THIS_MODULE,
1355 .llseek = no_llseek,
1356 .write = sq_write,
1357 .poll = sq_poll,
1358 .ioctl = sq_ioctl,
1359 .open = sq_open,
1360 .release = sq_release,
1361 .read = sq_read,
1352}; 1362};
1363#endif
1353 1364
1354static int sq_init(void) 1365static int sq_init(void)
1355{ 1366{
1367 const struct file_operations *fops = &sq_fops;
1356#ifndef MODULE 1368#ifndef MODULE
1357 int sq_unit; 1369 int sq_unit;
1358#endif 1370#endif
1359 1371
1360#ifdef HAS_RECORD 1372#ifdef HAS_RECORD
1361 if (dmasound.mach.record) 1373 if (dmasound.mach.record)
1362 sq_fops.read = sq_read ; 1374 fops = &sq_fops_record;
1363#endif 1375#endif
1364 sq_unit = register_sound_dsp(&sq_fops, -1); 1376 sq_unit = register_sound_dsp(fops, -1);
1365 if (sq_unit < 0) { 1377 if (sq_unit < 0) {
1366 printk(KERN_ERR "dmasound_core: couldn't register fops\n") ; 1378 printk(KERN_ERR "dmasound_core: couldn't register fops\n") ;
1367 return sq_unit ; 1379 return sq_unit ;