diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 56bfd11..fa2c2fb 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -17,11 +17,11 @@
  * or GPIO blocks registered with the GPIO controller. Returns
  * entry on success, NULL on error.
  */
-static int gpio_to_device(unsigned int gpio, struct device **devp,
+static int gpio_to_device(unsigned int gpio, struct udevice **devp,
 			  unsigned int *offset)
 {
 	struct gpio_dev_priv *uc_priv;
-	struct device *dev;
+	struct udevice *dev;
 	int ret;
 
 	for (ret = uclass_first_device(UCLASS_GPIO, &dev);
@@ -40,11 +40,11 @@
 	return ret ? ret : -EINVAL;
 }
 
-int gpio_lookup_name(const char *name, struct device **devp,
+int gpio_lookup_name(const char *name, struct udevice **devp,
 		     unsigned int *offsetp, unsigned int *gpiop)
 {
 	struct gpio_dev_priv *uc_priv;
-	struct device *dev;
+	struct udevice *dev;
 	int ret;
 
 	if (devp)
@@ -86,7 +86,7 @@
 int gpio_request(unsigned gpio, const char *label)
 {
 	unsigned int offset;
-	struct device *dev;
+	struct udevice *dev;
 	int ret;
 
 	ret = gpio_to_device(gpio, &dev, &offset);
@@ -110,7 +110,7 @@
 int gpio_free(unsigned gpio)
 {
 	unsigned int offset;
-	struct device *dev;
+	struct udevice *dev;
 	int ret;
 
 	ret = gpio_to_device(gpio, &dev, &offset);
@@ -133,7 +133,7 @@
 int gpio_direction_input(unsigned gpio)
 {
 	unsigned int offset;
-	struct device *dev;
+	struct udevice *dev;
 	int ret;
 
 	ret = gpio_to_device(gpio, &dev, &offset);
@@ -155,7 +155,7 @@
 int gpio_direction_output(unsigned gpio, int value)
 {
 	unsigned int offset;
-	struct device *dev;
+	struct udevice *dev;
 	int ret;
 
 	ret = gpio_to_device(gpio, &dev, &offset);
@@ -177,7 +177,7 @@
 int gpio_get_value(unsigned gpio)
 {
 	unsigned int offset;
-	struct device *dev;
+	struct udevice *dev;
 	int ret;
 
 	ret = gpio_to_device(gpio, &dev, &offset);
@@ -199,7 +199,7 @@
 int gpio_set_value(unsigned gpio, int value)
 {
 	unsigned int offset;
-	struct device *dev;
+	struct udevice *dev;
 	int ret;
 
 	ret = gpio_to_device(gpio, &dev, &offset);
@@ -209,7 +209,7 @@
 	return gpio_get_ops(dev)->set_value(dev, offset, value);
 }
 
-const char *gpio_get_bank_info(struct device *dev, int *bit_count)
+const char *gpio_get_bank_info(struct udevice *dev, int *bit_count)
 {
 	struct gpio_dev_priv *priv;
 
@@ -225,7 +225,7 @@
 static int gpio_renumber(void)
 {
 	struct gpio_dev_priv *uc_priv;
-	struct device *dev;
+	struct udevice *dev;
 	struct uclass *uc;
 	unsigned base;
 	int ret;
@@ -247,12 +247,12 @@
 	return 0;
 }
 
-static int gpio_post_probe(struct device *dev)
+static int gpio_post_probe(struct udevice *dev)
 {
 	return gpio_renumber();
 }
 
-static int gpio_pre_remove(struct device *dev)
+static int gpio_pre_remove(struct udevice *dev)
 {
 	return gpio_renumber();
 }
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 22b6a5f..09cebe2 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -22,7 +22,7 @@
 };
 
 /* Access routines for GPIO state */
-static u8 *get_gpio_flags(struct device *dev, unsigned offset)
+static u8 *get_gpio_flags(struct udevice *dev, unsigned offset)
 {
 	struct gpio_dev_priv *uc_priv = dev->uclass_priv;
 	struct gpio_state *state = dev_get_priv(dev);
@@ -36,12 +36,12 @@
 	return &state[offset].flags;
 }
 
-static int get_gpio_flag(struct device *dev, unsigned offset, int flag)
+static int get_gpio_flag(struct udevice *dev, unsigned offset, int flag)
 {
 	return (*get_gpio_flags(dev, offset) & flag) != 0;
 }
 
-static int set_gpio_flag(struct device *dev, unsigned offset, int flag,
+static int set_gpio_flag(struct udevice *dev, unsigned offset, int flag,
 			 int value)
 {
 	u8 *gpio = get_gpio_flags(dev, offset);
@@ -54,7 +54,7 @@
 	return 0;
 }
 
-static int check_reserved(struct device *dev, unsigned offset,
+static int check_reserved(struct udevice *dev, unsigned offset,
 			  const char *func)
 {
 	if (!get_gpio_flag(dev, offset, GPIOF_RESERVED)) {
@@ -70,24 +70,24 @@
  * Back-channel sandbox-internal-only access to GPIO state
  */
 
-int sandbox_gpio_get_value(struct device *dev, unsigned offset)
+int sandbox_gpio_get_value(struct udevice *dev, unsigned offset)
 {
 	if (get_gpio_flag(dev, offset, GPIOF_OUTPUT))
 		debug("sandbox_gpio: get_value on output gpio %u\n", offset);
 	return get_gpio_flag(dev, offset, GPIOF_HIGH);
 }
 
-int sandbox_gpio_set_value(struct device *dev, unsigned offset, int value)
+int sandbox_gpio_set_value(struct udevice *dev, unsigned offset, int value)
 {
 	return set_gpio_flag(dev, offset, GPIOF_HIGH, value);
 }
 
-int sandbox_gpio_get_direction(struct device *dev, unsigned offset)
+int sandbox_gpio_get_direction(struct udevice *dev, unsigned offset)
 {
 	return get_gpio_flag(dev, offset, GPIOF_OUTPUT);
 }
 
-int sandbox_gpio_set_direction(struct device *dev, unsigned offset, int output)
+int sandbox_gpio_set_direction(struct udevice *dev, unsigned offset, int output)
 {
 	return set_gpio_flag(dev, offset, GPIOF_OUTPUT, output);
 }
@@ -97,7 +97,7 @@
  */
 
 /* set GPIO port 'offset' as an input */
-static int sb_gpio_direction_input(struct device *dev, unsigned offset)
+static int sb_gpio_direction_input(struct udevice *dev, unsigned offset)
 {
 	debug("%s: offset:%u\n", __func__, offset);
 
@@ -108,7 +108,7 @@
 }
 
 /* set GPIO port 'offset' as an output, with polarity 'value' */
-static int sb_gpio_direction_output(struct device *dev, unsigned offset,
+static int sb_gpio_direction_output(struct udevice *dev, unsigned offset,
 				    int value)
 {
 	debug("%s: offset:%u, value = %d\n", __func__, offset, value);
@@ -121,7 +121,7 @@
 }
 
 /* read GPIO IN value of port 'offset' */
-static int sb_gpio_get_value(struct device *dev, unsigned offset)
+static int sb_gpio_get_value(struct udevice *dev, unsigned offset)
 {
 	debug("%s: offset:%u\n", __func__, offset);
 
@@ -132,7 +132,7 @@
 }
 
 /* write GPIO OUT value to port 'offset' */
-static int sb_gpio_set_value(struct device *dev, unsigned offset, int value)
+static int sb_gpio_set_value(struct udevice *dev, unsigned offset, int value)
 {
 	debug("%s: offset:%u, value = %d\n", __func__, offset, value);
 
@@ -148,7 +148,7 @@
 	return sandbox_gpio_set_value(dev, offset, value);
 }
 
-static int sb_gpio_request(struct device *dev, unsigned offset,
+static int sb_gpio_request(struct udevice *dev, unsigned offset,
 			   const char *label)
 {
 	struct gpio_dev_priv *uc_priv = dev->uclass_priv;
@@ -171,7 +171,7 @@
 	return set_gpio_flag(dev, offset, GPIOF_RESERVED, 1);
 }
 
-static int sb_gpio_free(struct device *dev, unsigned offset)
+static int sb_gpio_free(struct udevice *dev, unsigned offset)
 {
 	struct gpio_state *state = dev_get_priv(dev);
 
@@ -184,7 +184,7 @@
 	return set_gpio_flag(dev, offset, GPIOF_RESERVED, 0);
 }
 
-static int sb_gpio_get_state(struct device *dev, unsigned int offset,
+static int sb_gpio_get_state(struct udevice *dev, unsigned int offset,
 			     char *buf, int bufsize)
 {
 	struct gpio_dev_priv *uc_priv = dev->uclass_priv;
@@ -213,7 +213,7 @@
 	.get_state		= sb_gpio_get_state,
 };
 
-static int sandbox_gpio_ofdata_to_platdata(struct device *dev)
+static int sandbox_gpio_ofdata_to_platdata(struct udevice *dev)
 {
 	struct gpio_dev_priv *uc_priv = dev->uclass_priv;
 
@@ -225,7 +225,7 @@
 	return 0;
 }
 
-static int gpio_sandbox_probe(struct device *dev)
+static int gpio_sandbox_probe(struct udevice *dev)
 {
 	struct gpio_dev_priv *uc_priv = dev->uclass_priv;
 
