Skip to content

Commit f7b9fcb

Browse files
Sergiu Iordachetorvalds
authored andcommitted
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 <sergiu@chromium.org> Cc: Marco Stornelli <marco.stornelli@gmail.com> Cc: Seiji Aguchi <seiji.aguchi@hds.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f2d34fd commit f7b9fcb

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎drivers/char/ramoops.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,14 @@ static int __init ramoops_probe(struct platform_device *pdev)
147147
cxt->phys_addr = pdata->mem_address;
148148
cxt->record_size = pdata->record_size;
149149
cxt->dump_oops = pdata->dump_oops;
150+
/*
151+
* Update the module parameter variables as well so they are visible
152+
* through /sys/module/ramoops/parameters/
153+
*/
154+
mem_size = pdata->mem_size;
155+
mem_address = pdata->mem_address;
156+
record_size = pdata->record_size;
157+
dump_oops = pdata->dump_oops;
150158

151159
if (!request_mem_region(cxt->phys_addr, cxt->size, "ramoops")) {
152160
pr_err("request mem region failed\n");

0 commit comments

Comments
 (0)