ASoC: Move card field form platform/codec to component
Both the snd_soc_codec and snd_soc_platform struct do have a pointer to the parent card and both handle this pointer in mostly the same way. This patch moves the card field to the component level which will allow further code consolidation between platforms and CODECS. Since there are only a handful of users of the snd_soc_codec struct's card field (and none of the snd_soc_platform's) these are update in this patch as well, which allows it to be removed from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:

committed by
Mark Brown

parent
093c4e5c3c
commit
00200107a2
@@ -43,7 +43,7 @@ int snd_soc_jack_new(struct snd_soc_codec *codec, const char *id, int type,
|
||||
INIT_LIST_HEAD(&jack->jack_zones);
|
||||
BLOCKING_INIT_NOTIFIER_HEAD(&jack->notifier);
|
||||
|
||||
return snd_jack_new(codec->card->snd_card, id, type, &jack->jack);
|
||||
return snd_jack_new(codec->component.card->snd_card, id, type, &jack->jack);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_jack_new);
|
||||
|
||||
@@ -260,7 +260,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
|
||||
static irqreturn_t gpio_handler(int irq, void *data)
|
||||
{
|
||||
struct snd_soc_jack_gpio *gpio = data;
|
||||
struct device *dev = gpio->jack->codec->card->dev;
|
||||
struct device *dev = gpio->jack->codec->component.card->dev;
|
||||
|
||||
trace_snd_soc_jack_irq(gpio->name);
|
||||
|
||||
|
Reference in New Issue
Block a user