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 27 MODULE_AUTHOR("Alan Cox"); 28 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 35 static int __init init_soundcore(void) 31 36 { 32 37 int rc; ··· 45 40 cleanup_oss_soundcore(); 46 41 return PTR_ERR(sound_class); 47 42 } 43 + 44 + sound_class->nodename = sound_nodename; 48 45 49 46 return 0; 50 47 }