From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760630AbYD3Geu (ORCPT ); Wed, 30 Apr 2008 02:34:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756388AbYD3Gek (ORCPT ); Wed, 30 Apr 2008 02:34:40 -0400 Received: from mx1.suse.de ([195.135.220.2]:39077 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752530AbYD3Gej (ORCPT ); Wed, 30 Apr 2008 02:34:39 -0400 Date: Wed, 30 Apr 2008 08:34:36 +0200 Message-ID: From: Takashi Iwai To: Stas Sergeev Cc: Greg KH , 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: <481776EA.5010200@aknet.ru> References: <12094266793898@kroah.org> <4816A888.9000802@aknet.ru> <20080429045849.GA6348@suse.de> <481776EA.5010200@aknet.ru> 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 23:28:42 +0400, Stas Sergeev wrote: > > Hello. > > Takashi Iwai wrote: > > Though, I think the snd-pcsp driver could be better built on the top > > of input pcspkr driver, or coexist with it. Then we'll have no more > > conflict about platform name space. > I was trying this in the past. > This never worked out very well. Why? > I disliked the dependancies. > Either snd-pcsp was loading pcspkr, > or there had to be the global variable > to prevent the concurrent access, and > that hurts modularity. But you anyway enable the input pcspkr feature in your snd-pcsp code. So, basically you depend on (or build on) it. > > When you compare input pcspkr.c and sound pcsp_input.c, you can find > > that most of codes are identical. > Yep, its a copy/paste mainly. > I wanted a complete replacement. > Back then, I've been told that multiple > drivers controlling the same device is > never a good idea. But I won't be surprised > if that have changed since. :) > > > What we'd need is a hook on > > pcspkr.c that adds a dynamic check whether snd-pcsp (or any ohter) > > is running. > How? What you need is a way to check whether input pcspkr can be usable or not. You can add a function pointer, for example. > And also, with snd-pcsp you have a > mixer control to disable the beeps, > which I find sometimes even more > usefull than the pcm sound itself. :) Yes, that seems useful. Takashi