]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_spi.c
Make *printf() return "int" instead of "void"
[karo-tx-uboot.git] / common / cmd_spi.c
index 40ee7e7dd3c7daa08270fbfc72d0d7967d92077c..ab7aac780dbd85999ccf8cc65d01c226e7de247b 100644 (file)
@@ -123,9 +123,8 @@ int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                printf("Error with the SPI transaction.\n");
                rcode = 1;
        } else {
-               cp = (char *)din;
                for(j = 0; j < ((bitlen + 7) / 8); j++) {
-                       printf("%02X", *cp++);
+                       printf("%02X", din[j]);
                }
                printf("\n");
        }
@@ -139,9 +138,9 @@ int do_spi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 U_BOOT_CMD(
        sspi,   5,      1,      do_spi,
-       "sspi    - SPI utility commands\n",
+       "SPI utility commands",
        "<device> <bit_len> <dout> - Send <bit_len> bits from <dout> out the SPI\n"
        "<device>  - Identifies the chip select of the device\n"
        "<bit_len> - Number of bits to send (base 10)\n"
-       "<dout>    - Hexadecimal string that gets sent\n"
+       "<dout>    - Hexadecimal string that gets sent"
 );