Created
November 25, 2010 17:55
-
-
Save scottellis/715716 to your computer and use it in GitHub Desktop.
spike_do_one_message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int spike_do_one_message(void) | |
{ | |
int status; | |
if (down_interruptible(&spike_dev.spi_sem)) | |
return -ERESTARTSYS; | |
if (!spike_dev.spi_device) { | |
up(&spike_dev.spi_sem); | |
return -ENODEV; | |
} | |
spike_prepare_spi_message(); | |
/* this will put us to sleep until the transfers are complete */ | |
status = spi_sync(spike_dev.spi_device, &spike_ctl.msg); | |
up(&spike_dev.spi_sem); | |
return status; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment