Commit 44a6438b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcl726: cleanup dev->board_name usage

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9526728e
...@@ -236,15 +236,13 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -236,15 +236,13 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
iorange = board->io_range; iorange = board->io_range;
printk(KERN_WARNING "comedi%d: pcl726: board=%s, 0x%03lx ", dev->minor, printk(KERN_WARNING "comedi%d: pcl726: board=%s, 0x%03lx ", dev->minor,
board->name, iobase); board->name, iobase);
if (!request_region(iobase, iorange, "pcl726")) { if (!request_region(iobase, iorange, dev->board_name)) {
printk(KERN_WARNING "I/O port conflict\n"); printk(KERN_WARNING "I/O port conflict\n");
return -EIO; return -EIO;
} }
dev->iobase = iobase; dev->iobase = iobase;
dev->board_name = board->name;
devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv) if (!devpriv)
return -ENOMEM; return -ENOMEM;
...@@ -268,7 +266,7 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -268,7 +266,7 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
irq = 0; /* Bad IRQ */ irq = 0; /* Bad IRQ */
} else { } else {
if (request_irq(irq, interrupt_pcl818, 0, if (request_irq(irq, interrupt_pcl818, 0,
"pcl726", dev)) { dev->board_name, dev)) {
printk(KERN_WARNING printk(KERN_WARNING
", unable to allocate IRQ %d," ", unable to allocate IRQ %d,"
" DISABLING IT", irq); " DISABLING IT", irq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment