Commit c271fcd9 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Michael S. Tsirkin

vdpa: Remove usage of the deprecated ida_simple_xx() API

ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

This is less verbose.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Message-Id: <d7534cc4caf4ff9d6b072744352c1b69487779ea.1702230703.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
parent dff4fa0e
...@@ -131,7 +131,7 @@ static void vdpa_release_dev(struct device *d) ...@@ -131,7 +131,7 @@ static void vdpa_release_dev(struct device *d)
if (ops->free) if (ops->free)
ops->free(vdev); ops->free(vdev);
ida_simple_remove(&vdpa_index_ida, vdev->index); ida_free(&vdpa_index_ida, vdev->index);
kfree(vdev->driver_override); kfree(vdev->driver_override);
kfree(vdev); kfree(vdev);
} }
...@@ -205,7 +205,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent, ...@@ -205,7 +205,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent,
return vdev; return vdev;
err_name: err_name:
ida_simple_remove(&vdpa_index_ida, vdev->index); ida_free(&vdpa_index_ida, vdev->index);
err_ida: err_ida:
kfree(vdev); kfree(vdev);
err: err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment