Merge "memshare: Pass device structure to ramdump driver"
This commit is contained in:
commit
a39b207b2b
1 changed files with 11 additions and 3 deletions
|
@ -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 struct workqueue_struct *mem_share_svc_workqueue;
|
||||||
static uint64_t bootup_request;
|
static uint64_t bootup_request;
|
||||||
static void *memshare_ramdump_dev[MAX_CLIENTS];
|
static void *memshare_ramdump_dev[MAX_CLIENTS];
|
||||||
|
static struct device *memshare_dev[MAX_CLIENTS];
|
||||||
|
|
||||||
/* Memshare Driver Structure */
|
/* Memshare Driver Structure */
|
||||||
struct memshare_driver {
|
struct memshare_driver {
|
||||||
|
@ -145,9 +146,14 @@ static int mem_share_configure_ramdump(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(client_name, 18, "memshare_%s", clnt);
|
snprintf(client_name, 18, "memshare_%s", clnt);
|
||||||
|
if (memshare_dev[num_clients]) {
|
||||||
memshare_ramdump_dev[num_clients] = create_ramdump_device(client_name,
|
memshare_ramdump_dev[num_clients] =
|
||||||
NULL);
|
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])) {
|
if (IS_ERR_OR_NULL(memshare_ramdump_dev[num_clients])) {
|
||||||
pr_err("memshare: %s: Unable to create memshare ramdump device.\n",
|
pr_err("memshare: %s: Unable to create memshare ramdump device.\n",
|
||||||
__func__);
|
__func__);
|
||||||
|
@ -957,6 +963,8 @@ static int memshare_child_probe(struct platform_device *pdev)
|
||||||
* memshare clients
|
* memshare clients
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
memshare_dev[num_clients] = &pdev->dev;
|
||||||
|
|
||||||
if (!memblock[num_clients].file_created) {
|
if (!memblock[num_clients].file_created) {
|
||||||
rc = mem_share_configure_ramdump();
|
rc = mem_share_configure_ramdump();
|
||||||
if (rc)
|
if (rc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue