Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9db1d313 authored by Yimin Peng's avatar Yimin Peng Committed by Gerrit - the friendly Code Review server
Browse files

i2c: virtio: Register i2c adapter after virtio queue ready



Make sure the right sequence of virtio i2c access.

Change-Id: I786ee11c5a3166db52531e271a22d53cc607e9a6
Signed-off-by: default avatarYimin Peng <yiminp@codeaurora.org>
parent d8724f5e
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -292,13 +292,14 @@ static int virti2c_probe(struct virtio_device *vdev)
	if (err)
		goto err_init_vq;

	virtio_device_ready(vdev);

	virtqueue_enable_cb(vi2c->vq);

	err = virti2c_init_hw(vdev, vi2c);
	if (err)
		goto err_init_hw;

	virtio_device_ready(vdev);

	virtqueue_enable_cb(vi2c->vq);
	return 0;

err_init_hw: