From: Sergiu Iordache Date: Wed, 3 Aug 2011 00:52:31 +0000 (+1000) Subject: Update the module parameters when platform data is used. This means that X-Git-Tag: next-20110803~1^2~111 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f9515319a127eba6ceef8d92431d4bf1c777be4b;p=karo-tx-linux.git 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 --- 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");