aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 17:19:21 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 17:19:21 -0400
commit602cada851b28c5792339786efe872fbdc1f5d41 (patch)
tree233d474b74d6038b5bb54a07ad91dd1bb10b0218 /sound/core
parent82991c6f2c361acc17279b8124d9bf1878973435 (diff)
parentfee68d1cc0d9bd863e51c16cdcd707737b16bb38 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6: (22 commits) [PATCH] devfs: Remove it from the feature_removal.txt file [PATCH] devfs: Last little devfs cleanups throughout the kernel tree. [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV [PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed [PATCH] devfs: Remove the line_driver devfs_name field as it's no longer needed [PATCH] devfs: Remove the videodevice devfs_name field as it's no longer needed [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree [PATCH] devfs: Remove devfs_remove() function from the kernel tree [PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree [PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree [PATCH] devfs: Remove devfs_mk_symlink() function from the kernel tree [PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree [PATCH] devfs: Remove devfs_*_tape() functions from the kernel tree [PATCH] devfs: Remove devfs support from the sound subsystem [PATCH] devfs: Remove devfs support from the ide subsystem. [PATCH] devfs: Remove devfs support from the serial subsystem [PATCH] devfs: Remove devfs from the init code [PATCH] devfs: Remove devfs from the partition code ...
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/info.c1
-rw-r--r--sound/core/sound.c24
2 files changed, 0 insertions, 25 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index 10c1772bf3ea..340332c6d973 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -29,7 +29,6 @@
29#include <sound/info.h> 29#include <sound/info.h>
30#include <sound/version.h> 30#include <sound/version.h>
31#include <linux/proc_fs.h> 31#include <linux/proc_fs.h>
32#include <linux/devfs_fs_kernel.h>
33#include <linux/mutex.h> 32#include <linux/mutex.h>
34#include <stdarg.h> 33#include <stdarg.h>
35 34
diff --git a/sound/core/sound.c b/sound/core/sound.c
index cd862728346c..264f2efd1af8 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -32,7 +32,6 @@
32#include <sound/control.h> 32#include <sound/control.h>
33#include <sound/initval.h> 33#include <sound/initval.h>
34#include <linux/kmod.h> 34#include <linux/kmod.h>
35#include <linux/devfs_fs_kernel.h>
36#include <linux/mutex.h> 35#include <linux/mutex.h>
37 36
38#define SNDRV_OS_MINORS 256 37#define SNDRV_OS_MINORS 256
@@ -42,7 +41,6 @@ int snd_major;
42EXPORT_SYMBOL(snd_major); 41EXPORT_SYMBOL(snd_major);
43 42
44static int cards_limit = 1; 43static int cards_limit = 1;
45static int device_mode = S_IFCHR | S_IRUGO | S_IWUGO;
46 44
47MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); 45MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
48MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards."); 46MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards.");
@@ -51,10 +49,6 @@ module_param(major, int, 0444);
51MODULE_PARM_DESC(major, "Major # for sound driver."); 49MODULE_PARM_DESC(major, "Major # for sound driver.");
52module_param(cards_limit, int, 0444); 50module_param(cards_limit, int, 0444);
53MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards."); 51MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards.");
54#ifdef CONFIG_DEVFS_FS
55module_param(device_mode, int, 0444);
56MODULE_PARM_DESC(device_mode, "Device file permission mask for devfs.");
57#endif
58MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR); 52MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR);
59 53
60/* this one holds the actual max. card number currently available. 54/* this one holds the actual max. card number currently available.
@@ -273,8 +267,6 @@ int snd_register_device(int type, struct snd_card *card, int dev,
273 return minor; 267 return minor;
274 } 268 }
275 snd_minors[minor] = preg; 269 snd_minors[minor] = preg;
276 if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit)
277 devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name);
278 if (card) 270 if (card)
279 device = card->dev; 271 device = card->dev;
280 class_device_create(sound_class, NULL, MKDEV(major, minor), device, "%s", name); 272 class_device_create(sound_class, NULL, MKDEV(major, minor), device, "%s", name);
@@ -314,9 +306,6 @@ int snd_unregister_device(int type, struct snd_card *card, int dev)
314 return -EINVAL; 306 return -EINVAL;
315 } 307 }
316 308
317 if (mptr->type != SNDRV_DEVICE_TYPE_CONTROL ||
318 mptr->card >= cards_limit) /* created in sound.c */
319 devfs_remove("snd/%s", mptr->name);
320 class_device_destroy(sound_class, MKDEV(major, minor)); 309 class_device_destroy(sound_class, MKDEV(major, minor));
321 310
322 snd_minors[minor] = NULL; 311 snd_minors[minor] = NULL;
@@ -411,24 +400,17 @@ int __exit snd_minor_info_done(void)
411 400
412static int __init alsa_sound_init(void) 401static int __init alsa_sound_init(void)
413{ 402{
414 short controlnum;
415
416 snd_major = major; 403 snd_major = major;
417 snd_ecards_limit = cards_limit; 404 snd_ecards_limit = cards_limit;
418 devfs_mk_dir("snd");
419 if (register_chrdev(major, "alsa", &snd_fops)) { 405 if (register_chrdev(major, "alsa", &snd_fops)) {
420 snd_printk(KERN_ERR "unable to register native major device number %d\n", major); 406 snd_printk(KERN_ERR "unable to register native major device number %d\n", major);
421 devfs_remove("snd");
422 return -EIO; 407 return -EIO;
423 } 408 }
424 if (snd_info_init() < 0) { 409 if (snd_info_init() < 0) {
425 unregister_chrdev(major, "alsa"); 410 unregister_chrdev(major, "alsa");
426 devfs_remove("snd");
427 return -ENOMEM; 411 return -ENOMEM;
428 } 412 }
429 snd_info_minor_register(); 413 snd_info_minor_register();
430 for (controlnum = 0; controlnum < cards_limit; controlnum++)
431 devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum);
432#ifndef MODULE 414#ifndef MODULE
433 printk(KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n"); 415 printk(KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n");
434#endif 416#endif
@@ -437,16 +419,10 @@ static int __init alsa_sound_init(void)
437 419
438static void __exit alsa_sound_exit(void) 420static void __exit alsa_sound_exit(void)
439{ 421{
440 short controlnum;
441
442 for (controlnum = 0; controlnum < cards_limit; controlnum++)
443 devfs_remove("snd/controlC%d", controlnum);
444
445 snd_info_minor_unregister(); 422 snd_info_minor_unregister();
446 snd_info_done(); 423 snd_info_done();
447 if (unregister_chrdev(major, "alsa") != 0) 424 if (unregister_chrdev(major, "alsa") != 0)
448 snd_printk(KERN_ERR "unable to unregister major device number %d\n", major); 425 snd_printk(KERN_ERR "unable to unregister major device number %d\n", major);
449 devfs_remove("snd");
450} 426}
451 427
452module_init(alsa_sound_init) 428module_init(alsa_sound_init)