diff options
Diffstat (limited to 'drivers/char/ramoops.c')
-rw-r--r-- | drivers/char/ramoops.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c index 7c7f42a1f880..9fec3232b736 100644 --- a/drivers/char/ramoops.c +++ b/drivers/char/ramoops.c | |||
@@ -83,8 +83,7 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper, | |||
83 | struct timeval timestamp; | 83 | struct timeval timestamp; |
84 | 84 | ||
85 | if (reason != KMSG_DUMP_OOPS && | 85 | if (reason != KMSG_DUMP_OOPS && |
86 | reason != KMSG_DUMP_PANIC && | 86 | reason != KMSG_DUMP_PANIC) |
87 | reason != KMSG_DUMP_KEXEC) | ||
88 | return; | 87 | return; |
89 | 88 | ||
90 | /* Only dump oopses if dump_oops is set */ | 89 | /* Only dump oopses if dump_oops is set */ |
@@ -126,8 +125,8 @@ static int __init ramoops_probe(struct platform_device *pdev) | |||
126 | goto fail3; | 125 | goto fail3; |
127 | } | 126 | } |
128 | 127 | ||
129 | rounddown_pow_of_two(pdata->mem_size); | 128 | pdata->mem_size = rounddown_pow_of_two(pdata->mem_size); |
130 | rounddown_pow_of_two(pdata->record_size); | 129 | pdata->record_size = rounddown_pow_of_two(pdata->record_size); |
131 | 130 | ||
132 | /* Check for the minimum memory size */ | 131 | /* Check for the minimum memory size */ |
133 | if (pdata->mem_size < MIN_MEM_SIZE && | 132 | if (pdata->mem_size < MIN_MEM_SIZE && |
@@ -148,14 +147,6 @@ static int __init ramoops_probe(struct platform_device *pdev) | |||
148 | cxt->phys_addr = pdata->mem_address; | 147 | cxt->phys_addr = pdata->mem_address; |
149 | cxt->record_size = pdata->record_size; | 148 | cxt->record_size = pdata->record_size; |
150 | cxt->dump_oops = pdata->dump_oops; | 149 | cxt->dump_oops = pdata->dump_oops; |
151 | /* | ||
152 | * Update the module parameter variables as well so they are visible | ||
153 | * through /sys/module/ramoops/parameters/ | ||
154 | */ | ||
155 | mem_size = pdata->mem_size; | ||
156 | mem_address = pdata->mem_address; | ||
157 | record_size = pdata->record_size; | ||
158 | dump_oops = pdata->dump_oops; | ||
159 | 150 | ||
160 | if (!request_mem_region(cxt->phys_addr, cxt->size, "ramoops")) { | 151 | if (!request_mem_region(cxt->phys_addr, cxt->size, "ramoops")) { |
161 | pr_err("request mem region failed\n"); | 152 | pr_err("request mem region failed\n"); |
@@ -176,6 +167,15 @@ static int __init ramoops_probe(struct platform_device *pdev) | |||
176 | goto fail1; | 167 | goto fail1; |
177 | } | 168 | } |
178 | 169 | ||
170 | /* | ||
171 | * Update the module parameter variables as well so they are visible | ||
172 | * through /sys/module/ramoops/parameters/ | ||
173 | */ | ||
174 | mem_size = pdata->mem_size; | ||
175 | mem_address = pdata->mem_address; | ||
176 | record_size = pdata->record_size; | ||
177 | dump_oops = pdata->dump_oops; | ||
178 | |||
179 | return 0; | 179 | return 0; |
180 | 180 | ||
181 | fail1: | 181 | fail1: |