summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-04-14 16:13:58 +0200
committerTakashi Iwai <tiwai@suse.de>2009-04-14 16:15:09 +0200
commit9d59065cd6fae841ca56c281189d5b8d0817d35f (patch)
treeab9ab1d52db96d7ba7a5235ea0073a34b722a1e0 /sound
parent577c9c456f0e1371cbade38eaf91ae8e8a308555 (diff)
downloadop-kernel-dev-9d59065cd6fae841ca56c281189d5b8d0817d35f.zip
op-kernel-dev-9d59065cd6fae841ca56c281189d5b8d0817d35f.tar.gz
ALSA: add private_data to struct snd_jack
Added private_data and private_free fields to struct snd_jack so that the caller can assign the data. It'll be helpful for avoiding the double-free of the jack instance. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/jack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/core/jack.c b/sound/core/jack.c
index c8254c6..d54d1a0 100644
--- a/sound/core/jack.c
+++ b/sound/core/jack.c
@@ -35,6 +35,9 @@ static int snd_jack_dev_free(struct snd_device *device)
{
struct snd_jack *jack = device->device_data;
+ if (jack->private_free)
+ jack->private_free(jack);
+
/* If the input device is registered with the input subsystem
* then we need to use a different deallocator. */
if (jack->registered)
OpenPOWER on IntegriCloud