DW SPI: refactor poll_transfer functions