OSDN Git Service

ALSA: Embed card device into struct snd_card
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Jan 2014 10:46:11 +0000 (11:46 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2014 07:14:12 +0000 (08:14 +0100)
commit8bfb181c17d20956f156e84638912e00e1aaca86
treef5d9c93a0a5d23779d85a0378c351fa8c00aa144
parent133450953040c9c6af986f65821a5ccebbe16e27
ALSA: Embed card device into struct snd_card

As prepared in the previous patch, we are ready to create a device
struct for the card object in snd_card_create() now.  This patch
changes the scheme from the old style to:

- embed a device struct for the card object into snd_card struct,
- initialize the card device in snd_card_create() (but not register),
- registration is done in snd_card_register() via device_add()

The actual card device is stored in card->card_dev.  The card->dev
pointer is kept unchanged and pointing to the parent device as before
for compatibility reason.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/core.h
sound/core/init.c