Re: 2.6.18-rc4-mm1: drivers/video/sis/ compile error

Adrian Bunk
2006-08-13T16:40:58Z

On Sun, Aug 13, 2006 at 06:29:46PM +0200, Michal Piotrowski wrote:
> On 13/08/06, Adrian Bunk <bunk@stusta.de> 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, 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).

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed