Thread (12 messages) 12 messages, 2 authors, 2015-09-21

[PATCH v2 4/9] clk: qcom: create virtual child device for TSENS

From: Rajendra Nayak <hidden>
Date: 2015-09-21 04:28:59
Also in: linux-arm-msm, linux-pm


On 09/17/2015 04:09 AM, Stephen Boyd wrote:
On 09/16, Rajendra Nayak wrote:
quoted
@@ -3520,7 +3522,26 @@ static int gcc_msm8960_probe(struct platform_device *pdev)
  	if (IS_ERR(clk))
  		return PTR_ERR(clk);

-	return qcom_cc_probe(pdev, match->data);
+	ret = qcom_cc_probe(pdev, match->data);
+	if (ret)
+		return ret;
+
+	tsens = platform_device_alloc("qcom-tsens", -1);
+	if (!tsens) {
+		ret = -ENOMEM;
+		goto err_alloc;
+	}
+
+	tsens->dev.parent = &pdev->dev;
+	ret = platform_device_add(tsens);
+	if (ret)
+		goto err_add;
platform_device_register_data() instead of all these lines? We
should probably remove the device when this driver is removed
too.
Thanks Stephen, I'll fix it.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help