diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-29 11:32:26 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-02 08:42:42 -0500 |
commit | ef46c7af93f98d07cd0ed891f93a26d135785526 (patch) | |
tree | 6635fa69835d0de4fbc5e1449f70095d9d4817f0 /include/sound | |
parent | 7b46160000197209f7ebca8b92bdbb75795c473f (diff) |
ALSA: pcm: Embed struct device
Like previous patches, at this time we embed the struct device into
PCM object. However, this needs a bit more caution: struct snd_pcm
doesn't own one device but two, for both playback and capture! Thus
not struct snd_pcm but struct snd_pcm_str object contains the device.
Along with this change, pcm->dev field is dropped for avoiding
confusion. It was meant to point to a non-standard parent. But,
since now we can touch each struct device directly, we can manipulate
the parent field easily there, too.
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/pcm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index b429b73e875e..735bd0cc7347 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -449,6 +449,7 @@ struct snd_pcm_str { | |||
449 | #endif | 449 | #endif |
450 | #endif | 450 | #endif |
451 | struct snd_kcontrol *chmap_kctl; /* channel-mapping controls */ | 451 | struct snd_kcontrol *chmap_kctl; /* channel-mapping controls */ |
452 | struct device dev; | ||
452 | }; | 453 | }; |
453 | 454 | ||
454 | struct snd_pcm { | 455 | struct snd_pcm { |
@@ -465,7 +466,6 @@ struct snd_pcm { | |||
465 | wait_queue_head_t open_wait; | 466 | wait_queue_head_t open_wait; |
466 | void *private_data; | 467 | void *private_data; |
467 | void (*private_free) (struct snd_pcm *pcm); | 468 | void (*private_free) (struct snd_pcm *pcm); |
468 | struct device *dev; /* actual hw device this belongs to */ | ||
469 | bool internal; /* pcm is for internal use only */ | 469 | bool internal; /* pcm is for internal use only */ |
470 | bool nonatomic; /* whole PCM operations are in non-atomic context */ | 470 | bool nonatomic; /* whole PCM operations are in non-atomic context */ |
471 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | 471 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) |