]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Update the module parameters when platform data is used. This means that
authorSergiu Iordache <sergiu@chromium.org>
Wed, 3 Aug 2011 00:52:31 +0000 (10:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 3 Aug 2011 04:17:32 +0000 (14:17 +1000)
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>
drivers/char/ramoops.c

index 0ee72d3b63f31368da7e61ca6c231b8ccf0da321..7c7f42a1f880cc81af6dafd89b73810c7eca34aa 100644 (file)
@@ -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");