mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling 1. Add semaphore uninterruptible wait function 2 .Replace semaphore wait loop with a single uninterruptible wait 3. Replace all sem_xxx to nxsem_xxx * Unify the void cast usage 1. Remove void cast for function because many place ignore the returned value witout cast 2. Replace void cast for variable with UNUSED macro
This commit is contained in:
@@ -140,10 +140,10 @@ static const struct file_operations g_ads1242_fops =
|
||||
|
||||
static void ads1242_lock(FAR struct spi_dev_s *spi)
|
||||
{
|
||||
(void)SPI_LOCK(spi, true);
|
||||
SPI_LOCK(spi, true);
|
||||
SPI_SETMODE(spi, ADS1242_SPI_MODE);
|
||||
SPI_SETBITS(spi, 8);
|
||||
(void)SPI_HWFEATURES(spi, 0);
|
||||
SPI_HWFEATURES(spi, 0);
|
||||
SPI_SETFREQUENCY(spi, ADS1242_SPI_FREQUENCY);
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ static void ads1242_lock(FAR struct spi_dev_s *spi)
|
||||
|
||||
static void ads1242_unlock(FAR struct spi_dev_s *spi)
|
||||
{
|
||||
(void)SPI_LOCK(spi, false);
|
||||
SPI_LOCK(spi, false);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user