static __devinit int msm_pcm_probe(struct platform_device *pdev)
{
	int rc;

	if (!is_voc_initialized()) {
		pr_debug("%s: voice module not initialized yet, deferring probe()\n",
		       __func__);

		rc = -EPROBE_DEFER;
		goto done;
	}

	rc = voc_alloc_cal_shared_memory();
	if (rc == -EPROBE_DEFER) {
		pr_debug("%s: memory allocation for calibration deferred %d\n",
			 __func__, rc);

		goto done;
	} else if (rc < 0) {
		pr_err("%s: memory allocation for calibration failed %d\n",
		       __func__, rc);
	}

	if (pdev->dev.of_node)
		dev_set_name(&pdev->dev, "%s", "msm-pcm-voice");

	pr_debug("%s: dev name %s\n", __func__, dev_name(&pdev->dev));
	rc = snd_soc_register_platform(&pdev->dev,
				       &msm_soc_platform);

done:
	return rc;
}
static int msm_pcm_probe(struct platform_device *pdev)
{
	int rc;
	bool destroy_cvd = false;
	bool vote_bms = false;
	const char *is_destroy_cvd = "qcom,destroy-cvd";
	const char *is_vote_bms = "qcom,vote-bms";

	if (!is_voc_initialized()) {
		pr_debug("%s: voice module not initialized yet, deferring probe()\n",
		       __func__);

		rc = -EPROBE_DEFER;
		goto done;
	}

	rc = voc_alloc_cal_shared_memory();
	if (rc == -EPROBE_DEFER) {
		pr_debug("%s: memory allocation for calibration deferred %d\n",
			 __func__, rc);

		goto done;
	} else if (rc < 0) {
		pr_err("%s: memory allocation for calibration failed %d\n",
		       __func__, rc);
	}

	if (pdev->dev.of_node)
		dev_set_name(&pdev->dev, "%s", "msm-pcm-voice");
	pr_debug("%s: dev name %s\n",
			__func__, dev_name(&pdev->dev));
	destroy_cvd = of_property_read_bool(pdev->dev.of_node,
						is_destroy_cvd);
	voc_set_destroy_cvd_flag(destroy_cvd);

	vote_bms = of_property_read_bool(pdev->dev.of_node,
					 is_vote_bms);
	voc_set_vote_bms_flag(vote_bms);

	rc = snd_soc_register_platform(&pdev->dev,
				       &msm_soc_platform);

done:
	return rc;
}