]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: comedi: pcl730: cleanup dev->board_name usage
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:09:10 +0000 (16:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:47:36 +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/pcl730.c

index e3de499374524e2a4e323f2379e90f16dea51640..371f76cabb37623c54329a20c74093724aae9760 100644 (file)
@@ -72,11 +72,10 @@ static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        iorange = board->io_range;
        printk(KERN_INFO "comedi%d: pcl730: board=%s 0x%04lx ", dev->minor,
               board->name, iobase);
-       if (!request_region(iobase, iorange, "pcl730")) {
+       if (!request_region(iobase, iorange, dev->board_name)) {
                printk("I/O port conflict\n");
                return -EIO;
        }
-       dev->board_name = board->name;
        dev->iobase = iobase;
        dev->irq = 0;