summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-uclass.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-01-21 11:49:49 -0500
committerTom Rini <trini@konsulko.com>2016-01-21 11:49:49 -0500
commit6905f4d3c7be46fed4859f51f0a8f9a1107c22e7 (patch)
treedd2fb0d12e56b3d69560b26a11ee0f0130ea0a5a /drivers/gpio/gpio-uclass.c
parent45fe3809b9923b92f221d70eb45ae071059fd5e0 (diff)
parent747440d0fa95f2205a8fcef49b6c7845700b6246 (diff)
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'drivers/gpio/gpio-uclass.c')
-rw-r--r--drivers/gpio/gpio-uclass.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 4cce11fe21..3ed4d8914c 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -154,6 +154,7 @@ int dm_gpio_request(struct gpio_desc *desc, const char *label)
static int dm_gpio_requestf(struct gpio_desc *desc, const char *fmt, ...)
{
+#if !defined(CONFIG_SPL_BUILD) || !defined(CONFIG_USE_TINY_PRINTF)
va_list args;
char buf[40];
@@ -161,6 +162,9 @@ static int dm_gpio_requestf(struct gpio_desc *desc, const char *fmt, ...)
vscnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
return dm_gpio_request(desc, buf);
+#else
+ return dm_gpio_request(desc, fmt);
+#endif
}
/**
@@ -199,6 +203,7 @@ int gpio_request(unsigned gpio, const char *label)
*/
int gpio_requestf(unsigned gpio, const char *fmt, ...)
{
+#if !defined(CONFIG_SPL_BUILD) || !defined(CONFIG_USE_TINY_PRINTF)
va_list args;
char buf[40];
@@ -206,6 +211,9 @@ int gpio_requestf(unsigned gpio, const char *fmt, ...)
vscnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
return gpio_request(gpio, buf);
+#else
+ return gpio_request(gpio, fmt);
+#endif
}
int _dm_gpio_free(struct udevice *dev, uint offset)