From: H Hartley Sweeten Date: Sat, 8 Sep 2012 00:42:12 +0000 (-0700) Subject: staging: comedi: me4000: remove the pci resource error messages X-Git-Tag: firefly_0821_release~3680^2~1977^2~543 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9c943f4ed479d58a2814239815e45fc0b61f4116;p=firefly-linux-kernel-4.4.55.git staging: comedi: me4000: remove the pci resource error messages Remove the error messages about the pci base address not being available. They are just noise. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index eeca9711dde1..71ca75f4a92a 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -383,45 +383,21 @@ found: static int get_registers(struct comedi_device *dev, struct pci_dev *pci_dev_p) { - /*--------------------------- plx regbase -------------------------------*/ - info->plx_regbase = pci_resource_start(pci_dev_p, 1); - if (info->plx_regbase == 0) { - printk(KERN_ERR - "comedi%d: me4000: get_registers(): " - "PCI base address 1 is not available\n", dev->minor); + if (!info->plx_regbase) return -ENODEV; - } - - /*--------------------------- me4000 regbase ----------------------------*/ info->me4000_regbase = pci_resource_start(pci_dev_p, 2); - if (info->me4000_regbase == 0) { - printk(KERN_ERR - "comedi%d: me4000: get_registers(): " - "PCI base address 2 is not available\n", dev->minor); + if (!info->me4000_regbase) return -ENODEV; - } - - /*--------------------------- timer regbase ------------------------------*/ info->timer_regbase = pci_resource_start(pci_dev_p, 3); - if (info->timer_regbase == 0) { - printk(KERN_ERR - "comedi%d: me4000: get_registers(): " - "PCI base address 3 is not available\n", dev->minor); + if (!info->timer_regbase) return -ENODEV; - } - - /*--------------------------- program regbase ----------------------------*/ info->program_regbase = pci_resource_start(pci_dev_p, 5); - if (info->program_regbase == 0) { - printk(KERN_ERR - "comedi%d: me4000: get_registers(): " - "PCI base address 5 is not available\n", dev->minor); + if (!info->program_regbase) return -ENODEV; - } return 0; }