ASoC: ac97: Support multi-platform AC'97
Currently we can only have a single platform built in with AC'97 support due to the use of a global variable to provide the bus operations. Fix this by making that variable a pointer and having the bus drivers set the operations prior to registering. This is not a particularly good or nice approach but it avoids blocking multiplatform and a real fix involves fixing the fairly deep problems with AC'97 support - we should be converting it to a real bus. Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
这个提交包含在:
@@ -179,13 +179,12 @@ static void au1xac97c_ac97_cold_reset(struct snd_ac97 *ac97)
|
||||
}
|
||||
|
||||
/* AC97 controller operations */
|
||||
struct snd_ac97_bus_ops soc_ac97_ops = {
|
||||
static struct snd_ac97_bus_ops ac97c_bus_ops = {
|
||||
.read = au1xac97c_ac97_read,
|
||||
.write = au1xac97c_ac97_write,
|
||||
.reset = au1xac97c_ac97_cold_reset,
|
||||
.warm_reset = au1xac97c_ac97_warm_reset,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(soc_ac97_ops); /* globals be gone! */
|
||||
|
||||
static int alchemy_ac97c_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
@@ -272,6 +271,10 @@ static int au1xac97c_drvprobe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, ctx);
|
||||
|
||||
ret = snd_soc_set_ac97_ops(&ac97c_bus_ops);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = snd_soc_register_component(&pdev->dev, &au1xac97c_component,
|
||||
&au1xac97c_dai_driver, 1);
|
||||
if (ret)
|
||||
|
在新工单中引用
屏蔽一个用户