9
0
Fork 0

Fix a cloned error in driver poll setup

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4132 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2011-12-03 16:13:40 +00:00
parent f5a411938e
commit 700f00279c
4 changed files with 29 additions and 6 deletions

View File

@ -2230,4 +2230,6 @@
* graphics/nxfonts/nxfonts_sans17x22.h and nxfonts_sans20x26.h: Add
some very small sans serif fonts.
* graphics/nxfonts/nxfonts_sans17x23b.h and nxfonts_sans20x27b.h: Add
corresponding sans serif bold fonts.
corresponding sans serif bold fonts.
* drivers/input/ads7843e.c and tsc2007.c: Fix some errors in the poll
setup error checking that was cloned into both drivers.

View File

@ -1,4 +1,4 @@
NuttX TODO List (Last updated November 15, 2011)
NuttX TODO List (Last updated December 3, 2011)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This file summarizes known NuttX bugs, limitations, inconsistencies with
@ -16,7 +16,7 @@ nuttx/
(16) Network (net/, drivers/net)
(2) USB (drivers/usbdev, drivers/usbhost)
(7) Libraries (lib/)
(9) File system/Generic drivers (fs/, drivers/)
(11) File system/Generic drivers (fs/, drivers/)
(2) Graphics subystem (graphics/)
(1) Pascal add-on (pcode/)
(1) Documentation (Documentation/)
@ -501,6 +501,25 @@ o File system / Generic drivers (fs/, drivers/)
Status: Open
Priority: Medium
Description: The serial driver (drivers/serial) should return with an
error and errno=EINTR when an interrupt is received. However,
the serial driver just continues waiting:
static void uart_takesem(FAR sem_t *sem)
{
while (sem_wait(sem) != 0)
{
ASSERT(*get_errno_ptr() == EINTR);
}
}
Status: Open
Priority Medium
Description: All drivers that support the poll method should also report
POLLHUP event when the driver is closedd.
Status: Open
Priority: Medium-Low
o Graphics subystem (graphics/)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -980,7 +980,7 @@ static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds,
{
/* Ignore waits that do not include POLLIN */
if ((fds->revents & POLLIN) == 0)
if ((fds->events & POLLIN) == 0)
{
ret = -EDEADLK;
goto errout;

View File

@ -1073,7 +1073,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
{
FAR struct inode *inode;
FAR struct tsc2007_dev_s *priv;
int ret = OK;
int ret;
int i;
ivdbg("setup: %d\n", (int)setup);
@ -1098,8 +1098,9 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
{
/* Ignore waits that do not include POLLIN */
if ((fds->revents & POLLIN) == 0)
if ((fds->events & POLLIN) == 0)
{
idbg("Missing POLLIN: revents: %08x\n", fds->revents);
ret = -EDEADLK;
goto errout;
}
@ -1124,6 +1125,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
if (i >= CONFIG_TSC2007_NPOLLWAITERS)
{
idbg("No availabled slot found: %d\n", i);
fds->priv = NULL;
ret = -EBUSY;
goto errout;