Re: 2.6.18-rc4-mm1: drivers/video/sis/ compile error
From: Michal Piotrowski
Date: Sun Aug 13 2006 - 13:17:50 EST
Adrian Bunk wrote:
> On Sun, Aug 13, 2006 at 06:29:46PM +0200, Michal Piotrowski wrote:
>> On 13/08/06, Adrian Bunk <bunk@xxxxxxxxx> wrote:
>>> On Sun, Aug 13, 2006 at 01:24:54AM -0700, Andrew Morton wrote:
>>>> ...
>>>> Changes since 2.6.18-rc3-mm2:
>>>> ...
>>>> +drivers-video-sis-sis_mainh-removal-of-old.patch
>>>> ...
>>>> fbdev updates
>>>> ...
>>> This patch removes too much:
>>> ...
>> I'll take a closer look at this. I have tested this with allyesconfig
>> on 2006-08-08-00-59 mm snapshot,
Not as well as I should.
>> but now it doesn't build when
>> CONFIG_FB_SIS=y (CONFIG_FB_SIS=m builds fine for me).
>>
>> Thanks for pointing that out.
>
> The problem is here:
>
> <-- snip -->
>
> ...
> #ifdef MODULE
> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
> -static int sisfb_mode_idx = -1;
> -#else
> -static int sisfb_mode_idx = MODE_INDEX_NONE; /* Don't use a mode by default if we are a module */
> -#endif
> -#else
> static int sisfb_mode_idx = -1; /* Use a default mode if we are inside the kernel */
> #endif
> ...
>
> <-- snip -->
>
> It's easy to see that you removed too much (or too few, since the
> #ifdef MODULE can be removed - there's also a similar no longer
> required #ifdef MODULE in sis_main.c).
Thanks for your help.
This patch should fix this problem. Tested with CONFIG_FB_SIS=y and CONFIG_FB_SIS=m.
>
> cu
> Adrian
>
Regards,
Michal
--
Michal K. K. Piotrowski
LTG - Linux Testers Group
(http://www.stardust.webpages.pl/ltg/wiki/)
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@xxxxxxxxx>
diff -uprN -X linux-mm/Documentation/dontdiff linux-mm-clean/drivers/video/sis/sis_main.c linux-mm/drivers/video/sis/sis_main.c
--- linux-mm-clean/drivers/video/sis/sis_main.c 2006-08-13 19:12:46.000000000 +0200
+++ linux-mm/drivers/video/sis/sis_main.c 2006-08-13 18:58:49.000000000 +0200
@@ -83,13 +83,7 @@ sisfb_setdefaultparms(void)
sisfb_max = -1;
sisfb_userom = -1;
sisfb_useoem = -1;
-#ifdef MODULE
- /* Module: "None" for 2.4, default mode for 2.5+ */
- sisfb_mode_idx = -1;
-#else
- /* Static: Default mode */
sisfb_mode_idx = -1;
-#endif
sisfb_parm_rate = -1;
sisfb_crt1off = 0;
sisfb_forcecrt1 = -1;
diff -uprN -X linux-mm/Documentation/dontdiff linux-mm-clean/drivers/video/sis/sis_main.h linux-mm/drivers/video/sis/sis_main.h
--- linux-mm-clean/drivers/video/sis/sis_main.h 2006-08-13 19:12:46.000000000 +0200
+++ linux-mm/drivers/video/sis/sis_main.h 2006-08-13 19:06:43.000000000 +0200
@@ -67,9 +67,7 @@ static int sisfb_ypan = -1;
static int sisfb_max = -1;
static int sisfb_userom = 1;
static int sisfb_useoem = -1;
-#ifdef MODULE
static int sisfb_mode_idx = -1; /* Use a default mode if we are inside the kernel */
-#endif
static int sisfb_parm_rate = -1;
static int sisfb_crt1off = 0;
static int sisfb_forcecrt1 = -1;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/