Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55900865 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: npu: Register cooling device after host init"

parents a795b58c 92fa876b
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -2302,6 +2302,18 @@ static int npu_probe(struct platform_device *pdev)
		goto error_res_init;
	}

	rc = npu_debugfs_init(npu_dev);
	if (rc)
		goto error_driver_init;

	mutex_init(&npu_dev->dev_lock);

	rc = npu_host_init(npu_dev);
	if (rc) {
		NPU_ERR("unable to init host\n");
		goto error_driver_init;
	}

	if (IS_ENABLED(CONFIG_THERMAL)) {
		tcdev = thermal_of_cooling_device_register(pdev->dev.of_node,
							  "npu", npu_dev,
@@ -2316,18 +2328,6 @@ static int npu_probe(struct platform_device *pdev)
		thermal_cdev_update(tcdev);
	}

	rc = npu_debugfs_init(npu_dev);
	if (rc)
		goto error_driver_init;

	mutex_init(&npu_dev->dev_lock);

	rc = npu_host_init(npu_dev);
	if (rc) {
		NPU_ERR("unable to init host\n");
		goto error_driver_init;
	}

	g_npu_dev = npu_dev;

	return rc;