From 62fa4dc7f782911b7b3867b6360892dcd46d8e69 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Thu, 22 Feb 2007 17:00:41 +0100 Subject: [PATCH] Fix build-failure in drivers/video/s3fb.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Toralf Förster pointed out that drivers/video/s3fb.c would fail to compile: > ... > CC drivers/video/s3fb.o > drivers/video/s3fb.c: In function `s3_pci_remove': > drivers/video/s3fb.c:1003: warning: unused variable `par' > drivers/video/s3fb.c: In function `s3fb_setup': > drivers/video/s3fb.c:1141: error: `mtrr' undeclared (first use in this function) > drivers/video/s3fb.c:1141: error: (Each undeclared identifier is reported only once > drivers/video/s3fb.c:1141: error: for each function it appears in.) > make[2]: *** [drivers/video/s3fb.o] Error 1 > make[1]: *** [drivers/video] Error 2 > make: *** [drivers] Error 2 Here is fix, it also fixes broken boot options. Signed-off-by: Linus Torvalds diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index 3162c37..98919a6 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c @@ -1134,11 +1134,11 @@ static int __init s3fb_setup(char *options) if (!*opt) continue; #ifdef CONFIG_MTRR - else if (!strcmp(opt, "mtrr:")) + else if (!strncmp(opt, "mtrr:", 5)) mtrr = simple_strtoul(opt + 5, NULL, 0); #endif - else if (!strcmp(opt, "fasttext:")) - mtrr = simple_strtoul(opt + 9, NULL, 0); + else if (!strncmp(opt, "fasttext:", 9)) + fasttext = simple_strtoul(opt + 9, NULL, 0); else mode = opt; } -- cgit v0.10.2