static int __init c1_audio_init(void)
{
	int ret;

	mc1n2_set_mclk_source(1);

	c1_snd_device = platform_device_alloc("soc-audio", -1);
	if (!c1_snd_device)
		return -ENOMEM;

	platform_set_drvdata(c1_snd_device, &c1_snd_devdata);
	c1_snd_devdata.dev = &c1_snd_device->dev;

	ret = platform_device_add(c1_snd_device);
	if (ret)
		platform_device_put(c1_snd_device);
	return ret;
}
Example #2
0
int u1_audio_init_jbsammy(void)
{
	int ret;

	mc1n2_set_mclk_source(1);

	u1_snd_device = platform_device_alloc("soc-audio", -1);
	if (!u1_snd_device)
		return -ENOMEM;

	platform_set_drvdata(u1_snd_device, &u1_snd_card_jbsammy);

	ret = platform_device_add(u1_snd_device);
	if (ret) {
		platform_device_put(u1_snd_device);
	}

	return ret;
}