From: Sergiu Iordache Date: Wed, 3 Aug 2011 23:21:09 +0000 (-0700) Subject: ramoops: update module parameters X-Git-Tag: firefly_0821_release~3680^2~4762 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f7b9fcbbc3b8593ff7dc587f90c2fe90a2fd1e6f;p=firefly-linux-kernel-4.4.55.git ramoops: update module parameters 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c index fca0c51bbc90..810aff9e750f 100644 --- a/drivers/char/ramoops.c +++ b/drivers/char/ramoops.c @@ -147,6 +147,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");