Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260436
b: refs/heads/master
c: 6b4d2a2
h: refs/heads/master
v: v3
  • Loading branch information
Sergiu Iordache authored and Linus Torvalds committed Jul 26, 2011
1 parent df5e7ff commit 95d5157
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0169256e4bbf29e507cdd1df5812c093d610f1d5
refs/heads/master: 6b4d2a2733b9a17112f746d498c9f9a0427dcdd8
5 changes: 4 additions & 1 deletion trunk/drivers/char/ramoops.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ static struct ramoops_context {
void *virt_addr;
phys_addr_t phys_addr;
unsigned long size;
int dump_oops;
int count;
int max_count;
} oops_cxt;
Expand All @@ -80,7 +81,7 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
return;

/* Only dump oopses if dump_oops is set */
if (reason == KMSG_DUMP_OOPS && !dump_oops)
if (reason == KMSG_DUMP_OOPS && !cxt->dump_oops)
return;

buf = cxt->virt_addr + (cxt->count * RECORD_SIZE);
Expand Down Expand Up @@ -128,6 +129,7 @@ static int __init ramoops_probe(struct platform_device *pdev)
cxt->count = 0;
cxt->size = pdata->mem_size;
cxt->phys_addr = pdata->mem_address;
cxt->dump_oops = pdata->dump_oops;

if (!request_mem_region(cxt->phys_addr, cxt->size, "ramoops")) {
pr_err("request mem region failed\n");
Expand Down Expand Up @@ -194,6 +196,7 @@ static int __init ramoops_init(void)
return -ENOMEM;
dummy_data->mem_size = mem_size;
dummy_data->mem_address = mem_address;
dummy_data->dump_oops = dump_oops;
dummy = platform_create_bundle(&ramoops_driver, ramoops_probe,
NULL, 0, dummy_data,
sizeof(struct ramoops_platform_data));
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/ramoops.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
struct ramoops_platform_data {
unsigned long mem_size;
unsigned long mem_address;
int dump_oops;
};

#endif

0 comments on commit 95d5157

Please sign in to comment.