sound: do not set DEVNAME for OSS devices

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Saturday, July 4, 2009 - 1:59 pm

Gitweb:     http://git.kernel.org/linus/954a973cab37ad5df3f87f08964166abd956cc17
Commit:     954a973cab37ad5df3f87f08964166abd956cc17
Parent:     7a9d56f6a459472bc4383aeb85612d72e79d1818
Author:     Kay Sievers <kay.sievers@suse.de>
AuthorDate: Fri Jul 3 20:56:05 2009 +0200
Committer:  Takashi Iwai <tiwai@suse.de>
CommitDate: Fri Jul 3 23:36:13 2009 +0200

    sound: do not set DEVNAME for OSS devices
    
    Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/sound_core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sound/sound_core.c b/sound/sound_core.c
index 12522e6..a41f8b1 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -10,6 +10,8 @@
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/err.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
 #include <sound/core.h>
 
 #ifdef CONFIG_SOUND_OSS_CORE
@@ -29,6 +31,8 @@ MODULE_LICENSE("GPL");
 
 static char *sound_nodename(struct device *dev)
 {
+	if (MAJOR(dev->devt) == SOUND_MAJOR)
+		return NULL;
 	return kasprintf(GFP_KERNEL, "snd/%s", dev_name(dev));
 }
 
@@ -104,7 +108,6 @@ module_exit(cleanup_soundcore);
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/sound.h>
-#include <linux/major.h>
 #include <linux/kmod.h>
 
 #define SOUND_STEP 16
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sound: do not set DEVNAME for OSS devices, Linux Kernel Mailing List..., (Sat Jul 4, 1:59 pm)