/* and set some flags so that dt3155_read */
/* returns an error next time it is called */
dt3155_errno = DT_ERR_CORRUPT;
- printk("dt3155: corrupt field\n");
+ printk(KERN_ERR "dt3155: corrupt field\n");
return;
}
/* disable the interrupt if last field */
if (fb->stop_acquire)
{
- printk("dt3155: even stopped.\n");
+ printk(KERN_INFO "dt3155: even stopped.\n");
fb->even_stopped = 1;
if (i2c_even_csr.fld.SNGL_EVE)
{
return;
}
/* If we get here, the Odd Field wasn't it either... */
- printk("neither even nor odd. shared perhaps?\n");
+ printk(KERN_DEBUG "neither even nor odd. shared perhaps?\n");
}
/*****************************************************
/* make sure it is valid command */
if (_IOC_NR(cmd) > DT3155_IOC_MAXNR)
{
- printk("DT3155: invalid IOCTL(0x%x)\n",cmd);
- printk("DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n",
+ printk(KERN_INFO "DT3155: invalid IOCTL(0x%x)\n", cmd);
+ printk(KERN_INFO "DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n",
(unsigned int)DT3155_GET_CONFIG,
(unsigned int)DT3155_SET_CONFIG,
(unsigned int)DT3155_START,
}
default:
{
- printk("DT3155: invalid IOCTL(0x%x)\n",cmd);
- printk("DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n",
+ printk(KERN_INFO "DT3155: invalid IOCTL(0x%x)\n", cmd);
+ printk(KERN_INFO "DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n",
(unsigned int)DT3155_GET_CONFIG,
(unsigned int)DT3155_SET_CONFIG,
DT3155_START, DT3155_STOP, DT3155_FLUSH);
offset >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
vma->vm_page_prot)) {
- printk("DT3155: remap_page_range() failed.\n");
+ printk(KERN_INFO "DT3155: remap_page_range() failed.\n");
return -EAGAIN;
}
}
else
{
- printk("DT3155: dt3155_mmap() bad call.\n");
+ printk(KERN_INFO "DT3155: dt3155_mmap() bad call.\n");
return -ENXIO;
}
struct dt3155_fbuffer *fb = &dts->fbuffer;
if (dt3155_dev_open[minor]) {
- printk ("DT3155: Already opened by another process.\n");
+ printk(KERN_INFO "DT3155: Already opened by another process.\n");
return -EBUSY;
}
if (dts->device_installed==0)
{
- printk("DT3155 Open Error: No such device dt3155 minor number %d\n",
+ printk(KERN_INFO "DT3155 Open Error: No such device dt3155 minor number %d\n",
minor);
return -EIO;
}
if (dts->state != DT3155_STATE_IDLE) {
- printk ("DT3155: Not in idle state (state = %x)\n",
+ printk(KERN_INFO "DT3155: Not in idle state (state = %x)\n",
dts->state);
return -EBUSY;
}
- printk("DT3155: Device opened.\n");
+ printk(KERN_INFO "DT3155: Device opened.\n");
dt3155_dev_open[minor] = 1 ;
if (!dt3155_dev_open[minor])
{
- printk("DT3155: attempt to CLOSE a not OPEN device\n");
+ printk(KERN_INFO "DT3155: attempt to CLOSE a not OPEN device\n");
}
else
{
/* return an error on hardware failures */
if (count != sizeof(struct dt3155_read))
{
- printk("DT3155 ERROR (NJC): count is not right\n");
+ printk(KERN_INFO "DT3155 ERROR (NJC): count is not right\n");
return -EINVAL;
}
if (frame_index < 0)
{
- printk ("DT3155: read: interrupted\n");
+ printk(KERN_INFO "DT3155: read: interrupted\n");
quick_stop (minor);
printques(fb);
return -EINTR;
/* Make sure the driver was compiled with enough buffers to handle
this many boards */
if (pci_index > MAXBOARDS) {
- printk("DT3155: ERROR - found %d devices, but driver only configured "
+ printk(KERN_ERR "DT3155: Found %d devices, but driver only configured "
"for %d devices\n"
"DT3155: Please change MAXBOARDS in dt3155.h\n",
pci_index, MAXBOARDS);
if ((error = pci_read_config_dword(pci_dev, PCI_BASE_ADDRESS_0,
(u32 *) &base)))
{
- printk("DT3155: Was not able to find device \n");
+ printk(KERN_INFO "DT3155: Was not able to find device\n");
goto err;
}
dt3155_lbase[pci_index-1]);
if (!dt3155_lbase[pci_index-1])
{
- printk("DT3155: Unable to remap control registers\n");
+ printk(KERN_INFO "DT3155: Unable to remap control registers\n");
goto err;
}
if ((error = pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &irq)))
{
- printk("DT3155: Was not able to find device \n");
+ printk(KERN_INFO "DT3155: Was not able to find device\n");
goto err;
}
dts->irq = irq;
/* Set flag: kth device found! */
dts->device_installed = 1;
- printk("DT3155: Installing device %d w/irq %d and address %p\n",
+ printk(KERN_INFO "DT3155: Installing device %d w/irq %d and address %p\n",
pci_index,
dts->irq,
dt3155_lbase[pci_index-1]);
devname[1] = "dt3155b";
#endif
- printk("DT3155: Loading module...\n");
+ printk(KERN_INFO "DT3155: Loading module...\n");
/* Register the device driver */
rcode = register_chrdev(dt3155_major, "dt3155", &dt3155_fops);
{
if ((rcode = find_PCI()) != 0)
{
- printk("DT3155 error: find_PCI() failed to find dt3155 board(s)\n");
+ printk(KERN_INFO "DT3155 error: find_PCI() failed to find dt3155 board(s)\n");
unregister_chrdev(dt3155_major, "dt3155");
return rcode;
}
/* Ok, time to setup the frame buffers */
if((rcode = dt3155_setup_buffers(&allocatorAddr)) < 0)
{
- printk("DT3155: Error: setting up buffer not large enough.");
+ printk(KERN_INFO "DT3155: Error: setting up buffer not large enough.");
unregister_chrdev(dt3155_major, "dt3155");
return rcode;
}
{
dts = &dt3155_status[index];
- printk("DT3155: Device = %d; acq_mode = %d; "
+ printk(KERN_INFO "DT3155: Device = %d; acq_mode = %d;"
"continuous = %d; cols = %d; rows = %d;\n",
index ,
dts->config.acq_mode,
dts->config.continuous,
dts->config.cols,
dts->config.rows);
- printk("DT3155: m_addr = 0x%x; m_size = %ld; "
+ printk(KERN_INFO "DT3155: m_addr = 0x%x; m_size = %ld;"
"state = %d; device_installed = %d\n",
dts->mem_addr,
(long int)dts->mem_size,
(void *)dts);
if(rcode < 0)
{
- printk("DT3155: minor %d request_irq failed for IRQ %d\n",
+ printk(KERN_INFO "DT3155: minor %d request_irq failed for IRQ %d\n",
index, dts->irq);
unregister_chrdev(dt3155_major, "dt3155");
return rcode;
}
}
- printk("DT3155: finished loading\n");
+ printk(KERN_INFO "DT3155: finished loading\n");
return 0;
}
struct dt3155_status *dts;
int index;
- printk("DT3155: cleanup_module called\n");
+ printk(KERN_INFO "DT3155: cleanup_module called\n");
/* removed DMA allocated with the allocator */
#ifdef STANDALONE_ALLOCATOR
dts = &dt3155_status[index];
if(dts->device_installed == 1)
{
- printk("DT3155: Freeing irq %d for device %d\n",
+ printk(KERN_INFO "DT3155: Freeing irq %d for device %d\n",
dts->irq, index);
free_irq(dts->irq, (void *)dts);
}