At Mon, 29 Oct 2007 08:30:50 +0100, I wrote:Meanwhile, it's not sexy to have such warnings from sysfs core, not from the caller side. The (untested) patch below may fix the problem. Now the standard register_sound_*() is used for old OSS code. Please give it a try. Takashi [PATCH] Use register_sound_*() in OSS core code Use the standard register_sound_*() functions instead of calling device_create() directly in the old OSS core code. Signed-off-by: Takashi Iwai <tiwai@suse.de> --- diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index a9c23b2..2c20e70 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c @@ -523,15 +523,11 @@ bad: */ static const struct { unsigned short minor; - char *name; - umode_t mode; int *num; } dev_list[] = { /* list of minor devices */ /* seems to be some confusion here -- this device is not in the device list */ - {SND_DEV_DSP16, "dspW", S_IWUGO | S_IRUSR | S_IRGRP, - &num_audiodevs}, - {SND_DEV_AUDIO, "audio", S_IWUGO | S_IRUSR | S_IRGRP, - &num_audiodevs}, + {SND_DEV_DSP16, &num_audiodevs}, + {SND_DEV_AUDIO, &num_audiodevs}, }; static int dmabuf; @@ -560,17 +556,11 @@ static int __init oss_init(void) sound_dmap_flag = (dmabuf > 0 ? 1 : 0); for (i = 0; i < ARRAY_SIZE(dev_list); i++) { - device_create(sound_class, NULL, - MKDEV(SOUND_MAJOR, dev_list[i].minor), - "%s", dev_list[i].name); - if (!dev_list[i].num) continue; - - for (j = 1; j < *dev_list[i].num; j++) - device_create(sound_class, NULL, - MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)), - "%s%d", dev_list[i].name, j); + for (j = 0; j < *dev_list[i].num; j++) + register_sound_special(&oss_sound_fops, + dev_list[i].minor + (j * 0x10)); } if (sound_nblocks >= 1024) @@ -584,11 +574,10 @@ static void __exit oss_cleanup(void) int i, j; for (i = 0; i < ARRAY_SIZE(dev_list); i++) { - device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor)); if (!dev_list[i].num) continue; - for (j = 1; j < *dev_list[i].num; j++) - device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10))); + for (j = 0; j < *dev_list[i].num; j++) + unregister_sound_special(dev_list[i].minor + (j * 0x10)); } unregister_sound_special(1); diff --git a/sound/sound_core.c b/sound/sound_core.c index 46daca1..3a22848 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c @@ -259,6 +259,9 @@ int register_sound_special_device(const struct file_operations *fops, int unit, case 4: name = "audio"; break; + case 5: + name = "dspW"; + break; case 8: name = "sequencer2"; if (unit >= SOUND_STEP) -
| Al Viro | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [2.6.22.2 review 05/84] Fix deadlocks in sparc serial console. |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Greg Kroah-Hartman | [PATCH 006/196] Chinese: add translation of oops-tracing.txt |
git: | |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Linus Torvalds | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Manuel Bouyer | Re: Interactive performance in -current |
| YAMAMOTO Takashi | Re: statvfs(2) replacement for statfs(2) patch |
| Nathan Langford | microkernels |
| Garrett D'Amore | Re: wsmux inject |
