diff options
-rw-r--r-- | include/sound/jack.h | 2 | ||||
-rw-r--r-- | sound/core/jack.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/jack.h b/include/sound/jack.h index 6b013c6f6a04..f236e426a706 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h | |||
@@ -50,6 +50,8 @@ struct snd_jack { | |||
50 | int type; | 50 | int type; |
51 | const char *id; | 51 | const char *id; |
52 | char name[100]; | 52 | char name[100]; |
53 | void *private_data; | ||
54 | void (*private_free)(struct snd_jack *); | ||
53 | }; | 55 | }; |
54 | 56 | ||
55 | #ifdef CONFIG_SND_JACK | 57 | #ifdef CONFIG_SND_JACK |
diff --git a/sound/core/jack.c b/sound/core/jack.c index c8254c667c62..d54d1a05fe65 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) | |||
35 | { | 35 | { |
36 | struct snd_jack *jack = device->device_data; | 36 | struct snd_jack *jack = device->device_data; |
37 | 37 | ||
38 | if (jack->private_free) | ||
39 | jack->private_free(jack); | ||
40 | |||
38 | /* If the input device is registered with the input subsystem | 41 | /* If the input device is registered with the input subsystem |
39 | * then we need to use a different deallocator. */ | 42 | * then we need to use a different deallocator. */ |
40 | if (jack->registered) | 43 | if (jack->registered) |