* [PATCH 4/4] staging: comedi: adl_pci6208: use the 'board_name' for the resource name
@ 2012-08-09 21:51 H Hartley Sweeten
0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2012-08-09 21:51 UTC (permalink / raw)
To: Linux Kernel; +Cc: devel, abbotti, gregkh
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>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/comedi/drivers/adl_pci6208.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adl_pci6208.c b/drivers/staging/comedi/drivers/adl_pci6208.c
index 74695bb..3abff556 100644
--- a/drivers/staging/comedi/drivers/adl_pci6208.c
+++ b/drivers/staging/comedi/drivers/adl_pci6208.c
@@ -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);
--
1.7.11
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-09 21:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-09 21:51 [PATCH 4/4] staging: comedi: adl_pci6208: use the 'board_name' for the resource name H Hartley Sweeten
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome