[cpia] Compiling against 2.4test9 kernel
Peter Pregler
Peter_Pregler@email.com
Thu, 19 Oct 2000 08:42:12 +0200
Hi,
I will have a look at 2.4test9 over the weekend. Since I want to play
with DRI and OpenGL a bit this is a good opportunity to try out a new
kernel. As a quick fix, the code in question was copied from other
drivers (see the comment at the beginning of the routines). Check out
the bttv-driver and see what they did. I am pretty sure they fixed it
properly.
Greetings, Peter
On Wed, Oct 18, 2000 at 11:55:25PM +0200, Remko Troncon wrote:
> Hi,
>
> I think this bug was posted before, but i didn't see any answer, so
> i will give it a try:
>
> Compiling cpia.c against a 2.4test9 kernel results in a compiler error,
> mentioned earlier on this mailing list.
> I started looking around and saw that this was due to the removal of
> the MAP_NR macro from the kernel source, and due to a small cast
> problem.
> I modified the code a just a little bit (modifications are attached), and
> cpia.c compiled nicely. But, when insmodding cpia_usb.o, the kernel paniced
> somewhere in reset_camera().
> Is there a solution to this problem ? Or is this due to my modifications ?
>
> thanks,
>
>
> ___________________________________________________________________
> Remko Troncon <spike@ulyssis.org> http://spike.ulyssis.org
> 271,272c271,272
> < ret = page_address(pte_page(pte)) |
> < (adr & (PAGE_SIZE-1));
> > ret = ((unsigned long) page_address(pte_page(pte))) |
> > (adr & (PAGE_SIZE-1));
> 312c312
> < #else
> > #elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
> 313a314,315
> > #else
> > mem_map_reserve(virt_to_page(__va(page)));
> 340c342
> < #else
> > #elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
> 341a344,345
> > #else
> > mem_map_unreserve(virt_to_page(__va(page)));
--
I will not waste chalk. --Bart Simpson at the blackboard
--------------------------------------------------------
Email: Peter_Pregler@email.com
WWW: http://www.risc.uni-linz.ac.at/people/ppregler
ICQ: 61011460