From: Takashi Iwai Subject: Re: Help with snd_card_set_dev Date: Wed, 04 Oct 2006 12:48:24 +0200 Message-ID: References: <20061002183044.327630@gmx.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20061002183044.327630@gmx.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: matthias.goerner@gmx.net Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Mon, 02 Oct 2006 20:30:44 +0200, matthias.goerner@gmx.net wrote: > > What are "snd_card_set_dev" and "snd_card_set_generic_dev" good for? > I read the Writing ALSA drivers by Takashi Iwai but didn't > understand the chapter on it. How can snd_card_set_dev be useful if > it is ones passed a struct for PCI and then for ISA? The driver core requires the struct device pointer for sysfs. This is referred by HAL later and almost mandatory. The snd_card_set_dev() macro is introduced just for the backward compatibility with 2.2/2.4 kernels. In the 2.6 kernels, it just do card->dev = &pci_dev->dev; snd_card_set_generic_dev() is obsolete and no longer used. Takashi ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV