[PATCH 45/51 v2] staging: comedi: ni_labpc: remove board attach noise

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove the kernel noise in labpc_common_attach() as well as a couple
obvious comments.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/ni_labpc.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index 926c4f1..244b3e5 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -1629,18 +1629,11 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
 
 	dev->board_name = board->name;
 
-	dev_info(dev->class_dev, "ni_labpc: %s\n", dev->board_name);
-	if (iobase == 0) {
-		dev_err(dev->class_dev, "io base address is zero!\n");
+	if (iobase == 0)
 		return -EINVAL;
-	}
-	/*  request io regions for isa boards */
 	if (board->bustype == isa_bustype) {
-		/* check if io addresses are available */
-		if (!request_region(iobase, LABPC_SIZE, dev->board_name)) {
-			dev_err(dev->class_dev, "I/O port conflict\n");
+		if (!request_region(iobase, LABPC_SIZE, dev->board_name))
 			return -EIO;
-		}
 	}
 	dev->iobase = iobase;
 
@@ -1651,6 +1644,7 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
 		devpriv->read_byte = labpc_inb;
 		devpriv->write_byte = labpc_outb;
 	}
+
 	/* initialize board's command registers */
 	devpriv->write_byte(devpriv->cmd1, dev->iobase + CMD1_REG);
 	devpriv->write_byte(devpriv->cmd2, dev->iobase + CMD2_REG);
-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux