linux/debian/patches/debian/ALSA-avoid-ABI-change-in-3....

38 lines
1.3 KiB
Diff

From: Ben Hutchings <ben@decadent.org.uk>
Subject: ALSA: avoid ABI change in 3.2.34
Date: Sun, 18 Nov 2012 03:10:21 +0000
Commit 3b4a36722e5e518e4bdd3a215d8a1c5adc18e911 ('ALSA: Add a
reference counter to card instance', commit
a0830dbd4e42b38aefdf3fb61ba5019a1a99ea85 upstream) added a
reference count to struct snd_card.
This structure must be allocated by snd_card_create(), not by drivers.
It allocates space after the structure for driver-specific data, but
drivers should access this via the private_data pointer initialised by
snd_card_create(), not using sizeof(struct snd_card). Therefore we
can move the new member to the end of the structure and hide it from
genksyms, and there is no ABI change.
---
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -132,7 +132,6 @@ struct snd_card {
int shutdown; /* this card is going down */
int free_on_last_close; /* free in context of file_release */
wait_queue_head_t shutdown_sleep;
- atomic_t refcount; /* refcount for disconnection */
struct device *dev; /* device assigned to this card */
struct device *card_dev; /* cardX object for sysfs */
@@ -146,6 +145,9 @@ struct snd_card {
struct snd_mixer_oss *mixer_oss;
int mixer_oss_change_count;
#endif
+#ifndef __GENKSYMS__
+ atomic_t refcount; /* refcount for disconnection */
+#endif
};
#ifdef CONFIG_PM