--- acore/init.patch.orig 2008-07-14 09:53:57.000000000 +0200 +++ acore/init.patch 2009-01-10 23:19:25.824343747 +0100 @@ -49,3 +49,24 @@ .mmap = snd_disconnect_mmap, .fasync = snd_disconnect_fasync }; +@@ -548,8 +564,19 @@ + snd_assert(card != NULL, return -EINVAL); + #ifndef CONFIG_SYSFS_DEPRECATED + if (!card->card_dev) { +- card->card_dev = device_create(sound_class, card->dev, 0, ++#ifdef CONFIG_SND_HAS_DEVICE_CREATE_DRVDATA ++ card->card_dev = device_create_drvdata(sound_class, card->dev, ++ MKDEV(0, 0), NULL, ++ "card%i", card->number); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) ++ card->card_dev = device_create(sound_class, card->dev, ++ MKDEV(0, 0), NULL, ++ "card%i", card->number); ++#else ++ card->card_dev = device_create(sound_class, card->dev, ++ MKDEV(0, 0), + "card%i", card->number); ++#endif + if (IS_ERR(card->card_dev)) + card->card_dev = NULL; + } --- acore/sound.patch.orig 2008-07-14 09:53:57.000000000 +0200 +++ acore/sound.patch 2009-01-10 23:23:46.719382009 +0100 @@ -58,7 +58,7 @@ mutex_lock(&sound_mutex); #ifdef CONFIG_SND_DYNAMIC_MINORS minor = snd_find_free_minor(); -@@ -259,9 +276,21 @@ +@@ -259,9 +276,23 @@ return minor; } snd_minors[minor] = preg; @@ -68,15 +68,17 @@ + "snd/%s", name); +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) -+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 26) || \ -+ defined(CONFIG_SND_HAS_DEVICE_CREATE_DRVDATA) ++#ifdef CONFIG_SND_HAS_DEVICE_CREATE_DRVDATA preg->dev = device_create_drvdata(sound_class, device, MKDEV(major, minor), private_data, "%s", name); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) ++ preg->dev = device_create(sound_class, device, MKDEV(major, minor), ++ private_data, "%s", name); +#else + preg->dev = device_create(sound_class, device, MKDEV(major, minor), + "%s", name); -+#endif /* >2.6.26 || SND_HAS_DEVICE_CREATE_DRVDATA */ ++#endif /* SND_HAS_DEVICE_CREATE_DRVDATA */ if (IS_ERR(preg->dev)) { snd_minors[minor] = NULL; mutex_unlock(&sound_mutex); @@ -99,7 +101,7 @@ + device, "%s", name); + if (preg->dev) + class_set_devdata((struct class_device *)preg->dev, private_data); -+#endif ++#endif /* 2.6.20 */ mutex_unlock(&sound_mutex); return 0; --- sound/core/info.c.orig 2008-07-14 09:54:43.000000000 +0200 +++ sound/core/info.c 2009-01-10 21:18:36.642871515 +0100 @@ -21,6 +21,7 @@ #include #include +#include #include #include #include