pstore/ram: Add ramoops_console_write_buf api

Allow writing into the ramoops console buffer.

Change-Id: Iff0d69b562e4dae33ea7f8d19412227bebb17e47
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Git-commit: 3e966cff406d9b43a16e07291a918cb2a098e32f
Git-repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Ian Maund <imaund@codeaurora.org>
This commit is contained in:
Arve Hjønnevåg 2014-05-02 20:23:21 -07:00 committed by Ian Maund
parent d44de23781
commit 7132a7f02d
2 changed files with 8 additions and 0 deletions

View File

@ -377,6 +377,12 @@ static int ramoops_init_prz(struct device *dev, struct ramoops_context *cxt,
return 0;
}
void notrace ramoops_console_write_buf(const char *buf, size_t size)
{
struct ramoops_context *cxt = &oops_cxt;
persistent_ram_write(cxt->cprz, buf, size);
}
static int ramoops_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;

View File

@ -67,6 +67,8 @@ void persistent_ram_free_old(struct persistent_ram_zone *prz);
ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz,
char *str, size_t len);
void ramoops_console_write_buf(const char *buf, size_t size);
/*
* Ramoops platform data
* @mem_size memory size for ramoops