]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
adapter: make adapter_config_khz() static
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 9 Nov 2024 17:49:11 +0000 (18:49 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 23 Nov 2024 13:45:19 +0000 (13:45 +0000)
The function is not referenced outside the file.
Make it static.

Change-Id: I72e96624749ae4cc7f4566d737a88186e899616a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8541
Tested-by: jenkins
src/jtag/adapter.c
src/jtag/adapter.h

index 996a23f1ff601a5d2d6b37203daa4fcd69ae249c..04942f753b8f86ec5aeb03bdeda2564aa521fc91 100644 (file)
@@ -66,6 +66,8 @@ static const struct gpio_map {
        [ADAPTER_GPIO_IDX_LED] = { "led", ADAPTER_GPIO_DIRECTION_OUTPUT, true, true, },
 };
 
+static int adapter_config_khz(unsigned int khz);
+
 bool is_adapter_initialized(void)
 {
        return adapter_config.adapter_initialized;
@@ -245,7 +247,8 @@ static int adapter_set_speed(int speed)
        return is_adapter_initialized() ? adapter_driver->speed(speed) : ERROR_OK;
 }
 
-int adapter_config_khz(unsigned int khz)
+/** Attempt to configure the adapter for the specified kHz. */
+static int adapter_config_khz(unsigned int khz)
 {
        LOG_DEBUG("handle adapter khz");
        adapter_config.clock_mode = CLOCK_MODE_KHZ;
index 23ffe2cc51126ed43f8d4e86747d5d45b47576bc..556952f8d736fe1561ab27dd495369e73cce30ef 100644 (file)
@@ -97,9 +97,6 @@ int adapter_get_speed(int *speed);
  */
 int adapter_get_speed_readable(int *speed);
 
-/** Attempt to configure the adapter for the specified kHz. */
-int adapter_config_khz(unsigned int khz);
-
 /**
  * Attempt to enable RTCK/RCLK. If that fails, fallback to the
  * specified frequency.