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

Commit 73000420 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: smem: Ensure the remote spinlock can be fully initialized"

parents 70128f72 78a0913b
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -1190,6 +1190,18 @@ static int msm_smem_probe(struct platform_device *pdev)
	if (!smem_initialized_check())
		return -ENODEV;

	/*
	 * The software implementation requires smem_find(), which needs
	 * smem_ram_base to be intitialized.  The remote spinlock item is
	 * guarenteed to be allocated by the bootloader, so this is the
	 * safest and earliest place to init the spinlock.
	 */
	ret = init_smem_remote_spinlock();
	if (ret) {
		LOG_ERR("%s: remote spinlock init failed %d\n", __func__, ret);
		return ret;
	}

	key = "irq-reg-base";
	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, key);
	if (!r) {
@@ -1353,12 +1365,6 @@ int __init msm_smem_init(void)
		msm_smem_debug_mask = 0;
	}

	rc = init_smem_remote_spinlock();
	if (rc) {
		LOG_ERR("%s: remote spinlock init failed %d\n", __func__, rc);
		return rc;
	}

	rc = platform_driver_register(&msm_smem_driver);
	if (rc) {
		LOG_ERR("%s: msm_smem_driver register failed %d\n",