The code did not take into account that valid bus numbers are
0...(COUNT-1).
This patch corrects this. It also makes use of the newly introduced
SOFT_SPI_NUMOF define.
The expandable GPIO API requires the comparison of structured GPIO types. This means that inline functions must be used instead of direct comparisons. For the migration process, drivers must first be changed so that they use the inline comparison functions.