Esempio n. 1
0
static int mioa701_wm9713_probe(struct platform_device *pdev)
{
	int rc;

	if (!machine_is_mioa701())
		return -ENODEV;

	mioa701.dev = &pdev->dev;
	rc = devm_snd_soc_register_card(&pdev->dev, &mioa701);
	if (!rc)
		dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will"
			 "lead to overheating and possible destruction of your device."
			 " Do not use without a good knowledge of mio's board design!\n");
	return rc;
}
static int mioa701_wm9713_probe(struct platform_device *pdev)
{
	int ret;

	if (!machine_is_mioa701())
		return -ENODEV;

	dev_warn(&pdev->dev, "Be warned that incorrect mixers/muxes setup will"
		 "lead to overheating and possible destruction of your device."
		 "Do not use without a good knowledge of mio's board design!\n");

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

	platform_set_drvdata(mioa701_snd_device, &mioa701);

	ret = platform_device_add(mioa701_snd_device);
	if (!ret)
		return 0;

	platform_device_put(mioa701_snd_device);
	return ret;
}