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

Commit 68a6f50d authored by Chris Lew's avatar Chris Lew Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: msm_smem: Pass device structure to ramdump driver



The ramdump driver uses the device pointer during ramdump read.
This change passes in the device pointer for smem during
ramdump create and moves the call to the probe function.

CRs-Fixed: 1075262
Change-Id: I6234e35d76440beb53c139ad0b02ec8b49c2a196
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent e6574109
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ static int spinlocks_initialized;
static void *smem_ramdump_dev;
static DEFINE_MUTEX(spinlock_init_lock);
static DEFINE_SPINLOCK(smem_init_check_lock);
static struct device *smem_dev;
static int smem_module_inited;
static RAW_NOTIFIER_HEAD(smem_module_init_notifier_list);
static DEFINE_MUTEX(smem_module_init_notifier_lock);
@@ -1047,7 +1048,8 @@ static __init int modem_restart_late_init(void)
	void *handle;
	struct restart_notifier_block *nb;

	smem_ramdump_dev = create_ramdump_device("smem", NULL);
	if (smem_dev)
		smem_ramdump_dev = create_ramdump_device("smem", smem_dev);
	if (IS_ERR_OR_NULL(smem_ramdump_dev)) {
		LOG_ERR("%s: Unable to create smem ramdump device.\n",
			__func__);
@@ -1444,7 +1446,7 @@ smem_targ_info_done:
		SMEM_INFO("smem security enabled\n");
		smem_init_security();
	}

	smem_dev = &pdev->dev;
	probe_done = true;

	ret = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);