mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 11:01:33 +00:00
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>
This commit is contained in:
parent
699ea9606c
commit
62cb89d5eb
1 changed files with 8 additions and 0 deletions
|
@ -246,6 +246,13 @@ static int gpio_sandbox_probe(struct udevice *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int gpio_sandbox_remove(struct udevice *dev)
|
||||||
|
{
|
||||||
|
free(dev->priv);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct udevice_id sandbox_gpio_ids[] = {
|
static const struct udevice_id sandbox_gpio_ids[] = {
|
||||||
{ .compatible = "sandbox,gpio" },
|
{ .compatible = "sandbox,gpio" },
|
||||||
{ }
|
{ }
|
||||||
|
@ -257,5 +264,6 @@ U_BOOT_DRIVER(gpio_sandbox) = {
|
||||||
.of_match = sandbox_gpio_ids,
|
.of_match = sandbox_gpio_ids,
|
||||||
.ofdata_to_platdata = sandbox_gpio_ofdata_to_platdata,
|
.ofdata_to_platdata = sandbox_gpio_ofdata_to_platdata,
|
||||||
.probe = gpio_sandbox_probe,
|
.probe = gpio_sandbox_probe,
|
||||||
|
.remove = gpio_sandbox_remove,
|
||||||
.ops = &gpio_sandbox_ops,
|
.ops = &gpio_sandbox_ops,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue