]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
console: rename search_device() to console_search_dev()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 21 Dec 2020 12:30:03 +0000 (14:30 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 15 Jan 2021 19:38:00 +0000 (14:38 -0500)
Rename search_device() to console_search_dev() since it's in console.h.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/console.c
common/iomux.c
common/stdio.c
include/console.h

index 92e9bc0ec13f53ecdef35d989922c6122ad16acf..b15f732ccb8d08f9f6844b49a05fd17e1895f0b1 100644 (file)
@@ -832,7 +832,7 @@ void clear_ctrlc(void)
 
 /** U-Boot INIT FUNCTIONS *************************************************/
 
-struct stdio_dev *search_device(int flags, const char *name)
+struct stdio_dev *console_search_dev(int flags, const char *name)
 {
        struct stdio_dev *dev;
 
@@ -868,7 +868,7 @@ int console_assign(int file, const char *devname)
 
        /* Check for valid device name */
 
-       dev = search_device(flag, devname);
+       dev = console_search_dev(flag, devname);
 
        if (dev)
                return console_setfile(file, dev);
@@ -974,9 +974,9 @@ int console_init_r(void)
        stderrname = env_get("stderr");
 
        if (OVERWRITE_CONSOLE == 0) {   /* if not overwritten by config switch */
-               inputdev  = search_device(DEV_FLAGS_INPUT,  stdinname);
-               outputdev = search_device(DEV_FLAGS_OUTPUT, stdoutname);
-               errdev    = search_device(DEV_FLAGS_OUTPUT, stderrname);
+               inputdev  = console_search_dev(DEV_FLAGS_INPUT,  stdinname);
+               outputdev = console_search_dev(DEV_FLAGS_OUTPUT, stdoutname);
+               errdev    = console_search_dev(DEV_FLAGS_OUTPUT, stderrname);
                if (CONFIG_IS_ENABLED(CONSOLE_MUX)) {
                        iomux_err = iomux_doenv(stdin, stdinname);
                        iomux_err += iomux_doenv(stdout, stdoutname);
@@ -988,13 +988,13 @@ int console_init_r(void)
        }
        /* if the devices are overwritten or not found, use default device */
        if (inputdev == NULL) {
-               inputdev  = search_device(DEV_FLAGS_INPUT,  "serial");
+               inputdev  = console_search_dev(DEV_FLAGS_INPUT,  "serial");
        }
        if (outputdev == NULL) {
-               outputdev = search_device(DEV_FLAGS_OUTPUT, "serial");
+               outputdev = console_search_dev(DEV_FLAGS_OUTPUT, "serial");
        }
        if (errdev == NULL) {
-               errdev    = search_device(DEV_FLAGS_OUTPUT, "serial");
+               errdev    = console_search_dev(DEV_FLAGS_OUTPUT, "serial");
        }
        /* Initializes output console first */
        if (outputdev != NULL) {
@@ -1064,7 +1064,7 @@ int console_init_r(void)
         */
        if (IS_ENABLED(CONFIG_SPLASH_SCREEN) && env_get("splashimage")) {
                if (!(gd->flags & GD_FLG_SILENT))
-                       outputdev = search_device (DEV_FLAGS_OUTPUT, "serial");
+                       outputdev = console_search_dev (DEV_FLAGS_OUTPUT, "serial");
        }
 
        /* Scan devices looking for input and output devices */
index 7cfd9f2e916206d1938e37071a651eb37d3bec4b..e1bd1b48cd0370fe3b0f79c8facfe3a32ebd7d21 100644 (file)
@@ -95,10 +95,10 @@ int iomux_doenv(const int console, const char *arg)
        for (j = 0; j < i; j++) {
                /*
                 * Check whether the device exists and is valid.
-                * console_assign() also calls search_device(),
+                * console_assign() also calls console_search_dev(),
                 * but I need the pointer to the device.
                 */
-               dev = search_device(io_flag, start[j]);
+               dev = console_search_dev(io_flag, start[j]);
                if (dev == NULL)
                        continue;
                /*
index a15f30804bf58a5dfa1d507b13b41c2a90942887..abf9b1e91588adcb5e924a4ce01adcfc8affd4e4 100644 (file)
@@ -181,7 +181,7 @@ struct stdio_dev *stdio_get_by_name(const char *name)
                 * 'stdout', which may include a list of devices separate by
                 * commas. Obviously this is not going to work, so we ignore
                 * that case. The call path in that case is
-                * console_init_r() -> search_device() -> stdio_get_by_name()
+                * console_init_r() -> console_search_dev() -> stdio_get_by_name()
                 */
                if (!strncmp(name, "vidconsole", 10) && !strchr(name, ',') &&
                    !stdio_probe_device(name, UCLASS_VIDEO, &sdev))
@@ -332,7 +332,7 @@ int stdio_add_devices(void)
                /*
                 * If the console setting is not in environment variables then
                 * console_init_r() will not be calling iomux_doenv() (which
-                * calls search_device()). So we will not dynamically add
+                * calls console_search_dev()). So we will not dynamically add
                 * devices by calling stdio_probe_device().
                 *
                 * So just probe all video devices now so that whichever one is
index 4e06b13736c3be903cf89b7584e1177366a6fe56..bb186e7be04dfe6ffacae9b2511a83f82acc9168 100644 (file)
@@ -25,7 +25,7 @@ void clear_ctrlc(void);       /* clear the Control-C condition */
 int disable_ctrlc(int);        /* 1 to disable, 0 to enable Control-C detect */
 int confirm_yesno(void);        /*  1 if input is "y", "Y", "yes" or "YES" */
 
-struct stdio_dev *search_device(int flags, const char *name);
+struct stdio_dev *console_search_dev(int flags, const char *name);
 
 #ifdef CONFIG_CONSOLE_RECORD
 /**