staging: comedi: amplc_pc236: don't check bus type in attach
Since the legacy attach routine `pc236_attach()` is only called for board names matching an entry in our array of ISA boards `pc236_isa_boards[]`, and it is reasonable to expect all elements of `pc236_isa_boards[]` to have their `bustype` member initialized correctly to `isa_bustype`, don't bother checking the bus type in `pc236_attach()`. Add `if (!DO_ISA) return -EINVAL` to optimize out the remainder of the function if `CONFIG_COMEDI_AMPLC_PC236_ISA` is not defined. Similarly, don't bother checking the bus type in `pc236_find_pci_board()` as it is reasonable to expect all elements of `pc236_pci_boards[]` to have their `bustype` member initialized correctly to `pci_bustype`. Signed-off-by: NIan Abbott <abbotti@mev.co.uk> Reviewed-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录