summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-10-04 11:29:46 -0600
committerSimon Glass <sjg@chromium.org>2014-10-23 19:29:52 -0600
commit62cb89d5ebbe1abd22df8d5d5f442989fc7558af (patch)
tree3e9acc98f1ef767f8383f4f576e7f45c22834302 /drivers
parent699ea9606ca8e4227c8be607197733d348cd12c4 (diff)
downloadu-boot-imx-62cb89d5ebbe1abd22df8d5d5f442989fc7558af.zip
u-boot-imx-62cb89d5ebbe1abd22df8d5d5f442989fc7558af.tar.gz
u-boot-imx-62cb89d5ebbe1abd22df8d5d5f442989fc7558af.tar.bz2
dm: gpio: sandbox: Implement the remove() method
This method frees memory so we must make sure to implement it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/sandbox.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 7aa8b1f..13b3253 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -246,6 +246,13 @@ static int gpio_sandbox_probe(struct udevice *dev)
return 0;
}
+static int gpio_sandbox_remove(struct udevice *dev)
+{
+ free(dev->priv);
+
+ return 0;
+}
+
static const struct udevice_id sandbox_gpio_ids[] = {
{ .compatible = "sandbox,gpio" },
{ }
@@ -257,5 +264,6 @@ U_BOOT_DRIVER(gpio_sandbox) = {
.of_match = sandbox_gpio_ids,
.ofdata_to_platdata = sandbox_gpio_ofdata_to_platdata,
.probe = gpio_sandbox_probe,
+ .remove = gpio_sandbox_remove,
.ops = &gpio_sandbox_ops,
};