From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750982AbWDJR2K (ORCPT ); Mon, 10 Apr 2006 13:28:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751077AbWDJR2K (ORCPT ); Mon, 10 Apr 2006 13:28:10 -0400 Received: from mail.suse.de ([195.135.220.2]:11945 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S1750982AbWDJR2J (ORCPT ); Mon, 10 Apr 2006 13:28:09 -0400 Date: Mon, 10 Apr 2006 19:28:04 +0200 Message-ID: From: Takashi Iwai To: Rene Herman Cc: ALSA devel , Linux Kernel , Greg Kroah-Hartman Subject: Re: [Alsa-devel] Re: [ALSA 1/2] continue on IS_ERR from platform device registration In-Reply-To: <443692B2.7000309@keyaccess.nl> References: <44347822.9050206@keyaccess.nl> <443692B2.7000309@keyaccess.nl> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta25) (eggplant) (+CVS-20060326) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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