lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20061011225231.GA30151@kroah.com>
Date:	Wed, 11 Oct 2006 15:52:31 -0700
From:	Greg KH <greg@...ah.com>
To:	Jaroslav Kysela <perex@...e.cz>
Cc:	Kay Sievers <kay.sievers@...y.org>,
	LKML <linux-kernel@...r.kernel.org>, Takashi Iwai <tiwai@...e.de>
Subject: Re: sysfs & ALSA card

On Mon, Oct 09, 2006 at 08:24:55AM +0200, Jaroslav Kysela wrote:
> On Sat, 7 Oct 2006, Kay Sievers wrote:
> 
> > On Sat, Oct 07, 2006 at 02:55:31PM +0200, Kay Sievers wrote:
> > > On Sat, 2006-10-07 at 00:44 -0700, Greg KH wrote: 
> > > >  $ tree /sys/class/sound/
> > > >  /sys/class/sound/
> > > >  |-- Audigy2 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2
> > > >  |-- admmidi1 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/admmidi1
> > 
> > > > Yeah, I picked the wrong name for the card, it should be "card1" instead
> > > > of "Audigy2" here, but you get the idea.
> > > 
> > > That looks nice. Yeah, it should something that matches to the C1 in the
> > > other names.
> > 
> > This works fine for me with two soundcards and connect/disconnect
> > module load/unload.
> > 
> > All devices are in a flat list in the class directory, also the card%i
> > ones:
> >   $ tree /sys/class/sound/
> >   /sys/class/sound/
> >   |-- adsp -> ../../devices/pci0000:00/0000:00:1e.2/card0/adsp
> 
> ....
> 
> > In the /sys/devices hierarchy all devices belonging to the same card are
> > nicely below the card device:
> >   $ ls -l /sys/devices/pci0000:00/0000:00:1e.2/card0
> >   total 0
> >   drwxr-xr-x 3 root root    0 2006-10-07 21:09 0-0:AD1981B
> >   drwxr-xr-x 3 root root    0 2006-10-07 21:09 adsp
> >   drwxr-xr-x 3 root root    0 2006-10-07 21:09 audio
> 
> ....
> 
> The implementation looks good (Acked-by: Jaroslav Kysela <perex@...e.cz>).
> Please, fix this small typo:
> 
> > --- linux-2.6.orig/sound/core/sound.c
> > +++ linux-2.6/sound/core/sound.c
> > @@ -268,11 +268,10 @@ int snd_register_device(int type, struct
> >  	snd_minors[minor] = preg;
> >  	if (card)
> >  		device = card->dev;
> > -	preg->class_dev = class_device_create(sound_class, NULL,
> > -					      MKDEV(major, minor),
> > -					      device, "%s", name);
> > -	if (preg->class_dev)
> > -		class_set_devdata(preg->class_dev, private_data);
> > +	preg->dev = device_create(sound_class, device, MKDEV(major, minor),
> > +				  "%s", name);
> > +	if (preg->dev)
> > +		dev_get_drvdata(preg->dev);
> 
> I think, it should be:
> 
> 	if (preg->dev)
> 		dev_set_drvdata(preg->dev, private_data);

Ick, you are correct, sorry about that.

I've fixed it now in my tree.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ