diff options
author | Paul Mackerras <paulus@samba.org> | 2007-04-12 13:50:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-12 13:50:03 -0400 |
commit | e049d1ca3094f3d1d94617f456a9961202f96e3a (patch) | |
tree | a30397ad22f2fbea268bd28fa69c60aad9dfa62a /sound/oss | |
parent | edfac96a92b88d3b0b53e3f8231b74beee9ecd1d (diff) | |
parent | 80584ff3b99c36ead7e130e453b3a48b18072d18 (diff) |
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'sound/oss')
-rw-r--r-- | sound/oss/dmasound/dmasound_core.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index a0ec886f2aa3..f4056a9c371b 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 */ | 1352 | static 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 | ||
1354 | static int sq_init(void) | 1365 | static 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 ; |