From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757336AbYD2Qla (ORCPT ); Tue, 29 Apr 2008 12:41:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753394AbYD2QlW (ORCPT ); Tue, 29 Apr 2008 12:41:22 -0400 Received: from ns.suse.de ([195.135.220.2]:38444 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752877AbYD2QlW (ORCPT ); Tue, 29 Apr 2008 12:41:22 -0400 Date: Tue, 29 Apr 2008 18:41:20 +0200 Message-ID: From: Takashi Iwai To: Greg KH Cc: Stas Sergeev , Linux kernel , Dmitry Torokhov Subject: Re: patch driver-core-warn-about-duplicate-driver-names-on-the-same-bus.patch added to gregkh-2.6 tree In-Reply-To: <20080429151436.GB10587@suse.de> References: <12094266793898@kroah.org> <4816A888.9000802@aknet.ru> <20080429045849.GA6348@suse.de> <20080429151436.GB10587@suse.de> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Tue, 29 Apr 2008 08:14:36 -0700, Greg KH wrote: > > On Tue, Apr 29, 2008 at 12:41:56PM +0200, Takashi Iwai wrote: > > At Mon, 28 Apr 2008 21:58:49 -0700, > > Greg KH wrote: > > > > > > On Tue, Apr 29, 2008 at 08:48:08AM +0400, Stas Sergeev wrote: > > > > Hello. > > > > > > > > gregkh@suse.de wrote: > > > > > This is a note to let you know that I've just added the patch titled > > > > > Subject: driver core: warn about duplicate driver names on the same bus > > > > > to my gregkh-2.6 tree. Its filename is > > > > Thanks. > > > > > > > > Takashi, do you think this fixes the > > > > pcspkr/snd-pcsp conflict sufficienly > > > > well? I think the Kconfig protection > > > > is no longer needed. For the better > > > > convinience the modprobe rule can be > > > > created that will remove one driver > > > > before inserting another. But this is > > > > optional. > > > > > > No, don't rely on the driver core warning and catching code errors like > > > this, that's not a good idea at all. I like the warning and your patch, > > > but don't assume it's always going to be there. > > > > But multiple drivers for the same device are allowed on other buses > > like PCI. I think this is no reason to prohibit the multiple platform > > drivers for the same platform device. > > No, the driver core doesn't allow that at all right now (I'm working on > fixing that though...) > > What this patch did is just not allow you to have the same "name" for > the driver on the same bus, which is reasonable as without the check, > sysfs complains about trying to create a duplicate name in the same > directory. > > Different names is fine, and I'll continue to work on the ability to > allow multiple drivers for the same device at the same time... Well, I wasn't clear enough -- currently we prohibit the *build* of snd-pcsp driver when input pcspkr driver is built, regardless whether module or built-in. The reason is that sysfs spews an error with a stack trace when the platform name conflicts, and this appears to be a serious error. Disabling the build is the simplest solution in such a case (when considering built-in driver). Now, with this patch, the platform name conflict appears non-critical, and the driver should handle properly for the returned error code. Thus, there shouldn't be a big obstacle to *build* both drivers. Takashi