This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SPI driver for AT91


Andrew Lunn wrote:

On Tue, Oct 12, 2004 at 10:00:31AM -0400, Nicolas Brouard wrote:


Hi, in the file packages/devs/spi/arm/at91/current/src/spi_at91.c, the line 360 has no effect. if (NULL != rx_data);
rx_data += tr_count;
I suppose we have to remove the ';' at the end of the line.



Curtainly looks wrong, but lets wait for Savin to comment.


Yes, it is a typo. Problems would arise in transfers larger then 0xFFFF bytes
with rx data pointer set to NULL. Attached is the patch.


Thanks,
              savin
Index: devs/spi/arm/at91/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/spi/arm/at91/current/ChangeLog,v
retrieving revision 1.1
diff -u -r1.1 ChangeLog
--- devs/spi/arm/at91/current/ChangeLog	5 Oct 2004 08:28:34 -0000	1.1
+++ devs/spi/arm/at91/current/ChangeLog	13 Oct 2004 08:24:03 -0000
@@ -1,3 +1,8 @@
+2004-10-13  Savin Zlobec  <savin@elatec.si> 
+
+        * src/spi_at91.c: Fixed a typo in spi_at91_transfer reported by
+        Nicolas Brouard.
+
 2004-08-31  Savin Zlobec  <savin@elatec.si> 
 
         * include/spi_at91.h:
Index: devs/spi/arm/at91/current/src/spi_at91.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/spi/arm/at91/current/src/spi_at91.c,v
retrieving revision 1.1
diff -u -r1.1 spi_at91.c
--- devs/spi/arm/at91/current/src/spi_at91.c	5 Oct 2004 08:28:35 -0000	1.1
+++ devs/spi/arm/at91/current/src/spi_at91.c	13 Oct 2004 08:24:03 -0000
@@ -357,7 +357,7 @@
 
         // Adjust running variables
         
-        if (NULL != rx_data);
+        if (NULL != rx_data)
             rx_data += tr_count;
         tx_data += tr_count;
         count   -= tr_count;

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]