How do I get rid of duplication

when i did something similar using SPI expansion boards, the data structure simply included the SPI address and bit position.