]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Fix breakage with CONFIG_SYSFS_DEPRECATED
authorTakashi Iwai <tiwai@suse.de>
Fri, 9 Feb 2007 15:25:48 +0000 (16:25 +0100)
committerJaroslav Kysela <perex@suse.cz>
Fri, 9 Feb 2007 15:25:48 +0000 (16:25 +0100)
The fix for sysfs breakage with CONFIG_SYSFS_DEPRECATED was flown
away by the conflicted merge of the ALSA git tree.  The patch below
fixes it again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
include/sound/core.h
sound/core/pcm.c

index 3c493ad620d1e518b73c728fac47605fd41a222e..4b9e609975ab976e5dceb554ef7401e30d5b3daf 100644 (file)
@@ -242,7 +242,7 @@ static inline int snd_register_device(int type, struct snd_card *card, int dev,
 {
        return snd_register_device_for_dev(type, card, dev, f_ops,
                                           private_data, name,
-                                          card ? card->dev : NULL);
+                                          snd_card_get_device_link(card));
 }
 
 int snd_unregister_device(int type, struct snd_card *card, int dev);
index 76fcc5234d83dc85820ccd2a32982002ef3a81b8..2743414fc8fa8ac7fbf14d9b49dc38be622eea0a 100644 (file)
@@ -968,7 +968,7 @@ static int snd_pcm_dev_register(struct snd_device *device)
                 * if possible */
                dev = pcm->dev;
                if (!dev)
-                       dev = pcm->card ? pcm->card->dev : NULL;
+                       dev = snd_card_get_device_link(pcm->card);
                /* register pcm */
                err = snd_register_device_for_dev(devtype, pcm->card,
                                                  pcm->device,