All pastes #467751 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-02 18:12 UTC
rendered paste body
Driver compiled fine with 2.6.19-gentoo-r5.
With 2.6.20-gentoo-r6 and 2.6.20-gentoo-r7 I get this error:
#-------------------------------------------------------------------------------
# Tried to make the driver with the new kernel, but something changed
#-------------------------------------------------------------------------------
cd ~/sheldon/siddk/siddk_plx/drivers/linux/0206
make

   make  -C /lib/modules/2.6.20-gentoo-r6/build M=/home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206 modules
   make[1]: Entering directory `/usr/src/linux-2.6.20-gentoo-r6'
     CC [M]  /home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206/init.o
   /home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206/init.c: In function 'SIPLX_board_init':
   /home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206/init.c:235: warning: passing argument 2 of 'request_irq' from incompatible pointer type
   /home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206/init.c:277:75: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
   /home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206/init.c:277: error: 'INIT_WORK' undeclared (first use in this function)
   /home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206/init.c:277: error: (Each undeclared identifier is reported only once
   /home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206/init.c:277: error: for each function it appears in.)
   make[2]: *** [/home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206/init.o] Error 1
   make[1]: *** [_module_/home/jstile/sheldon/siddk/siddk_plx/drivers/linux/0206] Error 2
   make[1]: Leaving directory `/usr/src/linux-2.6.20-gentoo-r6'
   make: *** [all] Error 2

#-------------------------------------------------------------------------------
# Offending code chunk in init.c on line 235
#-------------------------------------------------------------------------------
   request_irq          //<===Line 235.
   (
     pdx[card_num].irq,
     SIPLX_isr, 	//<===Argument 2: Causing Error: incompatible pointer type 
     SA_SHIRQ,
     kModuleName,
     (ulong *)(card_num + 1)
   )

#-------------------------------------------------------------------------------
# Found annotation for SIPLX_isr in driver source file isr.c
#-------------------------------------------------------------------------------
     //  void SIPLX_isr
     //  Parameters:
     //  int irq:
     //  void *dev_id:
     //  struct pt_regs *regs

#-------------------------------------------------------------------------------
# Description of: request_irq()
# REFERENCE:http://www.linuxhq.com/kernel/v2.6/20/Documentation/pci.txt
#-------------------------------------------------------------------------------
request_irq() will associate an interrupt handler and device handle with an interrupt number.
request_irq() also enables the interrupt.

#-------------------------------------------------------------------------------
# Header prototype of request_irq: /usr/src/linux/include/linux/interrupt.h:82
#-------------------------------------------------------------------------------
extern int request_irq(  unsigned int, 
                         irq_handler_t handler,
                         unsigned long, 
			 const char *, 
			 void *
		       );
#-------------------------------------------------------------------------------
# Definition of request_irq: /usr/src/linux/kernel/irq/manage.c:438:
#-------------------------------------------------------------------------------
    int request_irq(
    		      unsigned int irq,
    		      irq_handler_t handler,
    		      unsigned long irqflags,
    		      const char *devname,
    		      void *dev_id
    		    )

#-------------------------------------------------------------------------------
# Definition of typedef  irqreturn_t: /usr/src/linux/include/linux/interrupt.h:68
#-------------------------------------------------------------------------------
typedef irqreturn_t (*irq_handler_t)(int, void *);