[PATCH 01/32] staging: comedi: vmk80xx: remove support for manual attaching

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

 



This comedi USB driver supports attaching with the auto config
mechanism. Remove the manual attaching support using the
COMEDI_DEVCONFIG ioctl.

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

diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index 609dc69..f5a999c 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -1189,26 +1189,6 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
 	return 0;
 }
 
-/* called for COMEDI_DEVCONFIG ioctl for board_name "vmk80xx" */
-static int vmk80xx_attach(struct comedi_device *cdev,
-			  struct comedi_devconfig *it)
-{
-	int i;
-	int ret;
-
-	mutex_lock(&glb_mutex);
-	for (i = 0; i < VMK80XX_MAX_BOARDS; i++)
-		if (vmb[i].probed && !vmb[i].attached)
-			break;
-	if (i == VMK80XX_MAX_BOARDS)
-		ret = -ENODEV;
-	else
-		ret = vmk80xx_attach_common(cdev, &vmb[i]);
-	mutex_unlock(&glb_mutex);
-	return ret;
-}
-
-/* called via comedi_usb_auto_config() */
 static int vmk80xx_auto_attach(struct comedi_device *cdev,
 			       unsigned long context_unused)
 {
@@ -1245,9 +1225,8 @@ static void vmk80xx_detach(struct comedi_device *dev)
 static struct comedi_driver vmk80xx_driver = {
 	.module		= THIS_MODULE,
 	.driver_name	= "vmk80xx",
-	.attach		= vmk80xx_attach,
-	.detach		= vmk80xx_detach,
 	.auto_attach	= vmk80xx_auto_attach,
+	.detach		= vmk80xx_detach,
 };
 
 static int vmk80xx_usb_probe(struct usb_interface *intf,
-- 
1.8.1.1.293.gfe73786

_______________________________________________
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