summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-04 16:13:10 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-04 16:13:10 +0100
commit484063214b55722210c643644ead7e925fe4174b (patch)
tree6bdff73d86a8f9a7ce16d77758a3e83f39b004d3
parent5affb384193194b49a4f9a4300e940d2429693d0 (diff)
downloadalsa-driver-build-unstable-484063214b55722210c643644ead7e925fe4174b.tar.gz
Refresh acore/sound.patch
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--alsa/acore/sound.patch66
1 files changed, 5 insertions, 61 deletions
diff --git a/alsa/acore/sound.patch b/alsa/acore/sound.patch
index 9eee4d2bc..8f916cdcc 100644
--- a/alsa/acore/sound.patch
+++ b/alsa/acore/sound.patch
@@ -1,5 +1,5 @@
---- ../alsa-kernel/core/sound.c 2014-02-27 09:57:51.056241917 +0100
-+++ sound.c 2014-02-27 10:02:16.980409685 +0100
+--- ../alsa-kernel/core/sound.c 2015-02-03 17:57:48.504745673 +0100
++++ sound.c 2015-02-04 16:11:09.643227209 +0100
@@ -1,3 +1,4 @@
+#include "adriver.h"
/*
@@ -21,63 +21,7 @@
static int snd_open(struct inode *inode, struct file *file)
{
unsigned int minor = iminor(inode);
-@@ -289,8 +299,18 @@
- return minor;
- }
- snd_minors[minor] = preg;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
-+#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 /* SND_HAS_DEVICE_CREATE_DRVDATA */
- if (IS_ERR(preg->dev)) {
- snd_minors[minor] = NULL;
- mutex_unlock(&sound_mutex);
-@@ -298,6 +318,22 @@
- kfree(preg);
- return minor;
- }
-+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26) && \
-+ !defined(CONFIG_SND_HAS_DEVICE_CREATE_DRVDATA)
-+ if (preg->dev)
-+ dev_set_drvdata(preg->dev, private_data);
-+#endif
-+
-+#elif defined(CONFIG_SND_HAVE_CLASS_SIMPLE)
-+ class_simple_device_add((struct class_simple *)sound_class,
-+ MKDEV(major, minor), device, name);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 2)
-+ preg->dev = (struct device *)class_device_create(sound_class, NULL,
-+ MKDEV(major, minor),
-+ device, "%s", name);
-+ if (preg->dev)
-+ class_set_devdata((struct class_device *)preg->dev, private_data);
-+#endif /* 2.6.20 */
-
- mutex_unlock(&sound_mutex);
- return 0;
-@@ -345,7 +381,13 @@
- return -EINVAL;
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
- device_destroy(sound_class, MKDEV(major, minor));
-+#elif defined(CONFIG_SND_HAVE_CLASS_SIMPLE)
-+ class_simple_device_remove(MKDEV(major, minor));
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 2)
-+ class_device_destroy(sound_class, MKDEV(major, minor));
-+#endif
-
- kfree(snd_minors[minor]);
- snd_minors[minor] = NULL;
-@@ -456,6 +498,19 @@
+@@ -415,6 +425,19 @@
* INIT PART
*/
@@ -97,7 +41,7 @@
static int __init alsa_sound_init(void)
{
snd_major = major;
-@@ -466,8 +521,10 @@
+@@ -425,8 +448,10 @@
}
if (snd_info_init() < 0) {
unregister_chrdev(major, "alsa");
@@ -108,7 +52,7 @@
snd_info_minor_register();
#ifndef MODULE
pr_info("Advanced Linux Sound Architecture Driver Initialized.\n");
-@@ -478,9 +535,13 @@
+@@ -437,9 +462,13 @@
static void __exit alsa_sound_exit(void)
{
snd_info_minor_unregister();