#include <ctype.h>
-can_irqreturn_t ipci165_irq_handler(int irq, void *dev_id, struct pt_regs *regs);
+can_irqreturn_t ipci165_irq_handler(CAN_IRQ_HANDLER_ARGS(irq_number, dev_id));
int ipci165_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw,
int sampl_pt, int flags);
int ipci165_set_btregs(struct canchip_t *chip, unsigned short btr0,
}
/* grant access to the command buffer */
- can_spin_lock(candev->device_lock);
+ can_spin_lock(&candev->device_lock);
// check command buffer status
if (readb(dpram_addr + OF_BCI_SYNC) != 0)
{
/* something went wrong ... */
- can_spin_unlock(candev->device_lock);
+ can_spin_unlock(&candev->device_lock);
DEBUGMSG ("ipci165_bci_command: command buffer is busy\n");
return (-EBUSY);
}
{
/* timeout occured */
/* release the lock */
- can_spin_unlock(candev->device_lock);
+ can_spin_unlock(&candev->device_lock);
CANMSG ("BCI timeout!\n");
return -EBUSY;
}
/* release the buffer */
writeb(0, dpram_addr + OF_BCI_SYNC);
/* unlock the access */
- can_spin_unlock(candev->device_lock);
+ can_spin_unlock(&candev->device_lock);
DEBUGMSG ("ipci165_bci_command: invalid answer\n");
return -EIO;
/* release the buffer */
writeb(0, dpram_addr + OF_BCI_SYNC);
/* unlock the access */
- can_spin_unlock(candev->device_lock);
+ can_spin_unlock(&candev->device_lock);
return 0;
}
* acknowledged and ipci165_irq_chip_handler is called for every channel.
* File: src/ipci165.c
*/
-can_irqreturn_t ipci165_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
+can_irqreturn_t ipci165_irq_handler(CAN_IRQ_HANDLER_ARGS(irq_number, dev_id))
{
int retval;
struct candevice_t *candev = (struct candevice_t *)dev_id;
candev->nr_all_chips=2;
candev->flags |= CANDEV_PROGRAMMABLE_IRQ*0;
/* initialize device spinlock */
- can_spin_lock_init(candev->device_lock);
+ can_spin_lock_init(&candev->device_lock);
return 0;
}