diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-04-09 19:11:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-11 15:47:37 -0400 |
commit | b27cc4135cd54064ccee8b4aeccfc659e19447a6 (patch) | |
tree | c68c2e0bfb6b06bca26f4ba0fb94990c6bbaef8a /drivers/staging | |
parent | 22b580f07ec7cf8452496d7ad80b29ca22e1c541 (diff) |
staging: comedi: pcl818: 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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/pcl818.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c index b5af22eb7c37..e4df63e2e3f9 100644 --- a/drivers/staging/comedi/drivers/pcl818.c +++ b/drivers/staging/comedi/drivers/pcl818.c | |||
@@ -1616,7 +1616,7 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
1616 | devpriv->io_range = PCLx1xFIFO_RANGE; | 1616 | devpriv->io_range = PCLx1xFIFO_RANGE; |
1617 | devpriv->usefifo = 1; | 1617 | devpriv->usefifo = 1; |
1618 | } | 1618 | } |
1619 | if (!request_region(iobase, devpriv->io_range, "pcl818")) { | 1619 | if (!request_region(iobase, devpriv->io_range, dev->board_name)) { |
1620 | comedi_error(dev, "I/O port conflict\n"); | 1620 | comedi_error(dev, "I/O port conflict\n"); |
1621 | return -EIO; | 1621 | return -EIO; |
1622 | } | 1622 | } |
@@ -1628,8 +1628,6 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
1628 | return -EIO; | 1628 | return -EIO; |
1629 | } | 1629 | } |
1630 | 1630 | ||
1631 | dev->board_name = board->name; | ||
1632 | |||
1633 | /* grab our IRQ */ | 1631 | /* grab our IRQ */ |
1634 | irq = 0; | 1632 | irq = 0; |
1635 | if (board->IRQbits != 0) { /* board support IRQ */ | 1633 | if (board->IRQbits != 0) { /* board support IRQ */ |
@@ -1641,8 +1639,8 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
1641 | irq); | 1639 | irq); |
1642 | irq = 0; /* Bad IRQ */ | 1640 | irq = 0; /* Bad IRQ */ |
1643 | } else { | 1641 | } else { |
1644 | if (request_irq | 1642 | if (request_irq(irq, interrupt_pcl818, 0, |
1645 | (irq, interrupt_pcl818, 0, "pcl818", dev)) { | 1643 | dev->board_name, dev)) { |
1646 | printk | 1644 | printk |
1647 | (", unable to allocate IRQ %u, DISABLING IT", | 1645 | (", unable to allocate IRQ %u, DISABLING IT", |
1648 | irq); | 1646 | irq); |
@@ -1707,7 +1705,7 @@ no_rtc: | |||
1707 | printk(KERN_ERR "DMA is out of allowed range, FAIL!\n"); | 1705 | printk(KERN_ERR "DMA is out of allowed range, FAIL!\n"); |
1708 | return -EINVAL; /* Bad DMA */ | 1706 | return -EINVAL; /* Bad DMA */ |
1709 | } | 1707 | } |
1710 | ret = request_dma(dma, "pcl818"); | 1708 | ret = request_dma(dma, dev->board_name); |
1711 | if (ret) | 1709 | if (ret) |
1712 | return -EBUSY; /* DMA isn't free */ | 1710 | return -EBUSY; /* DMA isn't free */ |
1713 | devpriv->dma = dma; | 1711 | devpriv->dma = dma; |