virtio: Avoid strange behaviour on removal

This device does a check on removal which is better handled in the actual
test. Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-01-17 10:47:50 -07:00
committed by Tom Rini
parent 811c81e889
commit 902400201d
2 changed files with 3 additions and 13 deletions

View File

@@ -167,18 +167,6 @@ static int virtio_sandbox_probe(struct udevice *udev)
return 0;
}
/* check virtio device driver's remove routine was called to reset the device */
static int virtio_sandbox_child_post_remove(struct udevice *vdev)
{
u8 status;
virtio_get_status(vdev, &status);
if (status)
panic("virtio device was not reset\n");
return 0;
}
static const struct dm_virtio_ops virtio_sandbox1_ops = {
.get_config = virtio_sandbox_get_config,
.set_config = virtio_sandbox_set_config,
@@ -203,7 +191,6 @@ U_BOOT_DRIVER(virtio_sandbox1) = {
.of_match = virtio_sandbox1_ids,
.ops = &virtio_sandbox1_ops,
.probe = virtio_sandbox_probe,
.child_post_remove = virtio_sandbox_child_post_remove,
.priv_auto = sizeof(struct virtio_sandbox_priv),
};