there were style problems:
  - use "foo (args)", not "foo( args )"
  - indentation is 4 spaces, not 8
  - no trailing whitespace/newlines

you also forgot to update src/bus/Makefile.am, so the driver never actually
got built.  then i hit a build failure as you didnt include the NWP define.

i fixed these up and committed it, but please be more careful with future
patches.
-mike
-----

I have removed an unneccessary variable from the code, and I have fixed an overwrite error.

Regards,
Miklós


Index: src/bus/mpc8313.c
===================================================================
--- src/bus/mpc8313.c	(revision 1990)
+++ src/bus/mpc8313.c	(working copy)
@@ -77,9 +77,11 @@
     char buff[10];
     int i;
     int failed = 0;
-    char revbits = 0;
     const char *nwppin = NULL, *noepin = NULL, *ncspin = NULL, *nwepin = NULL;
 
+    bus = urj_bus_generic_new (chain, driver, sizeof (bus_params_t));
+    REVBITS = 0;
+
     for (i = 0; cmd_params[i] != NULL; i++)
     {
         switch (cmd_params[i]->key)
@@ -107,7 +109,7 @@
             nwepin = cmd_params[i]->value.string;
             break;
         case URJ_BUS_PARAM_KEY_REVBITS:
-            revbits = 1;
+            REVBITS = 1;
             break;
         default:
             urj_error_set (URJ_ERROR_SYNTAX, "unrecognised bus parameter '%s'",
@@ -116,9 +118,8 @@
         }
     }
 
-    bus = urj_bus_generic_new (chain, driver, sizeof (bus_params_t));
-    REVBITS = revbits;
 
+
     if (bus == NULL)
         return NULL;
 
@@ -243,7 +244,7 @@
     int i;
     urj_part_t *p = bus->part;
 
-    for (i = 0; i <= BUS_WIDTH; i++)
+    for (i = 0; i < BUS_WIDTH; i++)
         urj_part_set_signal (p, LAD[i], 1,
                              (d >> ((REVBITS == 1) ? BUS_WIDTH - 1 - i : i)) &
                              1);
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to