]> git.sur5r.net Git - u-boot/commitdiff
dm: gpio: sandbox: Implement the remove() method
authorSimon Glass <sjg@chromium.org>
Sat, 4 Oct 2014 17:29:46 +0000 (11:29 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 24 Oct 2014 01:29:52 +0000 (19:29 -0600)
This method frees memory so we must make sure to implement it.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/gpio/sandbox.c

index 7aa8b1f0f8cfcf92c76f16da4eff1166622c92d3..13b32538cd231cfe5bf4f4759a01590b6221b5d8 100644 (file)
@@ -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,
 };