From f9515319a127eba6ceef8d92431d4bf1c777be4b Mon Sep 17 00:00:00 2001 From: Sergiu Iordache Date: Wed, 3 Aug 2011 10:52:31 +1000 Subject: [PATCH] Update the module parameters when platform data is used. This means that they can be read from /sys/module/ramoops/parameters in order to parse the memory area. Signed-off-by: Sergiu Iordache Cc: Marco Stornelli Cc: Seiji Aguchi Signed-off-by: Andrew Morton --- drivers/char/ramoops.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c index 0ee72d3b63f3..7c7f42a1f880 100644 --- a/drivers/char/ramoops.c +++ b/drivers/char/ramoops.c @@ -148,6 +148,14 @@ static int __init ramoops_probe(struct platform_device *pdev) cxt->phys_addr = pdata->mem_address; cxt->record_size = pdata->record_size; cxt->dump_oops = pdata->dump_oops; + /* + * Update the module parameter variables as well so they are visible + * through /sys/module/ramoops/parameters/ + */ + mem_size = pdata->mem_size; + mem_address = pdata->mem_address; + record_size = pdata->record_size; + dump_oops = pdata->dump_oops; if (!request_mem_region(cxt->phys_addr, cxt->size, "ramoops")) { pr_err("request mem region failed\n"); -- 2.39.5