[PATCH] staging: comedi: usbdux: remove an unnecessary dev_info()

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

 



usbdux_attach_common() prints two messages via dev_info() that shows a
device has been attached.  The first of these messages includes an index
into a static array that the function determines by pointer subtraction,
assuming the pointer passed to the function points to an element of the
array.  Dan Carpenter pointed out that this was kind of ugly.  Since the
dev_info() that prints the array index doesn't add anything useful
(since no other messages print the array index and nothing else uses
it), let's just get rid of it.

Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
 drivers/staging/comedi/drivers/usbdux.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c
index c3f928f..3d300ef 100644
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -2623,7 +2623,6 @@ static int usbdux_attach_common(struct comedi_device *dev,
 				void *aux_data, int aux_len)
 {
 	int ret;
-	int index = (int)(udev - usbduxsub);
 	struct comedi_subdevice *s = NULL;
 
 	down(&udev->sem);
@@ -2654,9 +2653,6 @@ static int usbdux_attach_common(struct comedi_device *dev,
 		return ret;
 	}
 
-	dev_info(&udev->interface->dev,
-		 "comedi%d: usb-device %d is attached to comedi.\n",
-		 dev->minor, index);
 	/* private structure is also simply the usb-structure */
 	dev->private = udev;
 
-- 
1.7.8.5

_______________________________________________
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