From: Ian Abbott Date: Fri, 1 Jun 2012 16:31:41 +0000 (+0100) Subject: staging: comedi: amplc_pci230: Add attach_pci() hook X-Git-Tag: v3.6-rc1~100^2~968 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba54fa6893aa72159c046c6099f7644df745feea;p=pandora-kernel.git staging: comedi: amplc_pci230: Add attach_pci() hook Implement the attach_pci() hook as function pci230_attach_pci(). This is called by comedi_pci_auto_config() in preference to the old attach() hook (implemented by pci230_attach() and still required for "manual" configuration of comedi devices). The advantage of the attach_pci() hook is that it avoids searching for the PCI device. Refactor pci230_attach() and factor out code common to pci230_attach() and pci230_attach_pci() into new functions pci230_match_pci_board(), pci230_find_pci_board(), pci230_find_pci(), pci230_alloc_private() and pci230_attach_common(). Finally, move pci230_attach() and pci230_detach() along with all the new functions towards the bottom of the file as it makes the patch much cleaner (though longer) and I plan to move things around soon to get rid of the remaining forward references. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed