hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/sound/oss/dmasound/dmasound_core.c
....@@ -206,12 +206,10 @@
206206
207207 MODULE_LICENSE("GPL");
208208
209
-#ifdef MODULE
210209 static int sq_unit = -1;
211210 static int mixer_unit = -1;
212211 static int state_unit = -1;
213212 static int irq_installed;
214
-#endif /* MODULE */
215213
216214 /* control over who can modify resources shared between play/record */
217215 static fmode_t shared_resource_owner;
....@@ -391,9 +389,6 @@
391389
392390 static void mixer_init(void)
393391 {
394
-#ifndef MODULE
395
- int mixer_unit;
396
-#endif
397392 mixer_unit = register_sound_mixer(&mixer_fops, -1);
398393 if (mixer_unit < 0)
399394 return;
....@@ -1176,9 +1171,6 @@
11761171 static int sq_init(void)
11771172 {
11781173 const struct file_operations *fops = &sq_fops;
1179
-#ifndef MODULE
1180
- int sq_unit;
1181
-#endif
11821174
11831175 sq_unit = register_sound_dsp(fops, -1);
11841176 if (sq_unit < 0) {
....@@ -1380,9 +1372,6 @@
13801372
13811373 static int state_init(void)
13821374 {
1383
-#ifndef MODULE
1384
- int state_unit;
1385
-#endif
13861375 state_unit = register_sound_special(&state_fops, SND_DEV_STATUS);
13871376 if (state_unit < 0)
13881377 return state_unit ;
....@@ -1400,10 +1389,9 @@
14001389 int dmasound_init(void)
14011390 {
14021391 int res ;
1403
-#ifdef MODULE
1392
+
14041393 if (irq_installed)
14051394 return -EBUSY;
1406
-#endif
14071395
14081396 /* Set up sound queue, /dev/audio and /dev/dsp. */
14091397
....@@ -1422,9 +1410,7 @@
14221410 printk(KERN_ERR "DMA sound driver: Interrupt initialization failed\n");
14231411 return -ENODEV;
14241412 }
1425
-#ifdef MODULE
14261413 irq_installed = 1;
1427
-#endif
14281414
14291415 printk(KERN_INFO "%s DMA sound driver rev %03d installed\n",
14301416 dmasound.mach.name, (DMASOUND_CORE_REVISION<<4) +
....@@ -1437,8 +1423,6 @@
14371423 numWriteBufs, writeBufSize) ;
14381424 return 0;
14391425 }
1440
-
1441
-#ifdef MODULE
14421426
14431427 void dmasound_deinit(void)
14441428 {
....@@ -1458,9 +1442,7 @@
14581442 unregister_sound_dsp(sq_unit);
14591443 }
14601444
1461
-#else /* !MODULE */
1462
-
1463
-static int dmasound_setup(char *str)
1445
+static int __maybe_unused dmasound_setup(char *str)
14641446 {
14651447 int ints[6], size;
14661448
....@@ -1502,8 +1484,6 @@
15021484 }
15031485
15041486 __setup("dmasound=", dmasound_setup);
1505
-
1506
-#endif /* !MODULE */
15071487
15081488 /*
15091489 * Conversion tables
....@@ -1591,9 +1571,7 @@
15911571
15921572 EXPORT_SYMBOL(dmasound);
15931573 EXPORT_SYMBOL(dmasound_init);
1594
-#ifdef MODULE
15951574 EXPORT_SYMBOL(dmasound_deinit);
1596
-#endif
15971575 EXPORT_SYMBOL(dmasound_write_sq);
15981576 EXPORT_SYMBOL(dmasound_catchRadius);
15991577 #ifdef HAS_8BIT_TABLES