From d15f7b564b5e59332fe710dd0511cff035768d4b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Fri, 18 Jul 2014 14:05:22 +0200 Subject: [PATCH] fdt: karo: make 'otg_mode' setting case insensitive --- board/karo/common/fdt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/board/karo/common/fdt.c b/board/karo/common/fdt.c index 0e90398c14..1b87a6ffcb 100644 --- a/board/karo/common/fdt.c +++ b/board/karo/common/fdt.c @@ -240,20 +240,20 @@ void karo_fdt_fixup_usb_otg(void *blob, const char *node, const char *phy, return; } - if (otg_mode && (strcmp(otg_mode, "device") == 0 || - strcmp(otg_mode, "gadget") == 0)) { + if (otg_mode && (strcasecmp(otg_mode, "device") == 0 || + strcasecmp(otg_mode, "gadget") == 0)) { debug("Setting dr_mode to 'peripheral'\n"); ret = fdt_setprop_string(blob, off, "dr_mode", "peripheral"); - } else if (otg_mode && strcmp(otg_mode, "host") == 0) { + } else if (otg_mode && strcasecmp(otg_mode, "host") == 0) { debug("Setting dr_mode to 'host'\n"); ret = fdt_setprop_string(blob, off, "dr_mode", "host"); disable_phy_pins = 0; - } else if (otg_mode && strcmp(otg_mode, "otg") == 0) { - debug("Setting dr_mode to 'host'\n"); + } else if (otg_mode && strcasecmp(otg_mode, "otg") == 0) { + debug("Setting dr_mode to 'otg'\n"); ret = fdt_setprop_string(blob, off, "dr_mode", "otg"); disable_phy_pins = 0; } else { - if (otg_mode && strcmp(otg_mode, "none") != 0) + if (otg_mode && strcasecmp(otg_mode, "none") != 0) printf("Invalid 'otg_mode' setting '%s'; disabling usbotg port\n", otg_mode); disable_otg = 1; @@ -368,7 +368,7 @@ void karo_fdt_fixup_flexcan(void *blob, int xcvr_present) karo_fdt_set_lcd_pins(blob, "lcdif_24bit_pins_a"); } - if (otg_mode && strcmp(otg_mode, "host") == 0) + if (otg_mode && strcasecmp(otg_mode, "host") == 0) karo_fdt_enable_node(blob, "can1", 0); if (xcvr_status) { -- 2.39.2