summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-28 14:09:45 +0100
committerTakashi Iwai <tiwai@suse.de>2014-02-28 14:09:45 +0100
commitb57f3cf162877d2a4fdaa75dae1f4e8b734df8c9 (patch)
treedc34bfac1e3b59b1733287122026ba086656d3e2
parenteab69121e36170e4ceb55465a76c67981c29cf16 (diff)
parente2d1ef22e26d0e29c2733e8a500c8e4162f33ec4 (diff)
downloadalsa-driver-build-unstable-b57f3cf162877d2a4fdaa75dae1f4e8b734df8c9.tar.gz
Merge remote-tracking branch 'stable/build' into build
-rw-r--r--alsa/pci/hda/hda_beep.patch33
1 files changed, 20 insertions, 13 deletions
diff --git a/alsa/pci/hda/hda_beep.patch b/alsa/pci/hda/hda_beep.patch
index b316013eb..db153f468 100644
--- a/alsa/pci/hda/hda_beep.patch
+++ b/alsa/pci/hda/hda_beep.patch
@@ -1,5 +1,5 @@
---- ../../alsa-kernel/pci/hda/hda_beep.c 2014-02-27 09:57:51.057241933 +0100
-+++ hda_beep.c 2014-02-27 10:03:34.413623928 +0100
+--- ../../alsa-kernel/pci/hda/hda_beep.c 2014-02-28 14:04:36.379083709 +0100
++++ hda_beep.c 2014-02-28 14:06:26.879910159 +0100
@@ -1,3 +1,5 @@
+#define __NO_VERSION__
+#include "adriver.h"
@@ -28,19 +28,19 @@
if (beep->playing) {
/* turn off beep */
snd_hda_codec_write(beep->codec, beep->nid, 0,
-@@ -140,6 +148,9 @@
- static void snd_hda_do_detach(struct hda_beep *beep)
- {
- input_unregister_device(beep->dev);
+@@ -143,6 +151,9 @@
+ input_unregister_device(beep->dev);
+ else
+ input_free_device(beep->dev);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15)
+ kfree(beep->dev);
+#endif
beep->dev = NULL;
turn_off_beep(beep);
}
-@@ -150,7 +161,11 @@
+@@ -152,7 +163,11 @@
+ struct input_dev *input_dev;
struct hda_codec *codec = beep->codec;
- int err;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
input_dev = input_allocate_device();
@@ -50,7 +50,7 @@
if (!input_dev)
return -ENOMEM;
-@@ -166,15 +181,26 @@
+@@ -168,8 +183,15 @@
input_dev->evbit[0] = BIT_MASK(EV_SND);
input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
input_dev->event = snd_hda_beep_event;
@@ -64,16 +64,23 @@
+ input_dev->private = beep;
+#endif /* 2.6.22 */
+ beep->dev = input_dev;
+ return 0;
+@@ -248,6 +270,7 @@
+ if (!beep || !beep->dev)
+ return 0;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
- err = input_register_device(input_dev);
+ err = input_register_device(beep->dev);
if (err < 0) {
- input_free_device(input_dev);
codec_err(codec, "hda_beep: unable to register input device\n");
+@@ -256,6 +279,9 @@
+ kfree(beep);
return err;
}
+#else
-+ input_register_device(input_dev);
++ input_register_device(beep->dev);
+#endif
- beep->dev = input_dev;
+ beep->registered = true;
return 0;
}