Refactoring attach of interrupt handlers for SPI devices.