mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Rene Herman <rene.herman@keyaccess.nl>
Cc: ALSA devel <alsa-devel@alsa-project.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [Alsa-devel] Re: [ALSA 1/2] continue on IS_ERR from platform device registration
Date: Mon, 10 Apr 2006 19:28:04 +0200	[thread overview]
Message-ID: <s5hacat49y3.wl%tiwai@suse.de> (raw)
In-Reply-To: <443692B2.7000309@keyaccess.nl>

At Fri, 07 Apr 2006 18:26:26 +0200,
Rene Herman wrote:
> 
> I must say I wasn't aware that ALSA PCI devices at the moment load 
> without devices. Wasn't there even an oft used ALSA configuration script 
> out there that worked by loading all drivers and checking which ones stuck?

Not for PCI.  alsaconf checks the return status of modprobe for ISA
non-PnP devices, though, so we would fix it once if the probe model
were changed.

(snip)
> In the analogy, given that the PCI driver loads even without any of its 
> IDs present means a platform_driver loading without anything present as 
> well isn't, from the view of the driver model, much of a difference 
> after all. PnP doesn't have a "new_id" field, but could have, and I 
> therefore in fact agree by now that it's best to follow PCI's lead here.

Exactly, that's the reason I suggested.  To keep the behavior of
driver consistent.

OTOH, I'm not 100% for that change, because I know that it will break
the old behavior as mentioned in the above.  Such a breakage isn't
always a good buy against just-for-cleanness or consistency...

> > At least it would make the code more simpler, I guess.
> 
> Not significantly.

Well, you can remove the whole

	if (!cards)
		... unregister...

in the probe callback if we follow the pci driver model, i.e. modprobe
doesn't return an error if no device is found at the moment.

> We'd need to seperate the probe() method a bit, so 
> that the things we need before a bind _could_ ever succeed were in the 
> main loop and would make the driver skip device registration if not 
> fullfilled. For example, if with the snd-adlib driver no port= is given, 
> then attempted binds would simply tell you "please specify port" over 
> and over again, something which can only be solved by unloading and 
> reloading the driver, this time specifying the port. This is still a 
> difference due to non-discoverability, and I feel this should still make 
> the driver fail to load.

Hm, surely it's not so intuitive in the case of ISA devices.  Maybe
it'd be better to keep the current behavior:  probe() returns an error
if no device is found at loading...


Takashi

  reply	other threads:[~2006-04-10 17:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-06  2:08 Rene Herman
2006-04-06 19:41 ` Takashi Iwai
2006-04-07 16:26   ` Rene Herman
2006-04-10 17:28     ` Takashi Iwai [this message]
2006-04-10 23:10       ` [Alsa-devel] " Rene Herman
2006-04-11 10:20         ` Takashi Iwai

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=s5hacat49y3.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.herman@keyaccess.nl \
    /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

all inboxes | Powered by JetHome®