Merge remote branch 'alsa/fixes' into fix/hda
[safe/jmp/linux-2.6] / sound / core / jack.c
index c8254c6..f705eec 100644 (file)
@@ -35,6 +35,9 @@ 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)
@@ -60,7 +63,7 @@ static int snd_jack_dev_register(struct snd_device *device)
 
        /* 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)