LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File kabi-driver-fix.diff of Package alsa-driver-staudio-ADCIII-kmp (Project home:sbahling:staudio-ADCIII)

diff --git a/include/adriver.h b/include/adriver.h
index 4c5c3da..3d8383d 100644
--- a/include/adriver.h
+++ b/include/adriver.h
@@ -569,6 +569,7 @@ static inline void snd_compat_vprintk(const char *fmt, va_list args)
 #define vprintk snd_compat_vprintk
 #endif
 
+#ifndef __GENKSYMS__
 #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
 #define wait_ms gameport_wait_ms
 #include <linux/gameport.h>
@@ -603,6 +604,7 @@ static inline void snd_gameport_unregister_port(struct gameport *gp)
 #define gameport_set_phys(gp,x,y)
 #endif /* to_gameport_driver */
 #endif /* GAMEPORT || GAMEPORT_MODULE */
+#endif /* __GENKSYMS__ */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
 #define SND_COMPAT_DEV_PM_OPS
@@ -857,6 +859,7 @@ static inline int snd_pnp_register_card_driver(struct pnp_card_driver *drv)
 #endif
 
 /* kmemdup() wrapper */
+#ifndef __GENKSYMS__
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) || defined(CONFIG_SND_DEBUG_MEMORY)
 #include <linux/string.h>
 #include <linux/slab.h>
@@ -870,6 +873,7 @@ static inline void *snd_kmemdup(const void *src, size_t len, gfp_t gfp)
 }
 #define kmemdup	snd_kmemdup
 #endif
+#endif /* __GENKSYMS__ */
 
 /* wrapper for new irq handler type */
 #ifndef CONFIG_SND_NEW_IRQ_HANDLER
@@ -1211,6 +1215,7 @@ void snd_compat_print_hex_dump_bytes(const char *prefix_str, int prefix_type,
 /*
  * pci_ioremap_bar() wrapper
  */
+#ifndef __GENKSYMS__
 #ifdef CONFIG_PCI
 #ifndef CONFIG_HAVE_PCI_IOREMAP_BAR
 #include <linux/pci.h>
@@ -1221,6 +1226,7 @@ static inline void *pci_ioremap_bar(struct pci_dev *pdev, int bar)
 }
 #endif
 #endif
+#endif /* __GENKSYMS__ */
 
 /*
  * definition of type 'bool'
@@ -1239,6 +1245,7 @@ typedef _Bool bool;
 #endif
 
 /* memdup_user() wrapper */
+#ifndef __GENKSYMS__
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) || \
 	defined(CONFIG_SND_DEBUG_MEMORY)
 #include <linux/err.h>
@@ -1256,6 +1263,7 @@ static inline void *snd_memdup_user(const void __user *src, size_t len)
 }
 #define memdup_user snd_memdup_user
 #endif
+#endif /* __GENKSYMS__ */
 
 /* PCI_VEDEVICE() */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
@@ -1413,6 +1421,7 @@ static inline int hex_to_bin(char c)
 #endif
 
 #ifndef CONFIG_HAVE_VZALLOC
+#ifndef __GENKSYMS__
 #include <linux/vmalloc.h>
 static inline void *vzalloc(unsigned long size)
 {
@@ -1421,6 +1430,7 @@ static inline void *vzalloc(unsigned long size)
 		memset(p, 0, size);
 	return p;
 }
+#endif /* __GENKSYMS__ */
 #endif
 
 /* flush_delayed_work_sync() wrapper */
diff --git a/misc/ac97_bus.c b/misc/ac97_bus.c
index 58e9a98..ea39fcb 100644
--- a/misc/ac97_bus.c
+++ b/misc/ac97_bus.c
@@ -1,3 +1,6 @@
+#include <linux/version.h>
+#ifndef __GENKSYMS__
 #include "adriver.h"
 #include <sound/core.h>
+#endif
 #include "../alsa-kernel/ac97_bus.c"