Skip to contentSkip to conversation

sound: Remove unused register_sound_midi() and co

PATCH New Takashi Iwai 1 participant 2 messages Jan 11, 2018 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sound: Remove unused register_sound_midi() and co

These helpers are no longer used after the removal of the legacy OSS drivers. Let's clean up.

---
 include/linux/sound.h |  2 --
 sound/sound_core.c    | 35 -----------------------------------
 2 files changed, 37 deletions(-)
include/linux/sound.h +0 -2
index 3c6d393c7f29..ec85b7a1f8d1 100644
@@ -12,11 +12,9 @@ struct device;
 extern int register_sound_special(const struct file_operations *fops, int unit);
 extern int register_sound_special_device(const struct file_operations *fops, int unit, struct device *dev);
 extern int register_sound_mixer(const struct file_operations *fops, int dev);
-extern int register_sound_midi(const struct file_operations *fops, int dev);
 extern int register_sound_dsp(const struct file_operations *fops, int dev);
 
 extern void unregister_sound_special(int unit);
 extern void unregister_sound_mixer(int unit);
-extern void unregister_sound_midi(int unit);
 extern void unregister_sound_dsp(int unit);
 #endif /* _LINUX_SOUND_H */
sound/sound_core.c +0 -35
index 99b73c675743..8b026b66cf18 100644
@@ -452,26 +452,6 @@ int register_sound_mixer(const struct file_operations *fops, int dev)
 
 EXPORT_SYMBOL(register_sound_mixer);
 
-/**
- *	register_sound_midi - register a midi device
- *	@fops: File operations for the driver
- *	@dev: Unit number to allocate
- *
- *	Allocate a midi device. Unit is the number of the midi device requested.
- *	Pass -1 to request the next free midi unit.
- *
- *	Return: On success, the allocated number is returned. On failure,
- *	a negative error code is returned.
- */
-
-int register_sound_midi(const struct file_operations *fops, int dev)
-{
-	return sound_insert_unit(&chains[2], fops, dev, 2, 130,
-				 "midi", S_IRUSR | S_IWUSR, NULL);
-}
-
-EXPORT_SYMBOL(register_sound_midi);
-
 /*
  *	DSP's are registered as a triple. Register only one and cheat
  *	in open - see below.
@@ -532,21 +512,6 @@ void unregister_sound_mixer(int unit)
 
 EXPORT_SYMBOL(unregister_sound_mixer);
 
-/**
- *	unregister_sound_midi - unregister a midi device
- *	@unit: unit number to allocate
- *
- *	Release a sound device that was allocated with register_sound_midi().
- *	The unit passed is the return value from the register function.
- */
-
-void unregister_sound_midi(int unit)
-{
-	sound_remove_unit(&chains[2], unit);
-}
-
-EXPORT_SYMBOL(unregister_sound_midi);
-
 /**
  *	unregister_sound_dsp - unregister a DSP device
  *	@unit: unit number to allocate
Signature · 1 line
2.15.1
#1 lore raw

PATCH 2/2 sound: Remove leftover msnd init declarations

Some obsoleted functions are still declared in sound_core.c. Get rid of them.

---
 sound/sound_core.c | 7 -------
 1 file changed, 7 deletions(-)
sound/sound_core.c +0 -7
index 8b026b66cf18..b4efb22db561 100644
@@ -119,13 +119,6 @@ struct sound_unit
 	char name[32];
 };
 
-#ifdef CONFIG_SOUND_MSNDCLAS
-extern int msnd_classic_init(void);
-#endif
-#ifdef CONFIG_SOUND_MSNDPIN
-extern int msnd_pinnacle_init(void);
-#endif
-
 /*
  * By default, OSS sound_core claims full legacy minor range (0-255)
  * of SOUND_MAJOR to trap open attempts to any sound minor and
Signature · 1 line
2.15.1