]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: pcl724: cleanup dev->board_name usage
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:07:16 +0000 (16:07 -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/pcl724.c

index 7b3c4293c01bf279cf224aa098956ef5d0a75745..a8112e3af98fdd54c9421078b57c6eafdf777fca 100644 (file)
@@ -114,15 +114,13 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                iorange = PCL722_96_SIZE; /* PCL-724 in 96 DIO configuration */
        printk(KERN_INFO "comedi%d: pcl724: board=%s, 0x%03lx ", dev->minor,
               board->name, iobase);
-       if (!request_region(iobase, iorange, "pcl724")) {
+       if (!request_region(iobase, iorange, dev->board_name)) {
                printk("I/O port conflict\n");
                return -EIO;
        }
 
        dev->iobase = iobase;
 
-       dev->board_name = board->name;
-
 #ifdef PCL724_IRQ
        irq = 0;
        if (board->IRQbits != 0) {      /* board support IRQ */
@@ -134,8 +132,8 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                                       "DISABLING IT", irq);
                                irq = 0;        /* Bad IRQ */
                        } else {
-                               if (request_irq
-                                   (irq, interrupt_pcl724, 0, "pcl724", dev)) {
+                               if (request_irq(irq, interrupt_pcl724, 0,
+                                               dev->board_name, dev)) {
                                        printk(KERN_WARNING
                                               ", unable to allocate IRQ %u, "
                                               "DISABLING IT", irq);