Merge remote branch 'alsa/fixes' into fix/hda
[safe/jmp/linux-2.6] / sound / core / jack.c
index b2da10c..f705eec 100644 (file)
@@ -28,12 +28,16 @@ static int jack_types[] = {
        SW_MICROPHONE_INSERT,
        SW_LINEOUT_INSERT,
        SW_JACK_PHYSICAL_INSERT,
+       SW_VIDEOOUT_INSERT,
 };
 
 static int snd_jack_dev_free(struct snd_device *device)
 {
        struct snd_jack *jack = device->device_data;
 
+       if (jack->private_free)
+               jack->private_free(jack);
+
        /* If the input device is registered with the input subsystem
         * then we need to use a different deallocator. */
        if (jack->registered)
@@ -54,12 +58,12 @@ static int snd_jack_dev_register(struct snd_device *device)
        int err;
 
        snprintf(jack->name, sizeof(jack->name), "%s %s",
-                card->longname, jack->id);
+                card->shortname, jack->id);
        jack->input_dev->name = jack->name;
 
        /* Default to the sound card device. */
        if (!jack->input_dev->dev.parent)
-               jack->input_dev->dev.parent = card->dev;
+               jack->input_dev->dev.parent = snd_card_get_device_link(card);
 
        err = input_register_device(jack->input_dev);
        if (err == 0)