projects/linux·commit f7b9fcbb

ramoops: update module parameters

f7b9fcbb · Sergiu Iordache <[email protected]> · 2011-08-03 16:21:09 -07:00

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 <[email protected]>
Cc: Marco Stornelli <[email protected]>
Cc: Seiji Aguchi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
f7b9fcbbc3b8593ff7dc587f90c2fe90a2fd1e6f
Parents
f2d34fd9

Changes

1 files changed · +8 −0

FileStatusAddDelContent
drivers/char/ramoops.cmodified+8−0View file

drivers/char/ramoops.c

View file
diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c
index fca0c51..810aff9 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");