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,
.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),
};
static int dm_test_virtio_remove(struct unit_test_state *uts)
{
struct udevice *bus, *dev;
+ u8 status;
/* check probe success */
ut_assertok(uclass_first_device_err(UCLASS_VIRTIO, &bus));
ut_asserteq(-EKEYREJECTED, device_remove(bus, DM_REMOVE_ACTIVE_ALL));
ut_asserteq(false, device_active(dev));
+ virtio_get_status(dev, &status);
+ ut_assertok(status);
return 0;
}