]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
staging: comedi: pcl711: cleanup dev->board_name usage
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:06:31 +0000 (16:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:47:35 +0000 (12:47 -0700)
This legacy driver does no additional probing so the dev->board_name
will already be properly initialized by the comedi core before calling
the (*attach) function.

Remove the unnecessary initialization of dev->board_name and use it
when requesting the resources instead of the open-coded strings.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/pcl711.c

index 6ee5da24a961853e64c369d1d9e9c8e1faf11b47..1a40a5e23aa035798fd82df9fd16e1c068865e4d 100644 (file)
@@ -459,16 +459,12 @@ static int pcl711_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        iobase = it->options[0];
        printk(KERN_INFO "comedi%d: pcl711: 0x%04lx ", dev->minor, iobase);
-       if (!request_region(iobase, PCL711_SIZE, "pcl711")) {
+       if (!request_region(iobase, PCL711_SIZE, dev->board_name)) {
                printk("I/O port conflict\n");
                return -EIO;
        }
        dev->iobase = iobase;
 
-       /* there should be a sanity check here */
-
-       dev->board_name = board->name;
-
        /* grab our IRQ */
        irq = it->options[1];
        if (irq > board->maxirq) {
@@ -476,7 +472,8 @@ static int pcl711_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                return -EINVAL;
        }
        if (irq) {
-               if (request_irq(irq, pcl711_interrupt, 0, "pcl711", dev)) {
+               if (request_irq(irq, pcl711_interrupt, 0, dev->board_name,
+                               dev)) {
                        printk(KERN_ERR "unable to allocate irq %u\n", irq);
                        return -EINVAL;
                } else {