Update spi-driver.c

Reduced complexity & function calls