Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3c6b670d authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

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: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3d9bfccd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment