[cpia] Compiling against 2.4test9 kernel

Remko Troncon spike@ulyssis.org
Wed, 18 Oct 2000 23:55:25 +0200


--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii

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

___________________________________________________________________
 Remko Troncon <spike@ulyssis.org>         http://spike.ulyssis.org

--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=cpia_diff

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)));

--AqsLC8rIMeq19msA--