summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-11-27 09:26:12 +0100
committerTakashi Iwai <tiwai@suse.de>2013-11-27 09:26:12 +0100
commitcf23606c4178755605c39bc968e1ec78f84dadbb (patch)
treee1a53a02771296ae2df01c9794a503721eee067c
parentbf439d507bf25c2841c49ed911109de48e8e9a1c (diff)
downloadalsa-driver-build-unstable-cf23606c4178755605c39bc968e1ec78f84dadbb.tar.gz
Refresh acore/sound.patch for 3.13-rc1
Add a hack for defining the missing replace_fops() macro for older kernels. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--alsa/acore/sound.patch34
1 files changed, 25 insertions, 9 deletions
diff --git a/alsa/acore/sound.patch b/alsa/acore/sound.patch
index ed2a4d291..269aab7bf 100644
--- a/alsa/acore/sound.patch
+++ b/alsa/acore/sound.patch
@@ -1,11 +1,27 @@
---- ../alsa-kernel/core/sound.c 2012-09-05 09:19:31.000000000 +0200
-+++ sound.c 2012-10-15 10:58:19.000000000 +0200
+--- ../alsa-kernel/core/sound.c 2013-11-27 08:48:59.677641394 +0100
++++ sound.c 2013-11-27 09:17:08.461746060 +0100
@@ -1,3 +1,4 @@
+#include "adriver.h"
/*
* Advanced Linux Sound Architecture
* Copyright (c) by Jaroslav Kysela <perex@perex.cz>
-@@ -289,8 +290,18 @@
+@@ -149,6 +150,15 @@
+ #define autoload_device(minor) NULL
+ #endif /* CONFIG_MODULES */
+
++#ifndef replace_fops
++#define replace_fops(f, fops) \
++ do { \
++ struct file *__file = (f); \
++ fops_put(__file->f_op); \
++ BUG_ON(!(__file->f_op = (fops))); \
++ } while(0)
++#endif
++
+ 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;
@@ -24,7 +40,7 @@
if (IS_ERR(preg->dev)) {
snd_minors[minor] = NULL;
mutex_unlock(&sound_mutex);
-@@ -298,6 +309,22 @@
+@@ -298,6 +318,22 @@
kfree(preg);
return minor;
}
@@ -47,7 +63,7 @@
mutex_unlock(&sound_mutex);
return 0;
-@@ -345,7 +372,13 @@
+@@ -345,7 +381,13 @@
return -EINVAL;
}
@@ -61,7 +77,7 @@
kfree(snd_minors[minor]);
snd_minors[minor] = NULL;
-@@ -358,16 +391,28 @@
+@@ -358,16 +400,28 @@
int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev,
struct device_attribute *attr)
{
@@ -91,7 +107,7 @@
}
EXPORT_SYMBOL(snd_add_device_sysfs_file);
-@@ -453,6 +498,19 @@
+@@ -453,6 +507,19 @@
* INIT PART
*/
@@ -111,7 +127,7 @@
static int __init alsa_sound_init(void)
{
snd_major = major;
-@@ -463,8 +521,10 @@
+@@ -463,8 +530,10 @@
}
if (snd_info_init() < 0) {
unregister_chrdev(major, "alsa");
@@ -122,7 +138,7 @@
snd_info_minor_register();
#ifndef MODULE
printk(KERN_INFO "Advanced Linux Sound Architecture Driver Initialized.\n");
-@@ -475,9 +535,13 @@
+@@ -475,9 +544,13 @@
static void __exit alsa_sound_exit(void)
{
snd_info_minor_unregister();