X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/fe719367cdb25978d42261513dd9810c22481960..50e9e47fc21191ea9ea758fea1e7f2bd5a275e98:/lincan/src/sysdep_lnx.c diff --git a/lincan/src/sysdep_lnx.c b/lincan/src/sysdep_lnx.c index 1033a5f..03f4550 100644 --- a/lincan/src/sysdep_lnx.c +++ b/lincan/src/sysdep_lnx.c @@ -55,14 +55,14 @@ * * The function is used in the driver initialization phase to catch possible memory * leaks for future driver finalization or case, that driver initialization fail. - * + * * Return Value: pointer to the allocated memory or NULL in the case of fail */ void *can_checked_malloc(size_t size) { struct mem_addr *mem_new; void *address_p; - + address_p=kmalloc(size,GFP_KERNEL); if(address_p == NULL) { CANMSG("can_checked_malloc: out of the memory\n"); @@ -109,9 +109,9 @@ int can_checked_free(void *address_p) kfree(address_p); return 0; } - + CANMSG("can_checked_free: address %p not found on the mem list\n", address_p); - + kfree(address_p); return -1; } @@ -142,7 +142,7 @@ int can_del_mem_list(void) kfree(mem->address); kfree(mem); } - + return 0; } @@ -254,7 +254,7 @@ struct pci_dev *can_pci_get_next_untaken_subsyst(unsigned int vendor, unsigned i * The CAN driver uses this pointer to store relationship of interrupt * to chip state structure - @struct canchip_t * @regs: system dependent value pointing to registers stored in exception frame - * + * * File: src/setup.c */ can_irqreturn_t can_default_irq_dispatch(CAN_IRQ_HANDLER_ARGS(irq_number, dev_id)) @@ -280,7 +280,7 @@ int can_chip_setup_irq(struct canchip_t *chip) return 0; if(chip->flags & CHIP_IRQ_CUSTOM) return 1; - + if ((chip->flags & CHIP_IRQ_VME) == 0) { if (request_irq(chip->chip_irq,can_default_irq_dispatch,IRQF_SHARED,DEVICE_NAME,chip)) return -1; @@ -294,7 +294,7 @@ int can_chip_setup_irq(struct canchip_t *chip) CANMSG("Bad irq parameter. (1 <= irq <= 255).\n"); return -EINVAL; } - + request_vmeirq(chip->chip_irq, can_default_irq_dispatch, chip); DEBUGMSG("Registered VME interrupt vector %d\n",chip->chip_irq); chip->flags |= CHIP_IRQ_SETUP; @@ -316,7 +316,7 @@ void can_chip_free_irq(struct canchip_t *chip) if ((chip->flags & CHIP_IRQ_VME) == 0) free_irq(chip->chip_irq, chip); - else { + else { #ifdef CAN_ENABLE_VME_SUPPORT free_vmeirq(chip->chip_irq); #endif