X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fnet%2Fnetconsole.c;h=e27bb3e71db9b0e593681f038bf36cb10cf675bb;hb=e9319f111d366294b9a1e8b1f66875242a5de3dd;hp=69089f92cec913b1ab6d0c33f94273d8cc10badf;hpb=74ac5facb988fc488a707db228b177ead63a6541;p=u-boot diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 69089f92ce..e27bb3e71d 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -22,11 +22,8 @@ */ #include - -#ifdef CONFIG_NETCONSOLE - #include -#include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -142,7 +139,7 @@ static void nc_send_packet (const char *buf, int len) eth_halt (); } -int nc_start (void) +static int nc_start(void) { int netmask, our_ip; @@ -172,7 +169,7 @@ int nc_start (void) return 0; } -void nc_putc (char c) +static void nc_putc(char c) { if (output_recursion) return; @@ -183,7 +180,7 @@ void nc_putc (char c) output_recursion = 0; } -void nc_puts (const char *s) +static void nc_puts(const char *s) { int len; @@ -199,7 +196,7 @@ void nc_puts (const char *s) output_recursion = 0; } -int nc_getc (void) +static int nc_getc(void) { uchar c; @@ -220,7 +217,7 @@ int nc_getc (void) return c; } -int nc_tstc (void) +static int nc_tstc(void) { struct eth_device *eth; @@ -246,7 +243,7 @@ int nc_tstc (void) int drv_nc_init (void) { - device_t dev; + struct stdio_dev dev; int rc; memset (&dev, 0, sizeof (dev)); @@ -259,9 +256,7 @@ int drv_nc_init (void) dev.getc = nc_getc; dev.tstc = nc_tstc; - rc = device_register (&dev); + rc = stdio_register (&dev); return (rc == 0) ? 1 : rc; } - -#endif /* CONFIG_NETCONSOLE */