diff options
| author | Chris Lew <clew@codeaurora.org> | 2016-10-12 14:13:52 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-10-14 13:39:41 -0700 |
| commit | 68a6f50d3cfb615f84e46873d39dd67eb1d5bc58 (patch) | |
| tree | ce7d4a3312c43d65dea2d6d6d1c1cef9bd618adb /drivers | |
| parent | e657410985b5d33b0b4e76f08587345e9fb195ce (diff) | |
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: Chris Lew <clew@codeaurora.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/soc/qcom/msm_smem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/soc/qcom/msm_smem.c b/drivers/soc/qcom/msm_smem.c index 881359d444fc..cd3d387645fd 100644 --- a/drivers/soc/qcom/msm_smem.c +++ b/drivers/soc/qcom/msm_smem.c @@ -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); |
