public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jaroslav Kysela <perex@suse.cz>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
	LKML <linux-kernel@vger.kernel.org>, Takashi Iwai <tiwai@suse.de>
Subject: Re: sysfs & ALSA card
Date: Wed, 11 Oct 2006 15:52:31 -0700	[thread overview]
Message-ID: <20061011225231.GA30151@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0610090820230.8665@tm8103.perex-int.cz>

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@suse.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

      reply	other threads:[~2006-10-11 22:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06 14:00 sysfs & ALSA card Jaroslav Kysela
2006-10-07  6:24 ` Greg KH
2006-10-07  7:44   ` Greg KH
2006-10-07 12:55     ` Kay Sievers
2006-10-07 19:12       ` Kay Sievers
2006-10-07 20:08         ` Greg KH
2006-10-09  6:24         ` Jaroslav Kysela
2006-10-11 22:52           ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061011225231.GA30151@kroah.com \
    --to=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@suse.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox