summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-09 16:10:31 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 12:47:37 -0700
commit92e5c90dcce34f981a625f3343a3a9baee008396 (patch)
tree0fca1e0b18280eb86f513fa279e47ad699945dde
parentffbe031d25c7e53acce4b15bf06134a5370e7920 (diff)
staging: comedi: pcl816: 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: 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>
-rw-r--r--drivers/staging/comedi/drivers/pcl816.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c
index ebd9e4706050..eb0816e75d61 100644
--- a/drivers/staging/comedi/drivers/pcl816.c
+++ b/drivers/staging/comedi/drivers/pcl816.c
@@ -992,7 +992,7 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it)
printk("comedi%d: pcl816: board=%s, ioport=0x%03lx", dev->minor,
board->name, iobase);
- if (!request_region(iobase, board->io_range, "pcl816")) {
+ if (!request_region(iobase, board->io_range, dev->board_name)) {
printk("I/O port conflict\n");
return -EIO;
}
@@ -1009,8 +1009,6 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return -ENOMEM;
dev->private = devpriv;
- dev->board_name = board->name;
-
/* grab our IRQ */
irq = 0;
if (board->IRQbits != 0) { /* board support IRQ */
@@ -1022,8 +1020,8 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it)
"DISABLING IT", irq);
irq = 0; /* Bad IRQ */
} else {
- if (request_irq
- (irq, interrupt_pcl816, 0, "pcl816", dev)) {
+ if (request_irq(irq, interrupt_pcl816, 0,
+ dev->board_name, dev)) {
printk
(", unable to allocate IRQ %u, "
"DISABLING IT", irq);
@@ -1095,7 +1093,7 @@ no_rtc:
printk(", DMA is out of allowed range, FAIL!\n");
return -EINVAL; /* Bad DMA */
}
- ret = request_dma(dma, "pcl816");
+ ret = request_dma(dma, dev->board_name);
if (ret) {
printk(KERN_ERR
", unable to allocate DMA %u, FAIL!\n", dma);