diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-09-24 13:22:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-26 09:37:30 -0700 |
commit | 7c843aa7731c774a78a31b6dab371024c4756d38 (patch) | |
tree | c04cd4760aad19cd4a615ba38f66b72e08abb48d /drivers/staging/comedi | |
parent | f574af6d268240a68f99fac9f2f42ce38b26eae9 (diff) | |
download | talos-obmc-linux-7c843aa7731c774a78a31b6dab371024c4756d38.tar.gz talos-obmc-linux-7c843aa7731c774a78a31b6dab371024c4756d38.zip |
staging: comedi: s626: use dev->board_name for resource name
Instead of the literal string "s626", use the dev->board_name for
the resource name when enabling the PCI device and requesting the
irq.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/s626.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index e30833f4178c..fb215b24fce8 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -2453,11 +2453,12 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) struct comedi_subdevice *s; comedi_set_hw_dev(dev, &pcidev->dev); + dev->board_name = dev->driver->driver_name; if (alloc_private(dev, sizeof(struct s626_private)) < 0) return -ENOMEM; - result = comedi_pci_enable(pcidev, "s626"); + result = comedi_pci_enable(pcidev, dev->board_name); if (result < 0) { printk(KERN_ERR "s626_attach: comedi_pci_enable fails\n"); return -ENODEV; @@ -2510,8 +2511,6 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) } - dev->board_name = dev->driver->driver_name; - ret = comedi_alloc_subdevices(dev, 6); if (ret) return ret; @@ -2524,7 +2523,7 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) printk(KERN_ERR " unknown irq (bad)\n"); } else { ret = request_irq(dev->irq, s626_irq_handler, IRQF_SHARED, - "s626", dev); + dev->board_name, dev); if (ret < 0) { printk(KERN_ERR " irq not available\n"); |