Skip to content

Commit

Permalink
staging: comedi: adl_pci6208: use the 'board_name' for the resource name
Browse files Browse the repository at this point in the history
Use the 'dev->board_name' instead of the 'dev->driver->driver_name'
as the resource name used when requesing the pci regions in
comedi_pci_enable(). The board_name has a closer affinity to the
card.

Also, remove the dev_err() message when comedi_pci_enable() fails.
It's just noise and doesn't actually tell the real reason why the
call failed. It could have failed either the pci_enable_device()
or the pci_request_regions().

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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Aug 14, 2012
1 parent 270809a commit 3cf05dd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/staging/comedi/drivers/adl_pci6208.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,9 @@ static int pci6208_attach_pci(struct comedi_device *dev,
return ret;
devpriv = dev->private;

ret = comedi_pci_enable(pcidev, dev->driver->driver_name);
if (ret) {
dev_err(dev->class_dev,
"Failed to enable PCI device and request regions\n");
ret = comedi_pci_enable(pcidev, dev->board_name);
if (ret)
return ret;
}
dev->iobase = pci_resource_start(pcidev, 2);

ret = comedi_alloc_subdevices(dev, 3);
Expand Down

0 comments on commit 3cf05dd

Please sign in to comment.