diff options
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/designware_udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/ether.c | 12 | ||||
-rw-r--r-- | drivers/usb/gadget/f_dfu.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/gadget/designware_udc.c b/drivers/usb/gadget/designware_udc.c index 0db7a3b6c15..a25f5019e8a 100644 --- a/drivers/usb/gadget/designware_udc.c +++ b/drivers/usb/gadget/designware_udc.c @@ -601,7 +601,7 @@ void udc_setup_ep(struct usb_device_instance *device, if ((ep != 0) && (udc_device->device_state < STATE_ADDRESSED)) return; - tt = getenv("usbtty"); + tt = env_get("usbtty"); if (!tt) tt = "generic"; diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index d0105372cf3..2cf5c8d31e2 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -2384,12 +2384,12 @@ static int _usb_eth_init(struct ether_priv *priv) strlcpy(host_addr, CONFIG_USBNET_HOST_ADDR, sizeof(host_addr)); #endif /* Check if the user overruled the MAC addresses */ - if (getenv("usbnet_devaddr")) - strlcpy(dev_addr, getenv("usbnet_devaddr"), + if (env_get("usbnet_devaddr")) + strlcpy(dev_addr, env_get("usbnet_devaddr"), sizeof(dev_addr)); - if (getenv("usbnet_hostaddr")) - strlcpy(host_addr, getenv("usbnet_hostaddr"), + if (env_get("usbnet_hostaddr")) + strlcpy(host_addr, env_get("usbnet_hostaddr"), sizeof(host_addr)); if (!is_eth_addr_valid(dev_addr)) { @@ -2420,8 +2420,8 @@ static int _usb_eth_init(struct ether_priv *priv) gadget = dev->gadget; usb_gadget_connect(gadget); - if (getenv("cdc_connect_timeout")) - timeout = simple_strtoul(getenv("cdc_connect_timeout"), + if (env_get("cdc_connect_timeout")) + timeout = simple_strtoul(env_get("cdc_connect_timeout"), NULL, 10) * CONFIG_SYS_HZ; ts = get_timer(0); while (!dev->network_started) { diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c index dfa43595779..bc4be712da7 100644 --- a/drivers/usb/gadget/f_dfu.c +++ b/drivers/usb/gadget/f_dfu.c @@ -725,7 +725,7 @@ static int dfu_bind(struct usb_configuration *c, struct usb_function *f) cdev->req->context = f_dfu; - s = getenv("serial#"); + s = env_get("serial#"); if (s) g_dnl_set_serialnumber((char *)s); diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 7cd6d24bf50..d05b74b2d2a 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -212,7 +212,7 @@ static int fastboot_bind(struct usb_configuration *c, struct usb_function *f) f->hs_descriptors = fb_hs_function; } - s = getenv("serial#"); + s = env_get("serial#"); if (s) g_dnl_set_serialnumber((char *)s); @@ -426,7 +426,7 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) sprintf(str_num, "0x%08x", CONFIG_FASTBOOT_BUF_SIZE); strncat(response, str_num, chars_left); } else if (!strcmp_l1("serialno", cmd)) { - s = getenv("serial#"); + s = env_get("serial#"); if (s) strncat(response, s, chars_left); else @@ -441,7 +441,7 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) } sprintf(envstr, "fastboot.%s", cmd); - s = getenv(envstr); + s = env_get(envstr); if (s) { strncat(response, s, chars_left); } else { |