All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] char drivers: ramoops: update module parameters
@ 2011-08-01 21:31 Sergiu Iordache
  0 siblings, 0 replies; only message in thread
From: Sergiu Iordache @ 2011-08-01 21:31 UTC (permalink / raw)
  To: Marco Stornelli
  Cc: Andrew Morton, Sergiu Iordache, Seiji Aguchi, James Bottomley,
	linux-kernel

This patch updates 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.

Change-Id: Ic8cd3b1ff4d1bac0a761ed33c59c27daed83d6cb
Signed-off-by: Sergiu Iordache <sergiu@chromium.org>
---
 drivers/char/ramoops.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

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");
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-01 21:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-01 21:31 [PATCH] char drivers: ramoops: update module parameters Sergiu Iordache

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.