X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=sound%2Fsound_core.c;h=12522e6913d92d068676f4b3916571b03dae2d87;hb=413d63d7106b914a4a004ac08698f10c618e4616;hp=a75b289a5d78465c25ccf2aab83958e3e8a0a67d;hpb=0a9b86381c76e9d33a9b6edb66aef32d7a3306e3;p=safe%2Fjmp%2Flinux-2.6 diff --git a/sound/sound_core.c b/sound/sound_core.c index a75b289..12522e6 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c @@ -10,6 +10,7 @@ #include #include #include +#include #ifdef CONFIG_SOUND_OSS_CORE static int __init init_oss_soundcore(void); @@ -26,6 +27,11 @@ MODULE_DESCRIPTION("Core sound module"); MODULE_AUTHOR("Alan Cox"); MODULE_LICENSE("GPL"); +static char *sound_nodename(struct device *dev) +{ + return kasprintf(GFP_KERNEL, "snd/%s", dev_name(dev)); +} + static int __init init_soundcore(void) { int rc; @@ -40,6 +46,8 @@ static int __init init_soundcore(void) return PTR_ERR(sound_class); } + sound_class->nodename = sound_nodename; + return 0; } @@ -457,7 +465,7 @@ EXPORT_SYMBOL(unregister_sound_mixer); void unregister_sound_midi(int unit) { - return sound_remove_unit(&chains[2], unit); + sound_remove_unit(&chains[2], unit); } EXPORT_SYMBOL(unregister_sound_midi); @@ -474,7 +482,7 @@ EXPORT_SYMBOL(unregister_sound_midi); void unregister_sound_dsp(int unit) { - return sound_remove_unit(&chains[3], unit); + sound_remove_unit(&chains[3], unit); } @@ -507,7 +515,7 @@ static struct sound_unit *__look_for_unit(int chain, int unit) return NULL; } -int soundcore_open(struct inode *inode, struct file *file) +static int soundcore_open(struct inode *inode, struct file *file) { int chain; int unit = iminor(inode);