ALSA: Drop unused name argument in snd_register_oss_device()
authorTakashi Iwai <tiwai@suse.de>
Tue, 4 Feb 2014 12:51:45 +0000 (13:51 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 12 Feb 2014 09:58:19 +0000 (10:58 +0100)
The last argument, name, of snd_oss_register_device() is nowhere
referred in the function in the current code.  Let's drop it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/core.h
include/sound/hwdep.h
sound/core/hwdep.c
sound/core/oss/mixer_oss.c
sound/core/oss/pcm_oss.c
sound/core/rawmidi.c
sound/core/seq/oss/seq_oss.c
sound/core/seq/oss/seq_oss_device.h
sound/core/sound_oss.c
sound/drivers/opl3/opl3_lib.c

index 2a14f1f02d4f6766e236b288f6173ee7391e78a2..d0cee2c8c04f8da4abe8d9025b243a5576a72022 100644 (file)
@@ -249,8 +249,7 @@ int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev,
 
 #ifdef CONFIG_SND_OSSEMUL
 int snd_register_oss_device(int type, struct snd_card *card, int dev,
-                           const struct file_operations *f_ops, void *private_data,
-                           const char *name);
+                           const struct file_operations *f_ops, void *private_data);
 int snd_unregister_oss_device(int type, struct snd_card *card, int dev);
 void *snd_lookup_oss_minor_data(unsigned int minor, int type);
 #endif
index 8c05e47a409053c69ddec36b60aee44b84907330..6233eb092d0aeac9a3eab481de6e37d4bac34cb4 100644 (file)
@@ -60,7 +60,6 @@ struct snd_hwdep {
        int iface;
 
 #ifdef CONFIG_SND_OSSEMUL
-       char oss_dev[32];
        int oss_type;
        int ossreg;
 #endif
index d105073298cb536148214fd04edb318220825e13..0f73f6951110b00cbeb1cbccdb08825f2a2ff0db 100644 (file)
@@ -442,8 +442,7 @@ static int snd_hwdep_dev_register(struct snd_device *device)
                } else {
                        if (snd_register_oss_device(hwdep->oss_type,
                                                    hwdep->card, hwdep->device,
-                                                   &snd_hwdep_f_ops, hwdep,
-                                                   hwdep->oss_dev) < 0) {
+                                                   &snd_hwdep_f_ops, hwdep) < 0) {
                                snd_printk(KERN_ERR "unable to register OSS compatibility device %i:%i\n",
                                           hwdep->card->number, hwdep->device);
                        } else
index e8a1d18774b2073f997746f6d6f16881a1ecc4bc..fcb810142a4976af3a3ec09abe32c5e354373e46 100644 (file)
@@ -1343,18 +1343,15 @@ static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd)
        struct snd_mixer_oss *mixer;
 
        if (cmd == SND_MIXER_OSS_NOTIFY_REGISTER) {
-               char name[128];
                int idx, err;
 
                mixer = kcalloc(2, sizeof(*mixer), GFP_KERNEL);
                if (mixer == NULL)
                        return -ENOMEM;
                mutex_init(&mixer->reg_mutex);
-               sprintf(name, "mixer%i%i", card->number, 0);
                if ((err = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER,
                                                   card, 0,
-                                                  &snd_mixer_oss_f_ops, card,
-                                                  name)) < 0) {
+                                                  &snd_mixer_oss_f_ops, card)) < 0) {
                        snd_printk(KERN_ERR "unable to register OSS mixer device %i:%i\n",
                                   card->number, 0);
                        kfree(mixer);
@@ -1365,7 +1362,8 @@ static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd)
                if (*card->mixername)
                        strlcpy(mixer->name, card->mixername, sizeof(mixer->name));
                else
-                       strlcpy(mixer->name, name, sizeof(mixer->name));
+                       snprintf(mixer->name, sizeof(mixer->name),
+                                "mixer%i", card->number);
 #ifdef SNDRV_OSS_INFO_DEV_MIXERS
                snd_oss_info_register(SNDRV_OSS_INFO_DEV_MIXERS,
                                      card->number,
index 4c1cc51772e6f18e9ab03671069c738471ca8c04..c893493723853b601a0177ac1e28fd82359fee79 100644 (file)
@@ -3007,11 +3007,9 @@ static const struct file_operations snd_pcm_oss_f_reg =
 
 static void register_oss_dsp(struct snd_pcm *pcm, int index)
 {
-       char name[128];
-       sprintf(name, "dsp%i%i", pcm->card->number, pcm->device);
        if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
                                    pcm->card, index, &snd_pcm_oss_f_reg,
-                                   pcm, name) < 0) {
+                                   pcm) < 0) {
                snd_printk(KERN_ERR "unable to register OSS PCM device %i:%i\n",
                           pcm->card->number, pcm->device);
        }
index f016be72b100eeb03ab0d3e5539b44e5e7667460..f6c12a2b019cace56eb49e248655706d4e940a02 100644 (file)
@@ -1574,7 +1574,7 @@ static int snd_rawmidi_dev_register(struct snd_device *device)
        if ((int)rmidi->device == midi_map[rmidi->card->number]) {
                if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI,
                                            rmidi->card, 0, &snd_rawmidi_f_ops,
-                                           rmidi, name) < 0) {
+                                           rmidi) < 0) {
                        snd_printk(KERN_ERR "unable to register OSS rawmidi device %i:%i\n", rmidi->card->number, 0);
                } else {
                        rmidi->ossreg++;
@@ -1586,7 +1586,7 @@ static int snd_rawmidi_dev_register(struct snd_device *device)
        if ((int)rmidi->device == amidi_map[rmidi->card->number]) {
                if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI,
                                            rmidi->card, 1, &snd_rawmidi_f_ops,
-                                           rmidi, name) < 0) {
+                                           rmidi) < 0) {
                        snd_printk(KERN_ERR "unable to register OSS rawmidi device %i:%i\n", rmidi->card->number, 1);
                } else {
                        rmidi->ossreg++;
index 8d4d5e853efec94716cf5585a94321c097144eb9..fef2d8275d0acec0e23c7e73ab1556d08ac899e8 100644 (file)
@@ -231,16 +231,14 @@ register_device(void)
        mutex_lock(&register_mutex);
        if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER,
                                          NULL, 0,
-                                         &seq_oss_f_ops, NULL,
-                                         SNDRV_SEQ_OSS_DEVNAME)) < 0) {
+                                         &seq_oss_f_ops, NULL)) < 0) {
                snd_printk(KERN_ERR "can't register device seq\n");
                mutex_unlock(&register_mutex);
                return rc;
        }
        if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC,
                                          NULL, 0,
-                                         &seq_oss_f_ops, NULL,
-                                         SNDRV_SEQ_OSS_DEVNAME)) < 0) {
+                                         &seq_oss_f_ops, NULL)) < 0) {
                snd_printk(KERN_ERR "can't register device music\n");
                snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0);
                mutex_unlock(&register_mutex);
index c0154a959d55373969c0e4eb608099f1e71098a7..07e3ea133b56fc05dc600379ca84630fa472094f 100644 (file)
@@ -46,7 +46,6 @@
 #define SNDRV_SEQ_OSS_VERSION_STR      "0.1.8"
 
 /* device and proc interface name */
-#define SNDRV_SEQ_OSS_DEVNAME          "seq_oss"
 #define SNDRV_SEQ_OSS_PROCNAME         "oss"
 
 
index 5391c5e139ef45ccea7519da9c0f662b09d96123..b19184d45f19ffea951e956cdce16fc54539b3e1 100644 (file)
@@ -105,8 +105,7 @@ static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev)
 }
 
 int snd_register_oss_device(int type, struct snd_card *card, int dev,
-                           const struct file_operations *f_ops, void *private_data,
-                           const char *name)
+                           const struct file_operations *f_ops, void *private_data)
 {
        int minor = snd_oss_kernel_minor(type, card, dev);
        int minor_unit;
index 33d9a857a2625e443808df63e0d0092632871562..f66af5884c4066cadcad107378e8ca30b32f0f69 100644 (file)
@@ -501,10 +501,8 @@ int snd_opl3_hwdep_new(struct snd_opl3 * opl3,
        hw->private_data = opl3;
        hw->exclusive = 1;
 #ifdef CONFIG_SND_OSSEMUL
-       if (device == 0) {
+       if (device == 0)
                hw->oss_type = SNDRV_OSS_DEVICE_TYPE_DMFM;
-               sprintf(hw->oss_dev, "dmfm%i", card->number);
-       }
 #endif
        strcpy(hw->name, hw->id);
        switch (opl3->hardware & OPL3_HW_MASK) {