Guest User

Untitled

a guest
Jul 15th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. static int spike_do_one_message(void)
  2. {
  3. int status;
  4.  
  5. if (down_interruptible(&spike_dev.spi_sem))
  6. return -ERESTARTSYS;
  7.  
  8. if (!spike_dev.spi_device) {
  9. up(&spike_dev.spi_sem);
  10. return -ENODEV;
  11. }
  12.  
  13. spike_prepare_spi_message();
  14.  
  15. /* this will put us to sleep until the transfers are complete */
  16. status = spi_sync(spike_dev.spi_device, &spike_ctl.msg);
  17.  
  18. up(&spike_dev.spi_sem);
  19.  
  20. return status;
  21. }
Add Comment
Please, Sign In to add comment