Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> --- drivers/staging/vme/bridges/vme_ca91cx42.c | 74 +++++++--------- drivers/staging/vme/bridges/vme_tsi148.c | 133 +++++++++++++--------------- 2 files changed, 96 insertions(+), 111 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 3d2a84c..3bbe8a3 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -15,6 +15,8 @@ * option) any later version. */ +#define pr_fmt(fmt) "ca91cx42: " fmt + #include <linux/version.h> #include <linux/module.h> #include <linux/mm.h> @@ -131,8 +133,7 @@ static u32 ca91cx42_VERR_irqhandler(void) val = ioread32(ca91cx42_bridge->base + DGCS); if (!(val & 0x00000800)) { - printk(KERN_ERR "ca91c042: ca91cx42_VERR_irqhandler DMA Read " - "Error DGCS=%08X\n", val); + pr_err("%s(): DMA Read Error DGCS=%08X\n", __func__, val); } return CA91CX42_LINT_VERR; @@ -145,8 +146,7 @@ static u32 ca91cx42_LERR_irqhandler(void) val = ioread32(ca91cx42_bridge->base + DGCS); if (!(val & 0x00000800)) { - printk(KERN_ERR "ca91c042: ca91cx42_LERR_irqhandler DMA Read " - "Error DGCS=%08X\n", val); + pr_err("%s(): DMA Read Error DGCS=%08X\n", __func__, val); } @@ -172,8 +172,8 @@ static u32 ca91cx42_VIRQ_irqhandler(int stat) if (call != NULL) call(i, vec, priv_data); else - printk("Spurilous VME interrupt, level:%x, " - "vector:%x\n", i, vec); + pr_info("Spurilous VME interrupt, level:%x, vector:%x\n", + i, vec); serviced |= (1 << i); } @@ -291,7 +291,7 @@ int ca91cx42_request_irq(int level, int statid, if (ca91cx42_bridge->irq[level - 1].callback[statid].func) { mutex_unlock(&(vme_irq)); - printk("VME Interrupt already taken\n"); + pr_info("VME Interrupt already taken\n"); return -EBUSY; } @@ -403,7 +403,7 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled, case VME_USER3: case VME_USER4: default: - printk(KERN_ERR "Invalid address space\n"); + pr_err("Invalid address space\n"); return -EINVAL; break; } @@ -425,15 +425,15 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled, granularity = 0x10000; if (vme_base & (granularity - 1)) { - printk(KERN_ERR "Invalid VME base alignment\n"); + pr_err("Invalid VME base alignment\n"); return -EINVAL; } if (vme_bound & (granularity - 1)) { - printk(KERN_ERR "Invalid VME bound alignment\n"); + pr_err("Invalid VME bound alignment\n"); return -EINVAL; } if (pci_offset & (granularity - 1)) { - printk(KERN_ERR "Invalid PCI Offset alignment\n"); + pr_err("Invalid PCI Offset alignment\n"); return -EINVAL; } @@ -551,7 +551,7 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image, /* Find pci_dev container of dev */ if (ca91cx42_bridge->parent == NULL) { - printk(KERN_ERR "Dev entry NULL\n"); + pr_err("Dev entry NULL\n"); return -EINVAL; } pdev = container_of(ca91cx42_bridge->parent, struct pci_dev, dev); @@ -575,8 +575,7 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image, if (image->pci_resource.name == NULL) { image->pci_resource.name = kmalloc(VMENAMSIZ+3, GFP_KERNEL); if (image->pci_resource.name == NULL) { - printk(KERN_ERR "Unable to allocate memory for resource" - " name\n"); + pr_err("Unable to allocate memory for resource name\n"); retval = -ENOMEM; goto err_name; } @@ -593,17 +592,16 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image, &(image->pci_resource), size, size, PCIBIOS_MIN_MEM, 0, NULL, NULL); if (retval) { - printk(KERN_ERR "Failed to allocate mem resource for " - "window %d size 0x%lx start 0x%lx\n", - image->number, (unsigned long)size, - (unsigned long)image->pci_resource.start); + pr_err("Failed to allocate mem resource for window %d size 0x%lx start 0x%lx\n", + image->number, (unsigned long)size, + (unsigned long)image->pci_resource.start); goto err_resource; } image->kern_base = ioremap_nocache( image->pci_resource.start, size); if (image->kern_base == NULL) { - printk(KERN_ERR "Failed to remap resource\n"); + pr_err("Failed to remap resource\n"); retval = -ENOMEM; goto err_remap; } @@ -645,12 +643,12 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, /* Verify input data */ if (vme_base & 0xFFF) { - printk(KERN_ERR "Invalid VME Window alignment\n"); + pr_err("Invalid VME Window alignment\n"); retval = -EINVAL; goto err_window; } if (size & 0xFFF) { - printk(KERN_ERR "Invalid VME Window alignment\n"); + pr_err("Invalid VME Window alignment\n"); retval = -EINVAL; goto err_window; } @@ -667,8 +665,7 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, retval = ca91cx42_alloc_resource(image, size); if (retval) { spin_unlock(&(image->lock)); - printk(KERN_ERR "Unable to allocate memory for resource " - "name\n"); + pr_err("Unable to allocate memory for resource name\n"); retval = -ENOMEM; goto err_res; } @@ -719,7 +716,7 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, break; default: spin_unlock(&(image->lock)); - printk(KERN_ERR "Invalid data width\n"); + pr_err("Invalid data width\n"); retval = -EINVAL; goto err_dwidth; break; @@ -751,7 +748,7 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled, case VME_USER4: default: spin_unlock(&(image->lock)); - printk(KERN_ERR "Invalid address space\n"); + pr_err("Invalid address space\n"); retval = -EINVAL; goto err_aspace; break; @@ -1515,15 +1512,11 @@ ca91cx42_start_dma(int channel, unsigned int dgcsreg, TDMA_Cmd_Packet *vmeLL) iowrite32((unsigned int)vmeLL, ca91cx42_bridge->base + DCPP); } else { #if 0 - printk(KERN_ERR "Starting: DGCS = %08x\n", dgcsreg); - printk(KERN_ERR "Starting: DVA = %08x\n", - ioread32(&vmeLL->dva)); - printk(KERN_ERR "Starting: DLV = %08x\n", - ioread32(&vmeLL->dlv)); - printk(KERN_ERR "Starting: DTBC = %08x\n", - ioread32(&vmeLL->dtbc)); - printk(KERN_ERR "Starting: DCTL = %08x\n", - ioread32(&vmeLL->dctl)); + pr_err("Starting: DGCS = %08x\n", dgcsreg); + pr_err("Starting: DVA = %08x\n", ioread32(&vmeLL->dva)); + pr_err("Starting: DLV = %08x\n", ioread32(&vmeLL->dlv)); + pr_err("Starting: DTBC = %08x\n", ioread32(&vmeLL->dtbc)); + pr_err("Starting: DCTL = %08x\n", ioread32(&vmeLL->dctl)); #endif /* Write registers */ iowrite32(ioread32(&vmeLL->dva), ca91cx42_bridge->base + DVA); @@ -1746,18 +1739,17 @@ int ca91cx42_do_dma(vmeDmaPacket_t *vmeDma) if (!(val & 0x00000800)) { vmeDma->vmeDmaStatus = val & 0x700; - printk(KERN_ERR "ca91c042: DMA Error in ca91cx42_DMA_irqhandler" - " DGCS=%08X\n", val); + pr_err("DMA Error in ca91cx42_DMA_irqhandler DGCS=%08X\n", val); val = ioread32(ca91cx42_bridge->base + DCPP); - printk(KERN_ERR "ca91c042: DCPP=%08X\n", val); + pr_err("DCPP=%08X\n", val); val = ioread32(ca91cx42_bridge->base + DCTL); - printk(KERN_ERR "ca91c042: DCTL=%08X\n", val); + pr_err("DCTL=%08X\n", val); val = ioread32(ca91cx42_bridge->base + DTBC); - printk(KERN_ERR "ca91c042: DTBC=%08X\n", val); + pr_err("DTBC=%08X\n", val); val = ioread32(ca91cx42_bridge->base + DLA); - printk(KERN_ERR "ca91c042: DLA=%08X\n", val); + pr_err("DLA=%08X\n", val); val = ioread32(ca91cx42_bridge->base + DVA); - printk(KERN_ERR "ca91c042: DVA=%08X\n", val); + pr_err("DVA=%08X\n", val); } /* Free the dma chain */ diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index 8960fa9..b6150cd 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -13,6 +13,8 @@ * option) any later version. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/version.h> #include <linux/module.h> #include <linux/moduleparam.h> @@ -161,7 +163,7 @@ static u32 tsi148_MB_irqhandler(u32 stat) if(stat & TSI148_LCSR_INTS_MBS[i]) { val = ioread32be(tsi148_bridge->base + TSI148_GCSR_MBOX[i]); - printk("VME Mailbox %d received: 0x%x\n", i, val); + pr_info("VME Mailbox %d received: 0x%x\n", i, val); serviced |= TSI148_LCSR_INTC_MBC[i]; } } @@ -174,16 +176,14 @@ static u32 tsi148_MB_irqhandler(u32 stat) */ static u32 tsi148_PERR_irqhandler(void) { - printk(KERN_ERR - "PCI Exception at address: 0x%08x:%08x, attributes: %08x\n", - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPAU), - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPAL), - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPAT) + pr_err("PCI Exception at address: 0x%08x:%08x, attributes: %08x\n", + ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPAU), + ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPAL), + ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPAT) ); - printk(KERN_ERR - "PCI-X attribute reg: %08x, PCI-X split completion reg: %08x\n", - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPXA), - ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPXS) + pr_err("PCI-X attribute reg: %08x, PCI-X split completion reg: %08x\n", + ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPXA), + ioread32be(tsi148_bridge->base + TSI148_LCSR_EDPXS) ); iowrite32be(TSI148_LCSR_EDPAT_EDPCL, @@ -210,7 +210,7 @@ static u32 tsi148_VERR_irqhandler(void) /* Check for exception register overflow (we have lost error data) */ if(error_attrib & TSI148_LCSR_VEAT_VEOF) { - printk(KERN_ERR "VME Bus Exception Overflow Occurred\n"); + pr_err("VME Bus Exception Overflow Occurred\n"); } error = (struct vme_bus_error *)kmalloc(sizeof (struct vme_bus_error), @@ -220,10 +220,8 @@ static u32 tsi148_VERR_irqhandler(void) error->attributes = error_attrib; list_add_tail(&(error->list), &(tsi148_bridge->vme_errors)); } else { - printk(KERN_ERR - "Unable to alloc memory for VMEbus Error reporting\n"); - printk(KERN_ERR - "VME Bus Error at address: 0x%llx, attributes: %08x\n", + pr_err("Unable to alloc memory for VMEbus Error reporting\n"); + pr_err("VME Bus Error at address: 0x%llx, attributes: %08x\n", error_addr, error_attrib); } @@ -239,7 +237,7 @@ static u32 tsi148_VERR_irqhandler(void) */ static u32 tsi148_IACK_irqhandler(void) { - printk("tsi148_IACK_irqhandler\n"); + pr_info("tsi148_IACK_irqhandler\n"); wake_up(&iack_queue); return TSI148_LCSR_INTC_IACKC; @@ -272,8 +270,8 @@ static u32 tsi148_VIRQ_irqhandler(u32 stat) if (call != NULL) call(i, vec, priv_data); else - printk("Spurilous VME interrupt, level:%x, " - "vector:%x\n", i, vec); + pr_info("Spurious VME interrupt, level:%x, vector:%x\n", + i, vec); serviced |= (1 << i); } @@ -444,7 +442,7 @@ int tsi148_request_irq(int level, int statid, if(tsi148_bridge->irq[level - 1].callback[statid].func) { mutex_unlock(&(vme_irq)); - printk("VME Interrupt already taken\n"); + pr_info("VME Interrupt already taken\n"); return -EBUSY; } @@ -608,13 +606,13 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, unsigned long long vme_bound, pci_offset; #if 0 - printk("Set slave image %d to:\n", image->number); - printk("\tEnabled: %s\n", (enabled == 1)? "yes" : "no"); - printk("\tVME Base:0x%llx\n", vme_base); - printk("\tWindow Size:0x%llx\n", size); - printk("\tPCI Base:0x%lx\n", (unsigned long)pci_base); - printk("\tAddress Space:0x%x\n", aspace); - printk("\tTransfer Cycle Properties:0x%x\n", cycle); + pr_info("Set slave image %d to:\n", image->number); + pr_info("\tEnabled: %s\n", (enabled == 1)? "yes" : "no"); + pr_info("\tVME Base:0x%llx\n", vme_base); + pr_info("\tWindow Size:0x%llx\n", size); + pr_info("\tPCI Base:0x%lx\n", (unsigned long)pci_base); + pr_info("\tAddress Space:0x%x\n", aspace); + pr_info("\tTransfer Cycle Properties:0x%x\n", cycle); #endif i = image->number; @@ -642,7 +640,7 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, case VME_USER3: case VME_USER4: default: - printk("Invalid address space\n"); + pr_info("Invalid address space\n"); return -EINVAL; break; } @@ -660,21 +658,21 @@ int tsi148_slave_set(struct vme_slave_resource *image, int enabled, reg_split(pci_offset, &pci_offset_high, &pci_offset_low); if (vme_base_low & (granularity - 1)) { - printk("Invalid VME base alignment\n"); + pr_info("Invalid VME base alignment\n"); return -EINVAL; } if (vme_bound_low & (granularity - 1)) { - printk("Invalid VME bound alignment\n"); + pr_info("Invalid VME bound alignment\n"); return -EINVAL; } if (pci_offset_low & (granularity - 1)) { - printk("Invalid PCI Offset alignment\n"); + pr_info("Invalid PCI Offset alignment\n"); return -EINVAL; } #if 0 - printk("\tVME Bound:0x%llx\n", vme_bound); - printk("\tPCI Offset:0x%llx\n", pci_offset); + pr_info("\tVME Bound:0x%llx\n", vme_bound); + pr_info("\tPCI Offset:0x%llx\n", pci_offset); #endif /* Disable while we are mucking around */ @@ -881,7 +879,7 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, /* Find pci_dev container of dev */ if (tsi148_bridge->parent == NULL) { - printk("Dev entry NULL\n"); + pr_info("Dev entry NULL\n"); return -EINVAL; } pdev = container_of(tsi148_bridge->parent, struct pci_dev, dev); @@ -905,8 +903,7 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, if (image->pci_resource.name == NULL) { image->pci_resource.name = kmalloc(VMENAMSIZ+3, GFP_KERNEL); if (image->pci_resource.name == NULL) { - printk(KERN_ERR "Unable to allocate memory for resource" - " name\n"); + pr_err("Unable to allocate memory for resource name\n"); retval = -ENOMEM; goto err_name; } @@ -923,17 +920,16 @@ static int tsi148_alloc_resource(struct vme_master_resource *image, &(image->pci_resource), size, size, PCIBIOS_MIN_MEM, 0, NULL, NULL); if (retval) { - printk(KERN_ERR "Failed to allocate mem resource for " - "window %d size 0x%lx start 0x%lx\n", - image->number, (unsigned long)size, - (unsigned long)image->pci_resource.start); + pr_err("Failed to allocate mem resource for window %d size 0x%lx start 0x%lx\n", + image->number, (unsigned long)size, + (unsigned long)image->pci_resource.start); goto err_resource; } image->kern_base = ioremap_nocache( image->pci_resource.start, size); if (image->kern_base == NULL) { - printk(KERN_ERR "Failed to remap resource\n"); + pr_err("Failed to remap resource\n"); retval = -ENOMEM; goto err_remap; } @@ -980,12 +976,12 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, /* Verify input data */ if (vme_base & 0xFFFF) { - printk("Invalid VME Window alignment\n"); + pr_info("Invalid VME Window alignment\n"); retval = -EINVAL; goto err_window; } if (size < 0x10000) { - printk("Invalid VME Window size\n"); + pr_info("Invalid VME Window size\n"); retval = -EINVAL; goto err_window; } @@ -998,8 +994,7 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, retval = tsi148_alloc_resource(image, size); if (retval) { spin_unlock(&(image->lock)); - printk(KERN_ERR "Unable to allocate memory for resource " - "name\n"); + pr_err("Unable to allocate memory for resource name\n"); retval = -ENOMEM; goto err_res; } @@ -1021,19 +1016,19 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, if (pci_base_low & 0xFFFF) { spin_unlock(&(image->lock)); - printk("Invalid PCI base alignment\n"); + pr_info("Invalid PCI base alignment\n"); retval = -EINVAL; goto err_gran; } if (pci_bound_low & 0xFFFF) { spin_unlock(&(image->lock)); - printk("Invalid PCI bound alignment\n"); + pr_info("Invalid PCI bound alignment\n"); retval = -EINVAL; goto err_gran; } if (vme_offset_low & 0xFFFF) { spin_unlock(&(image->lock)); - printk("Invalid VME Offset alignment\n"); + pr_info("Invalid VME Offset alignment\n"); retval = -EINVAL; goto err_gran; } @@ -1093,7 +1088,7 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, temp_ctl |= TSI148_LCSR_OTAT_TM_2eSST; } if (cycle & VME_2eSSTB) { - printk("Currently not setting Broadcast Select Registers\n"); + pr_info("Currently not setting Broadcast Select Registers\n"); temp_ctl &= ~TSI148_LCSR_OTAT_TM_M; temp_ctl |= TSI148_LCSR_OTAT_TM_2eSSTB; } @@ -1109,7 +1104,7 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, break; default: spin_unlock(&(image->lock)); - printk("Invalid data width\n"); + pr_info("Invalid data width\n"); retval = -EINVAL; goto err_dwidth; } @@ -1146,7 +1141,7 @@ int tsi148_master_set( struct vme_master_resource *image, int enabled, break; default: spin_unlock(&(image->lock)); - printk("Invalid address space\n"); + pr_info("Invalid address space\n"); retval = -EINVAL; goto err_aspace; break; @@ -1410,7 +1405,7 @@ ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf, vme_err = tsi148_find_error(aspace, vme_base + offset, count); if(vme_err != NULL) { - printk("First VME write error detected an at address 0x%llx\n", + pr_info("First VME write error detected an at address 0x%llx\n", vme_err->address); retval = vme_err->address - (vme_base + offset); /* Clear down save errors in this address range */ @@ -1515,7 +1510,7 @@ static int tsi148_dma_set_vme_src_attributes (u32 *attr, vme_address_t aspace, *attr |= TSI148_LCSR_DSAT_TM_2eSST; } if (cycle & VME_2eSSTB) { - printk("Currently not setting Broadcast Select Registers\n"); + pr_info("Currently not setting Broadcast Select Registers\n"); *attr |= TSI148_LCSR_DSAT_TM_2eSSTB; } @@ -1528,7 +1523,7 @@ static int tsi148_dma_set_vme_src_attributes (u32 *attr, vme_address_t aspace, *attr |= TSI148_LCSR_DSAT_DBW_32; break; default: - printk("Invalid data width\n"); + pr_info("Invalid data width\n"); return -EINVAL; } @@ -1562,7 +1557,7 @@ static int tsi148_dma_set_vme_src_attributes (u32 *attr, vme_address_t aspace, *attr |= TSI148_LCSR_DSAT_AMODE_USER4; break; default: - printk("Invalid address space\n"); + pr_info("Invalid address space\n"); return -EINVAL; break; } @@ -1608,7 +1603,7 @@ static int tsi148_dma_set_vme_dest_attributes(u32 *attr, vme_address_t aspace, *attr |= TSI148_LCSR_DDAT_TM_2eSST; } if (cycle & VME_2eSSTB) { - printk("Currently not setting Broadcast Select Registers\n"); + pr_info("Currently not setting Broadcast Select Registers\n"); *attr |= TSI148_LCSR_DDAT_TM_2eSSTB; } @@ -1621,7 +1616,7 @@ static int tsi148_dma_set_vme_dest_attributes(u32 *attr, vme_address_t aspace, *attr |= TSI148_LCSR_DDAT_DBW_32; break; default: - printk("Invalid data width\n"); + pr_info("Invalid data width\n"); return -EINVAL; } @@ -1655,7 +1650,7 @@ static int tsi148_dma_set_vme_dest_attributes(u32 *attr, vme_address_t aspace, *attr |= TSI148_LCSR_DDAT_AMODE_USER4; break; default: - printk("Invalid address space\n"); + pr_info("Invalid address space\n"); return -EINVAL; break; } @@ -1688,7 +1683,7 @@ int tsi148_dma_list_add (struct vme_dma_list *list, struct vme_dma_attr *src, entry = (struct tsi148_dma_entry *)kmalloc( sizeof(struct tsi148_dma_entry), GFP_KERNEL); if (entry == NULL) { - printk("Failed to allocate memory for dma resource " + pr_info("Failed to allocate memory for dma resource " "structure\n"); retval = -ENOMEM; goto err_mem; @@ -1696,7 +1691,7 @@ int tsi148_dma_list_add (struct vme_dma_list *list, struct vme_dma_attr *src, /* Test descriptor alignment */ if ((unsigned long)&(entry->descriptor) & 0x7) { - printk("Descriptor not aligned to 8 byte boundary as " + pr_info("Descriptor not aligned to 8 byte boundary as " "required: %p\n", &(entry->descriptor)); retval = -EINVAL; goto err_align; @@ -1748,7 +1743,7 @@ int tsi148_dma_list_add (struct vme_dma_list *list, struct vme_dma_attr *src, goto err_source; break; default: - printk("Invalid source type\n"); + pr_info("Invalid source type\n"); retval = -EINVAL; goto err_source; break; @@ -1786,7 +1781,7 @@ int tsi148_dma_list_add (struct vme_dma_list *list, struct vme_dma_attr *src, goto err_dest; break; default: - printk("Invalid destination type\n"); + pr_info("Invalid destination type\n"); retval = -EINVAL; goto err_dest; break; @@ -1941,7 +1936,7 @@ int tsi148_dma_list_exec(struct vme_dma_list *list) TSI148_LCSR_OFFSET_DSTA); if (val & TSI148_LCSR_DSTA_VBE) { - printk(KERN_ERR "tsi148: DMA Error. DSTA=%08X\n", val); + pr_err("tsi148: DMA Error. DSTA=%08X\n", val); retval = -EIO; } @@ -1992,8 +1987,7 @@ int tsi148_lm_set(struct vme_lm_resource *lm, unsigned long long lm_base, for (i = 0; i < lm->monitors; i++) { if(lm_callback[i] != NULL) { mutex_unlock(&(lm->mtx)); - printk("Location monitor callback attached, can't " - "reset\n"); + pr_info("Location monitor callback attached, can't reset\n"); return -EBUSY; } } @@ -2013,7 +2007,7 @@ int tsi148_lm_set(struct vme_lm_resource *lm, unsigned long long lm_base, break; default: mutex_unlock(&(lm->mtx)); - printk("Invalid address space\n"); + pr_info("Invalid address space\n"); return -EINVAL; break; } @@ -2100,14 +2094,14 @@ int tsi148_lm_attach(struct vme_lm_resource *lm, int monitor, lm_ctl = ioread32be(tsi148_bridge->base + TSI148_LCSR_LMAT); if ((lm_ctl & (TSI148_LCSR_LMAT_PGM | TSI148_LCSR_LMAT_DATA)) == 0) { mutex_unlock(&(lm->mtx)); - printk("Location monitor not properly configured\n"); + pr_info("Location monitor not properly configured\n"); return -EINVAL; } /* Check that a callback isn't already attached */ if (lm_callback[monitor] != NULL) { mutex_unlock(&(lm->mtx)); - printk("Existing callback attached\n"); + pr_info("Existing callback attached\n"); return -EBUSY; } @@ -2782,9 +2776,8 @@ int tsi148_dma_run(struct vme_dma_resource *resource, struct vme_dma_attr src, vmeDma->vmeDmaStatus = 0; if (val & 0x10000000) { - printk(KERN_ERR - "DMA Error in DMA_tempe_irqhandler DSTA=%08X\n", - val); + pr_err("DMA Error in DMA_tempe_irqhandler DSTA=%08X\n", + val); vmeDma->vmeDmaStatus = val; } -- 1.6.5.rc3.dirty _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel