diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-30 07:29:31 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-30 07:29:31 +0100 |
commit | fd8d4489925f3ec5ac175b1e730925dc70d0be28 (patch) | |
tree | e083b90ea3880f4d8c4d5dcfed06165cf023abce | |
parent | 5ef647244c4115a34560658875049a3e3727e3f9 (diff) | |
download | alsa-driver-build-unstable-fd8d4489925f3ec5ac175b1e730925dc70d0be28.tar.gz |
Fix build of dice driver on old kernels
Make dice.patch to overcome the probe/remove callback rewrites since
3.11 as well as other firewire drivers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | alsa/.gitignore | 1 | ||||
-rw-r--r-- | alsa/firewire/Makefile | 1 | ||||
-rw-r--r-- | alsa/firewire/dice.c | 2 | ||||
-rw-r--r-- | alsa/firewire/dice.patch | 46 |
4 files changed, 48 insertions, 2 deletions
diff --git a/alsa/.gitignore b/alsa/.gitignore index f68573673..a2ca81e05 100644 --- a/alsa/.gitignore +++ b/alsa/.gitignore @@ -60,6 +60,7 @@ drivers/pcsp/pcsp_lib.c drivers/portman2x4.c drivers/opl3/opl3_lib.c firewire/cmp.c +firewire/dice.c firewire/iso-resources.c firewire/isight.c firewire/scs1x.c diff --git a/alsa/firewire/Makefile b/alsa/firewire/Makefile index c051a27cf..47d3fa97a 100644 --- a/alsa/firewire/Makefile +++ b/alsa/firewire/Makefile @@ -14,6 +14,7 @@ EXTRA_CFLAGS += -I$(SND_TOPDIR)/alsa-kernel/firewire include $(SND_TOPDIR)/Rules.make cmp.c: cmp.patch $(SND_TOPDIR)/alsa-kernel/firewire/cmp.c +dice.c: dice.patch $(SND_TOPDIR)/alsa-kernel/firewire/dice.c iso-resources.c: iso-resources.patch $(SND_TOPDIR)/alsa-kernel/firewire/iso-resources.c isight.c: isight.patch $(SND_TOPDIR)/alsa-kernel/firewire/isight.c scs1x.c: scs1x.patch $(SND_TOPDIR)/alsa-kernel/firewire/scs1x.c diff --git a/alsa/firewire/dice.c b/alsa/firewire/dice.c deleted file mode 100644 index 37e928b55..000000000 --- a/alsa/firewire/dice.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "adriver.h" -#include "../alsa-kernel/firewire/dice.c" diff --git a/alsa/firewire/dice.patch b/alsa/firewire/dice.patch new file mode 100644 index 000000000..276825c8b --- /dev/null +++ b/alsa/firewire/dice.patch @@ -0,0 +1,46 @@ +--- ../alsa-kernel/firewire/dice.c 2013-10-22 10:03:16.835007244 +0200 ++++ dice.c 2013-10-30 07:28:46.132508934 +0100 +@@ -1,3 +1,7 @@ ++#include "adriver.h" ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 39) ++#include "iso-resources-old.h" ++#endif + /* + * TC Applied Technologies Digital Interface Communications Engine driver + * +@@ -1468,15 +1472,34 @@ + }; + MODULE_DEVICE_TABLE(ieee1394, dice_id_table); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) ++static int __dice_probe(struct device *dev) ++{ ++ return dice_probe(fw_unit(dev), NULL); ++} ++ ++static int __dice_remove(struct device *dev) ++{ ++ dice_remove(fw_unit(dev)); ++ return 0; ++} ++#endif ++ + static struct fw_driver dice_driver = { + .driver = { + .owner = THIS_MODULE, + .name = KBUILD_MODNAME, + .bus = &fw_bus_type, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) ++ .probe = __dice_probe, ++ .remove = __dice_remove, ++#endif + }, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) + .probe = dice_probe, +- .update = dice_bus_reset, + .remove = dice_remove, ++#endif ++ .update = dice_bus_reset, + .id_table = dice_id_table, + }; + |