]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_gpio.c
Merge branch 'master' of git://git.denx.de/u-boot
[karo-tx-uboot.git] / common / cmd_gpio.c
index 778aa5f0987baa732fce85a94672f5a39616fea8..4634f914e66d97a0bc9fe0f244fb957cf4b544d1 100644 (file)
 #include <dm.h>
 #include <asm/gpio.h>
 
-#ifndef name_to_gpio
-#define name_to_gpio(name) simple_strtoul(name, NULL, 10)
-#endif
+int __weak name_to_gpio(const char *name)
+{
+       return simple_strtoul(name, NULL, 10);
+}
 
 enum gpio_cmd {
        GPIO_INPUT,
@@ -29,7 +30,7 @@ static const char * const gpio_function[] = {
        "unknown",
 };
 
-static void show_gpio(struct device *dev, const char *bank_name, int offset)
+static void show_gpio(struct udevice *dev, const char *bank_name, int offset)
 {
        struct dm_gpio_ops *ops = gpio_get_ops(dev);
        char buf[80];
@@ -61,7 +62,7 @@ static void show_gpio(struct device *dev, const char *bank_name, int offset)
 
 static int do_gpio_status(const char *gpio_name)
 {
-       struct device *dev;
+       struct udevice *dev;
        int newline = 0;
        int ret;