From: Ian Abbott Date: Mon, 18 Mar 2013 17:18:59 +0000 (+0000) Subject: staging: comedi: amplc_dio200: don't check bus type in attach X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~137^2~498 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c6b670d4fa1c811f80a11aa4a3b68ea257a7179;p=pandora-kernel.git staging: comedi: amplc_dio200: don't check bus type in attach Since the legacy attach routine `dio200_attach()` is only called for board names matching an entry in our array of ISA boards `dio200_isa_boards[]`, and it is reasonable to expect all elements of `dio200_isa_boards[]` to have their `bustype` member initialized correctly to `isa_bustype`, don't bother checking the bus type in `dio200_attach()`. Add `if (!DO_ISA) return -EINVAL` to optimize out the remainder of the function if `CONFIG_COMEDI_AMPLC_DIO200_ISA` is not defined. Similarly, don't bother checking the bus type in `dio200_find_pci_board()` as it is reasonable to expect all elements of `dio200_pci_boards[]` to have their `bustype` member initialized correctly to `pci_bustype`. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed