Changeset 1021 for trunk/board_enable.c


Ignore:
Timestamp:
05/31/10 00:24:40 (2 years ago)
Author:
hailfinger
Message:

Remove unneeded #include statements completely.

unistd.h was only used to get a definition of NULL in all files. Add our
own NULL #define and remove unistd.h from flash.h
stdio.h has no place in flash.h, it should be included only in files
which really need it.
Add #include statements in individual .c files where needed.

Replace a few printf with msg_* to eliminate the need for stdio.h.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>
Acked-by: Uwe Hermann <uwe@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/board_enable.c

    r1015 r1021  
    2626 
    2727#include <string.h> 
    28 #include <fcntl.h> 
    2928#include "flash.h" 
    3029 
     
    108107        id = sio_read(port, 0x20); 
    109108        if (id != 0x44) { 
    110                 fprintf(stderr, "\nERROR: %s: FDC37B787: Wrong ID 0x%02X.\n", 
    111                         name, id); 
     109                msg_perr("\nERROR: %s: FDC37B787: Wrong ID 0x%02X.\n", 
     110                        name, id); 
    112111                OUTB(0xAA, port); /* leave conf mode */ 
    113112                return -1; 
     
    119118        if ((val & 0x1B) != 0x10)       /* output, no invert, GPIO */ 
    120119        { 
    121                 fprintf(stderr, "\nERROR: %s: GPIO50 mode 0x%02X unexpected.\n", 
    122                         name, val); 
     120                msg_perr("\nERROR: %s: GPIO50 mode 0x%02X unexpected.\n", 
     121                        name, val); 
    123122                OUTB(0xAA, port); 
    124123                return -1; 
Note: See TracChangeset for help on using the changeset viewer.