Driver Core: sound: add nodename for sound drivers

This adds support to the sound core to report the proper device name to
userspace for their devices.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Kay Sievers and committed by Greg Kroah-Hartman 7a9d56f6 aa5ed63e

+7
+7
sound/sound_core.c
··· 27 MODULE_AUTHOR("Alan Cox"); 28 MODULE_LICENSE("GPL"); 29 30 static int __init init_soundcore(void) 31 { 32 int rc; ··· 45 cleanup_oss_soundcore(); 46 return PTR_ERR(sound_class); 47 } 48 49 return 0; 50 }
··· 27 MODULE_AUTHOR("Alan Cox"); 28 MODULE_LICENSE("GPL"); 29 30 + static char *sound_nodename(struct device *dev) 31 + { 32 + return kasprintf(GFP_KERNEL, "snd/%s", dev_name(dev)); 33 + } 34 + 35 static int __init init_soundcore(void) 36 { 37 int rc; ··· 40 cleanup_oss_soundcore(); 41 return PTR_ERR(sound_class); 42 } 43 + 44 + sound_class->nodename = sound_nodename; 45 46 return 0; 47 }