arch/arm/src/: Fix a error in last commit that was cloned in three places.

This commit is contained in:
Gregory Nutt
2017-12-17 14:38:20 -06:00
parent b8ea9e9c64
commit 87252297d6
12 changed files with 239 additions and 104 deletions
+12 -5
View File
@@ -945,9 +945,9 @@ static ssize_t tsc2007_read(FAR struct file *filep, FAR char *buffer, size_t len
ret = tsc2007_sample(priv, &sample);
if (ret < 0)
{
/* Sample data is not available now. We would ave to wait to get
* receive sample data. If the user has specified the O_NONBLOCK
* option, then just return an error.
/* Sample data is not available now. We would ave to wait to receive
* sample data. If the user has specified the O_NONBLOCK option, then
* just return an error.
*/
if (filep->f_oflags & O_NONBLOCK)
@@ -1259,11 +1259,18 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
/* Initialize the TSC2007 device driver instance */
memset(priv, 0, sizeof(struct tsc2007_dev_s));
priv->i2c = dev; /* Save the I2C device handle */
priv->config = config; /* Save the board configuration */
priv->i2c = dev; /* Save the I2C device handle */
priv->config = config; /* Save the board configuration */
nxsem_init(&priv->devsem, 0, 1); /* Initialize device structure semaphore */
nxsem_init(&priv->waitsem, 0, 0); /* Initialize pen event wait semaphore */
/* The event wait semaphore is used for signaling and, hence, should not
* have priority inheritance enabled.
*/
nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE);
/* Make sure that interrupts are disabled */
config->clear(config);