lkml.org 
[lkml]   [2007]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [Alsa-devel] [PATCH] alsa: correct nonsensical sysfs device symlinks
Updated version of patch also taking into account feedback from
Takashi is attached.

I'm going to look at hald now.

Monty
diff -uprN -X linux-2.6.20-rc5/Documentation/dontdiff linux-2.6.20-rc5/sound/core/sound.c linux-2.6.20-rc5-monty/sound/core/sound.c
--- linux-2.6.20-rc5/sound/core/sound.c 2007-01-12 13:54:26.000000000 -0500
+++ linux-2.6.20-rc5-monty/sound/core/sound.c 2007-01-25 12:31:28.000000000 -0500
@@ -264,8 +264,10 @@ int snd_register_device(int type, struct
}
snd_minors[minor] = preg;
if (card)
- device = card->dev;
- preg->dev = device_create(sound_class, device, MKDEV(major, minor),
+ device = card->parent;
+ preg->dev = device_create(sound_class,
+ device,
+ MKDEV(major, minor),
"%s", name);
if (preg->dev)
dev_set_drvdata(preg->dev, private_data);
diff -uprN -X linux-2.6.20-rc5/Documentation/dontdiff linux-2.6.20-rc5/sound/sound_core.c linux-2.6.20-rc5-monty/sound/sound_core.c
--- linux-2.6.20-rc5/sound/sound_core.c 2007-01-12 13:54:26.000000000 -0500
+++ linux-2.6.20-rc5-monty/sound/sound_core.c 2007-01-25 12:04:30.000000000 -0500
@@ -170,7 +170,8 @@ static int sound_insert_unit(struct soun
else
sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP);

- device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor),
+ device_create(sound_class, (dev?dev->parent:NULL),
+ MKDEV(SOUND_MAJOR, s->unit_minor),
s->name+6);
return r;
\
 
 \ /
  Last update: 2007-01-25 18:51    [W:0.051 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site