diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-03 16:13:40 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-03 16:13:40 +0000 |
commit | fb93c6697042ab2a4f0244e4b2808325a7dfb992 (patch) | |
tree | e07be7fd05ba272e5cedac20cdf78a9e61afc44f | |
parent | c7049214583fe91d4cf3b72c7d3f2667a08dbc8e (diff) | |
download | nuttx-fb93c6697042ab2a4f0244e4b2808325a7dfb992.tar.gz nuttx-fb93c6697042ab2a4f0244e4b2808325a7dfb992.tar.bz2 nuttx-fb93c6697042ab2a4f0244e4b2808325a7dfb992.zip |
Fix a cloned error in driver poll setup
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4132 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/ChangeLog | 4 | ||||
-rw-r--r-- | nuttx/TODO | 23 | ||||
-rw-r--r-- | nuttx/drivers/input/ads7843e.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/input/tsc2007.c | 6 |
4 files changed, 29 insertions, 6 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index c2dbd6887..a56f4d1b1 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -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.
\ No newline at end of file + 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.
\ No newline at end of file diff --git a/nuttx/TODO b/nuttx/TODO index 79dc6af79..0b2ee9d9b 100644 --- a/nuttx/TODO +++ b/nuttx/TODO @@ -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/) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/nuttx/drivers/input/ads7843e.c b/nuttx/drivers/input/ads7843e.c index 1e04de37c..d4b83703c 100644 --- a/nuttx/drivers/input/ads7843e.c +++ b/nuttx/drivers/input/ads7843e.c @@ -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; diff --git a/nuttx/drivers/input/tsc2007.c b/nuttx/drivers/input/tsc2007.c index 544cb1c79..3afe926fe 100644 --- a/nuttx/drivers/input/tsc2007.c +++ b/nuttx/drivers/input/tsc2007.c @@ -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; |