Fixed SPI bug with ioctl