From: H Hartley Sweeten Date: Tue, 14 May 2013 21:22:11 +0000 (-0700) Subject: staging: comedi: dt9812: remove attaching by serial number X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~76^2~632 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1415003fe6015575ed00f85bacd948b93d7ca78c;p=pandora-kernel.git staging: comedi: dt9812: remove attaching by serial number Currently this driver supports attaching 16 usb devices to 16 comedi devices. The user can pass the 32-bit serial number of the usb device when attaching to force a comedi device to attach to a specific usb device. It's also possible to attach a comedi device without having an attached usb device. When the device is first opened the comedi_device (*open) function in this driver then checks to see if a usb device has been attached. If so the subdevice information is updated based on the usb device and the comedi device is then operational. If a usb device is not attached the (*open) returns -ENODEV. To simplify converting this driver to the comedi (*auto_attach) mechanism, remove the attaching by serial number option. Modify the usb (*probe) so that the first available slot is used. If all the slots are used return -ENODEV. Modify the comedi (*attach) so that the first unused slot that has an attached usb device is used. If all the slots are used return -ENODEV. Since this ensures that the comedi device has an attached usb device, remove the (*open) function and fully initialize the subdevices during the (*attach). Fix the comedi (*detach) so that the slot is made available after detaching. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed