OSDN Git Service

ASoC: dapm: Pass card instead of dapm context to dapm_power_widgets()
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 29 Jul 2013 15:13:56 +0000 (17:13 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 29 Jul 2013 17:40:59 +0000 (18:40 +0100)
commit95dd5cd6e16d86786f7dc9da404ae477403d8f83
tree807db53d68165fe9bb825e53d9b0ab282d572431
parent564c65049eddb1a95b48958080db97eda88c98dd
ASoC: dapm: Pass card instead of dapm context to dapm_power_widgets()

DAPM operations are always performed on the card as a whole. Yet (primarily for
historic reasons) dapm_power_widgets() takes a DAPM context as its parameter.
The DAPM context is mainly used to look up a pointer to the card.  The same is
true for a couple of functions that are being called from dapm_power_widgets().
This patch changes the signature of dapm_power_widgets() and a couple of related
functions to take a snd_soc_card instead of a snd_soc_dapm_context.

Some of the functions also use the DAPM's device to print error and debug
messages. This can be a bit confusing though since this means the messages for
all widgets, also those from other contexts, will be printed with that device.
The patch updates those cases to use the device of the widget's DAPM context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-dapm.c