From 66cadf2cf6c197d1daab4b22f2138307072df85c Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 6 Nov 2007 11:56:02 +0100 Subject: [PATCH] --- yaml --- r: 84213 b: refs/heads/master c: 235d6200ea63372935e097cb82e6a8c133d51cad h: refs/heads/master i: 84211: 30568e9c819a7b7732001a1f18a69eec971e4e6d v: v3 --- [refs] | 2 +- trunk/drivers/mtd/mtdoops.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index f35b4007128e..9851b8feda3f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 256331d53a40f436cd0b16166621d819923145c8 +refs/heads/master: 235d6200ea63372935e097cb82e6a8c133d51cad diff --git a/trunk/drivers/mtd/mtdoops.c b/trunk/drivers/mtd/mtdoops.c index f8af627f0b98..20eaf294f620 100644 --- a/trunk/drivers/mtd/mtdoops.c +++ b/trunk/drivers/mtd/mtdoops.c @@ -286,7 +286,6 @@ mtdoops_console_write(struct console *co, const char *s, unsigned int count) { struct mtdoops_context *cxt = co->data; struct mtd_info *mtd = cxt->mtd; - int i; if (!oops_in_progress) { mtdoops_console_sync(); @@ -305,10 +304,8 @@ mtdoops_console_write(struct console *co, const char *s, unsigned int count) if ((count + cxt->writecount) > OOPS_PAGE_SIZE) count = OOPS_PAGE_SIZE - cxt->writecount; - for (i = 0; i < count; i++, s++) - *((char *)(cxt->oops_buf) + cxt->writecount + i) = *s; - - cxt->writecount = cxt->writecount + count; + memcpy(cxt->oops_buf + cxt->writecount, s, count); + cxt->writecount += count; } static int __init mtdoops_console_setup(struct console *co, char *options)