File kabi-kernel-fix.diff of Package alsa-driver-staudio-ADCIII-kmp

diff --git a/include/sound/asound.h b/include/sound/asound.h
index a2e4ff5..30cda64 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -803,8 +803,10 @@ struct snd_ctl_elem_info {
 			unsigned int items;	/* R: number of items */
 			unsigned int item;	/* W: item number */
 			char name[64];		/* R: value name */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || !defined(__GENKSYMS__)
 			__u64 names_ptr;	/* W: names list (ELEM_ADD only) */
 			unsigned int names_length;
+#endif
 		} enumerated;
 		unsigned char reserved[128];
 	} value;
diff --git a/include/sound/control.h b/include/sound/control.h
index 8332e86..00016d6 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -232,6 +232,7 @@ int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl,
 			     void *private_data);
 void snd_ctl_sync_vmaster_hook(struct snd_kcontrol *kctl);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || !defined(__GENKSYMS__)
 /*
  * Helper functions for jack-detection controls
  */
@@ -239,5 +240,6 @@ struct snd_kcontrol *
 snd_kctl_jack_new(const char *name, int idx, void *private_data);
 void snd_kctl_jack_report(struct snd_card *card,
 			  struct snd_kcontrol *kctl, bool status);
+#endif
 
 #endif	/* __SOUND_CONTROL_H */
diff --git a/include/sound/core.h b/include/sound/core.h
index bc05668..fb84c1c 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -22,6 +22,9 @@
  *
  */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) && defined(__GENKSYMS__)
+#include <linux/module.h>
+#endif
 #include <linux/sched.h>		/* wake_up() */
 #include <linux/mutex.h>		/* struct mutex */
 #include <linux/rwsem.h>		/* struct rw_semaphore */
@@ -333,10 +336,16 @@ enum {
 };
 
 #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || !defined(__GENKSYMS__)
 __printf(4, 5)
 void __snd_printk(unsigned int level, const char *file, int line,
 		  const char *format, ...);
 #else
+void __snd_printk(unsigned int level, const char *file, int line,
+		  const char *format, ...)
+	__attribute__ ((format (printf, 4, 5)));
+#endif
+#else
 #define __snd_printk(level, file, line, format, args...) \
 	printk(format, ##args)
 #endif
diff --git a/include/sound/info.h b/include/sound/info.h
index 9ca1a49..7e206ab 100644
--- a/include/sound/info.h
+++ b/include/sound/info.h
@@ -72,7 +72,11 @@ struct snd_info_entry_ops {
 
 struct snd_info_entry {
 	const char *name;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || !defined(__GENKSYMS__)
 	umode_t mode;
+#else
+	mode_t mode;
+#endif
 	long size;
 	unsigned short content;
 	union {
@@ -110,8 +114,13 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer);
 static inline void snd_card_info_read_oss(struct snd_info_buffer *buffer) {}
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || !defined(__GENKSYMS__)
 __printf(2, 3)
 int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...);
+#else
+int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) \
+				__attribute__ ((format (printf, 2, 3)));
+#endif
 int snd_info_init(void);
 int snd_info_done(void);
 
diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
index f352a98..429dff8 100644
--- a/include/sound/seq_kernel.h
+++ b/include/sound/seq_kernel.h
@@ -75,9 +75,15 @@ struct snd_seq_port_callback {
 };
 
 /* interface for kernel client */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) || !defined(__GENKSYMS__)
 __printf(3, 4)
 int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
 				 const char *name_fmt, ...);
+#else
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
+       __attribute__ ((format (printf, 3, 4)));
+                                const char *name_fmt, ...);
+#endif
 int snd_seq_delete_kernel_client(int client);
 int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
 int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);