# compile viafb problem....

## michaelk

Hi Everyone,

Anyone managed to compile viafb module with recent kernels?

Can be downloaded from here:

http://www.viaarena.com/default.aspx?PageID=420&OSID=25&CatID=2580&SubCatID=101

I'm using the Linux-FBDev-kernel-src_2.6.00.02 

compiler: gcc version 4.1.1

kernel: 2.6.17-gentoo-r7

This is what happens:

```

make -C /usr/src/linux-2.6.17-gentoo-r7 SUBDIRS=/root/viafb  modules

make[1]: Entering directory `/usr/src/linux-2.6.17-gentoo-r7'

  CC [M]  /root/viafb/viafbdev.o

In file included from /root/viafb/viafbdev.c:49:

/root/viafb/via_utility.h:36: warning: function declaration isn't a prototype

/root/viafb/viafbdev.c:100: warning: function declaration isn't a prototype

/root/viafb/viafbdev.c:106: warning: function declaration isn't a prototype

/root/viafb/viafbdev.c: In function 'viafb_setcolreg':

/root/viafb/viafbdev.c:1281: warning: unused variable 'sr15'

/root/viafb/viafbdev.c: In function 'viafb_setcmap':

/root/viafb/viafbdev.c:1360: warning: unused variable 'sr15'

/root/viafb/viafbdev.c: In function 'viafb_ioctl':

/root/viafb/viafbdev.c:1525: warning: ISO C90 forbids mixed declarations and code

/root/viafb/viafbdev.c: In function 'viafb_cursor':

/root/viafb/viafbdev.c:2056: warning: implicit declaration of function 'soft_cursor'

/root/viafb/viafbdev.c: At top level:

/root/viafb/viafbdev.c:2587: warning: function declaration isn't a prototype

/root/viafb/viafbdev.c: In function 'apply_device_setting':

/root/viafb/viafbdev.c:2924: warning: implicit declaration of function 'set_integrated_tv_size'

/root/viafb/viafbdev.c: In function 'retrieve_device_setting':

/root/viafb/viafbdev.c:2937: warning: unused variable 'current_vpos'

/root/viafb/viafbdev.c:2936: warning: unused variable 'current_hpos'

/root/viafb/viafbdev.c: At top level:

/root/viafb/viafbdev.c:3054: warning: function declaration isn't a prototype

/root/viafb/viafbdev.c: In function 'viafb_setup':

/root/viafb/viafbdev.c:3618: warning: assignment makes pointer from integer without a cast

/root/viafb/viafbdev.c: At top level:

/root/viafb/viafbdev.c:3650: warning: initialization from incompatible pointer type

/root/viafb/viafbdev.c:3671: error: expected ')' before string constant

/root/viafb/viafbdev.c:3672: error: expected ')' before string constant

/root/viafb/viafbdev.c:3674: error: expected ')' before string constant

/root/viafb/viafbdev.c:3676: error: expected ')' before string constant

/root/viafb/viafbdev.c:3678: error: expected ')' before string constant

/root/viafb/viafbdev.c:3680: error: expected ')' before string constant

/root/viafb/viafbdev.c:3682: error: expected ')' before string constant

/root/viafb/viafbdev.c:3684: error: expected ')' before string constant

/root/viafb/viafbdev.c:3686: error: expected ')' before string constant

/root/viafb/viafbdev.c:3688: error: expected ')' before string constant

/root/viafb/viafbdev.c:3690: error: expected ')' before string constant

/root/viafb/viafbdev.c:3692: error: expected ')' before string constant

/root/viafb/viafbdev.c:3694: error: expected ')' before string constant

/root/viafb/viafbdev.c:3696: error: expected ')' before string constant

/root/viafb/viafbdev.c:3698: error: expected ')' before string constant

/root/viafb/viafbdev.c:3700: error: expected ')' before string constant

/root/viafb/viafbdev.c:3702: error: expected ')' before string constant

/root/viafb/viafbdev.c:3704: error: expected ')' before string constant

/root/viafb/viafbdev.c:3706: error: expected ')' before string constant

/root/viafb/viafbdev.c:3708: error: expected ')' before string constant

/root/viafb/viafbdev.c:3710: error: expected ')' before string constant

/root/viafb/viafbdev.c:3712: error: expected ')' before string constant

/root/viafb/viafbdev.c:3714: error: expected ')' before string constant

/root/viafb/viafbdev.c:3716: error: expected ')' before string constant

/root/viafb/viafbdev.c:3719: error: expected ')' before string constant

/root/viafb/viafbdev.c: In function 'apply_device_setting':

/root/viafb/viafbdev.c:2927: warning: control reaches end of non-void function

make[2]: *** [/root/viafb/viafbdev.o] Error 1

make[1]: *** [_module_/root/viafb] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.17-gentoo-r7'

make: *** [Default] Error 2

On line 3671 we see:

MODULE_PARM(memsize,"i");

MODULE_PARM(mode,"s");

MODULE_PARM_DESC(mode, "Set resolution (default=640x480)");

MODULE_PARM(mode1,"s");

MODULE_PARM_DESC(mode1, "Set resolution (default=640x480)");

MODULE_PARM(bpp,"i");

MODULE_PARM_DESC(bpp, "Set color depth (default=32bpp)");

MODULE_PARM(bpp1,"i");

.

.

.

```

Any hints?

Thanks in advance,

Michael

----------

