.. | .. |
---|
206 | 206 | |
---|
207 | 207 | MODULE_LICENSE("GPL"); |
---|
208 | 208 | |
---|
209 | | -#ifdef MODULE |
---|
210 | 209 | static int sq_unit = -1; |
---|
211 | 210 | static int mixer_unit = -1; |
---|
212 | 211 | static int state_unit = -1; |
---|
213 | 212 | static int irq_installed; |
---|
214 | | -#endif /* MODULE */ |
---|
215 | 213 | |
---|
216 | 214 | /* control over who can modify resources shared between play/record */ |
---|
217 | 215 | static fmode_t shared_resource_owner; |
---|
.. | .. |
---|
391 | 389 | |
---|
392 | 390 | static void mixer_init(void) |
---|
393 | 391 | { |
---|
394 | | -#ifndef MODULE |
---|
395 | | - int mixer_unit; |
---|
396 | | -#endif |
---|
397 | 392 | mixer_unit = register_sound_mixer(&mixer_fops, -1); |
---|
398 | 393 | if (mixer_unit < 0) |
---|
399 | 394 | return; |
---|
.. | .. |
---|
1176 | 1171 | static int sq_init(void) |
---|
1177 | 1172 | { |
---|
1178 | 1173 | const struct file_operations *fops = &sq_fops; |
---|
1179 | | -#ifndef MODULE |
---|
1180 | | - int sq_unit; |
---|
1181 | | -#endif |
---|
1182 | 1174 | |
---|
1183 | 1175 | sq_unit = register_sound_dsp(fops, -1); |
---|
1184 | 1176 | if (sq_unit < 0) { |
---|
.. | .. |
---|
1380 | 1372 | |
---|
1381 | 1373 | static int state_init(void) |
---|
1382 | 1374 | { |
---|
1383 | | -#ifndef MODULE |
---|
1384 | | - int state_unit; |
---|
1385 | | -#endif |
---|
1386 | 1375 | state_unit = register_sound_special(&state_fops, SND_DEV_STATUS); |
---|
1387 | 1376 | if (state_unit < 0) |
---|
1388 | 1377 | return state_unit ; |
---|
.. | .. |
---|
1400 | 1389 | int dmasound_init(void) |
---|
1401 | 1390 | { |
---|
1402 | 1391 | int res ; |
---|
1403 | | -#ifdef MODULE |
---|
| 1392 | + |
---|
1404 | 1393 | if (irq_installed) |
---|
1405 | 1394 | return -EBUSY; |
---|
1406 | | -#endif |
---|
1407 | 1395 | |
---|
1408 | 1396 | /* Set up sound queue, /dev/audio and /dev/dsp. */ |
---|
1409 | 1397 | |
---|
.. | .. |
---|
1422 | 1410 | printk(KERN_ERR "DMA sound driver: Interrupt initialization failed\n"); |
---|
1423 | 1411 | return -ENODEV; |
---|
1424 | 1412 | } |
---|
1425 | | -#ifdef MODULE |
---|
1426 | 1413 | irq_installed = 1; |
---|
1427 | | -#endif |
---|
1428 | 1414 | |
---|
1429 | 1415 | printk(KERN_INFO "%s DMA sound driver rev %03d installed\n", |
---|
1430 | 1416 | dmasound.mach.name, (DMASOUND_CORE_REVISION<<4) + |
---|
.. | .. |
---|
1437 | 1423 | numWriteBufs, writeBufSize) ; |
---|
1438 | 1424 | return 0; |
---|
1439 | 1425 | } |
---|
1440 | | - |
---|
1441 | | -#ifdef MODULE |
---|
1442 | 1426 | |
---|
1443 | 1427 | void dmasound_deinit(void) |
---|
1444 | 1428 | { |
---|
.. | .. |
---|
1458 | 1442 | unregister_sound_dsp(sq_unit); |
---|
1459 | 1443 | } |
---|
1460 | 1444 | |
---|
1461 | | -#else /* !MODULE */ |
---|
1462 | | - |
---|
1463 | | -static int dmasound_setup(char *str) |
---|
| 1445 | +static int __maybe_unused dmasound_setup(char *str) |
---|
1464 | 1446 | { |
---|
1465 | 1447 | int ints[6], size; |
---|
1466 | 1448 | |
---|
.. | .. |
---|
1502 | 1484 | } |
---|
1503 | 1485 | |
---|
1504 | 1486 | __setup("dmasound=", dmasound_setup); |
---|
1505 | | - |
---|
1506 | | -#endif /* !MODULE */ |
---|
1507 | 1487 | |
---|
1508 | 1488 | /* |
---|
1509 | 1489 | * Conversion tables |
---|
.. | .. |
---|
1591 | 1571 | |
---|
1592 | 1572 | EXPORT_SYMBOL(dmasound); |
---|
1593 | 1573 | EXPORT_SYMBOL(dmasound_init); |
---|
1594 | | -#ifdef MODULE |
---|
1595 | 1574 | EXPORT_SYMBOL(dmasound_deinit); |
---|
1596 | | -#endif |
---|
1597 | 1575 | EXPORT_SYMBOL(dmasound_write_sq); |
---|
1598 | 1576 | EXPORT_SYMBOL(dmasound_catchRadius); |
---|
1599 | 1577 | #ifdef HAS_8BIT_TABLES |
---|