- patches.arch/x86_mce_intel_decode_physical_address.patch:
[linux-flexiantxendom0-3.2.10.git] / drivers / staging / comedi / drivers / 8255.c
index 2d54993..fe63830 100644 (file)
@@ -82,6 +82,7 @@ I/O port base address can be found in the output of 'lspci -v'.
 
 #include <linux/ioport.h>
 #include <linux/slab.h>
+#include "8255.h"
 
 #define _8255_SIZE 4
 
@@ -395,8 +396,6 @@ static int dev_8255_attach(struct comedi_device *dev,
        unsigned long iobase;
        int i;
 
-       printk("comedi%d: 8255:", dev->minor);
-
        dev->board_name = "8255";
 
        for (i = 0; i < COMEDI_NDEVCONFOPTS; i++) {
@@ -405,13 +404,20 @@ static int dev_8255_attach(struct comedi_device *dev,
                        break;
        }
        if (i == 0) {
-               printk(" no devices specified\n");
+               printk(KERN_WARNING
+                      "comedi%d: 8255: no devices specified\n", dev->minor);
                return -EINVAL;
        }
 
        ret = alloc_subdevices(dev, i);
-       if (ret < 0)
+       if (ret < 0) {
+               /* FIXME this printk call should give a proper message, the
+                * below line just maintains previous functionality */
+               printk("comedi%d: 8255:", dev->minor);
                return ret;
+       }
+
+       printk(KERN_INFO "comedi%d: 8255:", dev->minor);
 
        for (i = 0; i < dev->n_subdevices; i++) {
                iobase = it->options[i];
@@ -438,7 +444,7 @@ static int dev_8255_detach(struct comedi_device *dev)
        unsigned long iobase;
        struct comedi_subdevice *s;
 
-       printk("comedi%d: 8255: remove\n", dev->minor);
+       printk(KERN_INFO "comedi%d: 8255: remove\n", dev->minor);
 
        for (i = 0; i < dev->n_subdevices; i++) {
                s = dev->subdevices + i;