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

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

Merge "memshare: Pass device structure to ramdump driver"

parents 0307dd36 88a8c0ce
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ static DECLARE_DELAYED_WORK(work_recv_msg, mem_share_svc_recv_msg);
static struct workqueue_struct *mem_share_svc_workqueue;
static uint64_t bootup_request;
static void *memshare_ramdump_dev[MAX_CLIENTS];
static struct device *memshare_dev[MAX_CLIENTS];

/* Memshare Driver Structure */
struct memshare_driver {
@@ -145,9 +146,14 @@ static int mem_share_configure_ramdump(void)
	}

	snprintf(client_name, 18, "memshare_%s", clnt);

	memshare_ramdump_dev[num_clients] = create_ramdump_device(client_name,
								NULL);
	if (memshare_dev[num_clients]) {
		memshare_ramdump_dev[num_clients] =
			create_ramdump_device(client_name,
				memshare_dev[num_clients]);
	} else {
		pr_err("memshare:%s: invalid memshare device\n", __func__);
		return -ENODEV;
	}
	if (IS_ERR_OR_NULL(memshare_ramdump_dev[num_clients])) {
		pr_err("memshare: %s: Unable to create memshare ramdump device.\n",
				__func__);
@@ -957,6 +963,8 @@ static int memshare_child_probe(struct platform_device *pdev)
	 *  memshare clients
	 */

	memshare_dev[num_clients] = &pdev->dev;

	if (!memblock[num_clients].file_created) {
		rc = mem_share_configure_ramdump();
		if (rc)