diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/sound_core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/sound_core.c b/sound/sound_core.c index 2b302bbffe73..12522e6913d9 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c | |||
@@ -27,6 +27,11 @@ MODULE_DESCRIPTION("Core sound module"); | |||
27 | MODULE_AUTHOR("Alan Cox"); | 27 | MODULE_AUTHOR("Alan Cox"); |
28 | MODULE_LICENSE("GPL"); | 28 | MODULE_LICENSE("GPL"); |
29 | 29 | ||
30 | static char *sound_nodename(struct device *dev) | ||
31 | { | ||
32 | return kasprintf(GFP_KERNEL, "snd/%s", dev_name(dev)); | ||
33 | } | ||
34 | |||
30 | static int __init init_soundcore(void) | 35 | static int __init init_soundcore(void) |
31 | { | 36 | { |
32 | int rc; | 37 | int rc; |
@@ -41,6 +46,8 @@ static int __init init_soundcore(void) | |||
41 | return PTR_ERR(sound_class); | 46 | return PTR_ERR(sound_class); |
42 | } | 47 | } |
43 | 48 | ||
49 | sound_class->nodename = sound_nodename; | ||
50 | |||
44 | return 0; | 51 | return 0; |
45 | } | 52 | } |
46 | 53 | ||